IRC logs of #tryton for Tuesday, 2013-12-24 #tryton log beginning Tue Dec 24 00:00:01 CET 2013
cedksharoonthomas: what is the "value" in nereid.permission ?11:36
sharoonthomascedk: value is like the internal value in  [('internal-value', 'Dispalyed Value')] if it was the choices in a selection field11:42
cedksharoonthomas: I have some times to spend on nereid11:49
cedksharoonthomas: and I'm still wondering if it is a good idea to store routes, templates etc in the database11:50
cedkI'm wondering if a creating just an ext to Flask will not be more powerful11:50
cedkin combination with trytond modules that provides the internal for user management etc.11:51
cedkI wrote 1.5 year ago, a simple flask app that use data from our trytond and the only missing part was the user login management11:52
cedkand this app is damn simple 186 lines (with custom user management)11:53
cedka little bit like flask_sqlalchemy11:58
sharoonthomascedk: you can make custom application easily the way you are talking12:03
sharoonthomascedk: but not the ones with tryton's modularity12:03
cedksharoonthomas: what will not be modular is the templates but any way this will always be custom12:04
sharoonthomascedk: routes too12:04
sharoonthomascedk: if you use decorators12:04
cedksharoonthomas: routes are teh same as templates12:05
cedksharoonthomas: otherwise I think we will recreate Django12:08
sharoonthomascedk: well, the intention **is** to have a full stack framework with tryton orm12:08
cedksharoonthomas: then I think we have a problem12:11
sharoonthomascedk: what is the problem ?12:17
sharoonthomascedk: if two people decide to build web apps on tryton, what nereid offers you is the common part which otherwise both will have to "reinvent"12:18
sharoonthomascedk: just think if both applications need authentication, what would they do ? two more flask extensions ? should they be tryton modules ? well, nereid just solves that problem12:19
cedksharoonthomas: all that could be separate modules12:20
sharoonthomascedk: yes, nereid-auth could be a separate module - that is something I agree12:20
sharoonthomascedk: but if you don't have any of it why would anyone use tryton to build their web app would be a more important question12:21
cedksharoonthomas: for me, everything should be a small module12:21
sharoonthomascedk: its just like the ir, res module12:21
cedksharoonthomas: in some way, I will not build Tryton with the sam design12:21
sharoonthomascedk: you are not being specific about what you don't like except that you need the auth module to be separate12:22
cedkthere are some common problem to plug a website to Tryton and each of those problems should be managed by a single module12:22
cedk- I want a Flask extension that allow me to use tryton model in it without worry12:23
cedk- I want a trytond module to manage website users with login/reset password etc.12:23
cedkafter that, there could be any modules for specific usage like a webshop or project report or whatever12:24
cedkbut the first flask extension should be minimal and care of the important stuffs like12:25
cedk- setup correct context12:25
cedk- connect to right DB12:25
cedk- manage transaction12:25
sharoonthomascedk: Nereid is a Flask subclass and implements just that12:26
cedkin summary: dispatch.py12:26
cedksharoonthomas: but there are too much stuffs12:26
sharoonthomascedk: it makes a choice of the user authentication which I plan on separating anyway12:26
sharoonthomascedk:  a pull request for that would be welcome12:26
sharoonthomascedk: please define too much12:26
cedksharoonthomas: I think I can write such Flask extenstion in 1k lines12:27
cedksharoonthomas: too much lines of code12:27
sharoonthomascedk: nereid application is 530 lines of code, at least 100 lines should be documentation12:29
sharoonthomascedk: so where is the too much lines of code ?12:29
cedksharoonthomas: I think it should not inherit Flask12:30
cedksharoonthomas: too much lines of code is all the other stuffs12:30
cedksharoonthomas: I will write a small prototype12:32
sharoonthomascedk: have you written  a nereid application ?12:33
sharoonthomascedk: why don't you just fork nereid and send a pull request for what you think is not good ?12:36
-!- vcardon( has left #tryton12:43
cedksharoonthomas: it is too much work and also I dislike pull request12:59
helpmetrytonhello. can someone help me to have prices with VAT included?14:15
helpmetrytonVAT = taxes14:16
corrohelpmetryton: AFAIK Tryton does not support invoices/sales with taxes included. It's an inherently difficult thing to do because there will be rounding errors eventually.14:21
helpmetrytonIs there a way to work around it?14:22
helpmetrytonthe only way that i can see is to calculate the taxes of everything that i buy manually14:23
corrohelpmetryton: Just hackish ways. We've done something like that for a customer and the implemenation tries to fix the rounding issues automatically in the best possible way. It remains a hack though.14:26
helpmetrytoni wanted to learn how to use tryton doing my personal finances14:29
helpmetrytonall the tickets come with included tax14:29
helpmetrytonno way of working with it, i guess14:30
helpmetrytonwhere is the information that describes the problem?14:31
corrohelpmetryton: You could try the (unofficial) module mentioned. It's not released yet, but I could do that today if it helps you.14:31
helpmetrytongain/gain → me = guinea pig / you = feedback? (sounds good)14:32
helpmetrytonbut i'm not a company, so may feedback may not be good14:32
corrohelpmetryton: No guarantee it works in every case though. Not even a guarantee it works at all ;)14:32
helpmetrytondo you think i can help to make it work also? i know one or two things about python14:33
helpmetryton(not much time, though)14:33
corrohelpmetryton: the problem is not really python specific, but comments are always welcome14:34
helpmetrytonok. just let me know the kind of info that you need.14:34
helpmetrytondo you have gpg?14:34
corroACTION is releasing module14:34
corrohelpmetryton: I do have gpg, yes. why?14:35
helpmetrytonif we are going to be in communication, it would be better14:35
corrohelpmetryton: I'll release the code on, you may post your comments there14:36
helpmetrytonok... may i have more specific instructions? :D14:37
corrohelpmetryton: not familiar with bitbucket? It's quite a simple interface to use, I guess you'll find your way.14:40
helpmetrytonlet's see...14:40
corrohelpmetryton: I'll send you the links to the two modules as soon as I uploaded them.14:40
corrohelpmetryton: and
helpmetrytondownloading and installing14:50
helpmetrytonhow do you send me those messages only to me?14:52
helpmetrytonhow can i send you something similar?14:52
corrohelpmetryton: I'm not. This is a public channel.14:52
helpmetrytonyes, but my name always comes before the message14:53
helpmetrytondownload finished14:57
helpmetrytonerror: Could not find suitable distribution for Requirement.parse('trytond-account-invoice-discount>=2.8,<2.9')15:03
corrohelpmetryton: ah crap. It also depends on another unofficial module. Looks like an error to me, though. I'll quickly remove the dependency.15:06
helpmetrytonby the way...15:07
helpmetrytoni'm using V.315:08
corrohelpmetryton: the module is for 2.8 only15:08
helpmetrytonwould i need to uninstall everything?15:09
corrohelpmetryton: yes. Downgrade is not supported. But you could try to make it work with 3.0 if you're a programmer yourself. The API changes shouldn't be as big as they used to be.15:12
helpmetrytonok... conceptually what does it do? does it take the original price, deducts the amount of tax, and then re-adds it?15:12
corrohelpmetryton: I just had a look in the Tryton wiki, sadly there are no migration steps for 2.8 -> 3.0 yet15:12
helpmetrytonit's even better. we could make it work for 3 and the upgrade is ready...15:12
helpmetrytoni'll be in touch. your e-mail is in the package...15:13
cedksharoonthomas: here is what I think should be the minimal flask integration:
-!- sharoonthomas(~sharoonth@ has left #tryton16:48

Generated by 2.11.0 by Marius Gedminas - find it at!