IRC logs of #tryton for Wednesday, 2017-02-22 #tryton log beginning Wed Feb 22 00:00:01 CET 2017
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:34
-!- perilla( has joined #tryton00:44
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:52
-!- woakas2( has joined #tryton03:58
-!- dj_xatra(~dj_xatra@ has joined #tryton07:21
-!- JanGB( has joined #tryton07:53
-!- mrichez( has joined #tryton08:53
-!- smarro( has joined #tryton08:58
-!- udono( has joined #tryton08:59
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:06
pokolialexbodn: you can develop a module that extends the product one by adding the company. That should do the trick without forking09:09
pokolialexbodn: the idea is that you don't have to fork anything, but extend by developing custom modules09:09
-!- thaneor( has joined #tryton09:32
-!- janem( has joined #tryton09:37
-!- rpit( has joined #tryton10:20
-!- nicoe( has joined #tryton10:36
-!- janem( has joined #tryton11:31
-!- mariomop( has joined #tryton12:21
-!- mariomop( has joined #tryton12:37
-!- smarro( has joined #tryton12:53
-!- JanGB( has joined #tryton12:56
-!- janem( has joined #tryton13:29
mrichezhi, need some help about fields_get method ? fields_get(['field_name'])['field_name']['selection'] or saw also with ['string'] in place of ['selection'] . Is 'string' for any field type ?13:31
pokolimrichez: sorry but I don't understand your question :$13:44
pokolimrichez: fields_get returns the field defintion of each field of the model13:44
-!- mamcode(~mamcode@ has joined #tryton13:44
pokolimrichez: fields_get(['field_name'])['field_name']['selection'] returns the selection values of the field_name of the model13:44
pokolimrichez: and if you use string it returns the field string (in the user language)13:45
mrichezpokoli: ok13:45
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton13:46
mrichezpokoli: i'm trying to understand
pokolimrichez: wow that was a patch for a very nice person :P13:47
pokolimrichez: on configuration modules we define a field that has exactly the same selection values as on the target module13:47
pokolimrichez: with this patch, instead of defining the allowed options on both modles (configuration and sale), we define only in one13:48
pokolimrichez: and the configuration selection is read from the target field definition13:48
mrichezpokoli: cedric suggest me to apply this patch for my different states  defined on the parent and to get them on the lines with a function field13:48
pokolimrichez: because on you case, you have a parent_state field on lines, which mimics the state of the parent record13:49
pokolimrichez: so you have to read the selection values from the parent field definition13:50
mrichezpokoli: exactly13:50
pokolimrichez: and that is done with: Model.fields_get(['field_name'])['field_name']['selection']13:52
mrichezpokoli: yes13:52
pokolimrichez: replacing Model and field_name with correct values13:53
alexbodnthanks pokoli. i'm just getting in slowly, so i'm concerned not to break things ;)13:59
pokolialexbodn: just break, but break it on your local database :)13:59
pokolialexbodn: learning by breaking and fixing :P14:03
alexbodnone good reason to use sqlite, pokoli ;)14:03
mrichezpokoli: thanks!14:03
-!- smarro( has joined #tryton14:19
-!- alexbodn(~alex@ has joined #tryton14:36
pokolimrichez: you're welcome :)15:14
mrichezanother question about states: in a lot of tryton's modules, there is a method on_change_with_xxx_state, inside we test if there's a and returning
mrichezwhat about if is false ?15:18
mrichezmethod is linked to a selection inside a function field15:19
-!- csotelo_at_work(~csotelo@ has joined #tryton15:20
pokolialexbodn: use the backend you prefer, but sqlite is a good choice for testing. On the other hand, I will recomend PostgreSQL for production15:20
mrichezfor example here :
pokolimrichez: normally it should be defined, otherwise a default value should be define15:22
pokolimrichez: following your example, purchase is a required field for purchase_lines15:22
pokolimrichez: and as example of the default value, you can have a look at
mrichezpokoli: so the if test is unnecessary ?15:22
pokolimrichez: no, because for on_change the purchase must have a none value15:23
pokolimrichez: in this case all the fields will be readonly until you set a purchase value on the line, as the state will != 'draft'15:24
pokolimrichez: in python, a function that does not execute a return statement always return None15:25
mrichezpokoli: but None is not defined in the state selection ?15:25
pokolimrichez: yes, but this will be a temporal value15:25
mrichezpokoli: ?15:27
pokolimrichez: the value will be updated via on_change when the purchase is set15:28
pokolimrichez: IIRC, all the fields have a None default value15:28
mrichezpokoli: thanks ! :-)15:44
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton16:38
-!- kstenger( has joined #tryton16:42
janemHi all, is there any module available that sends invoices by email server-side?18:18
cedkjanem: there is this that could interrest you:
janemcedk: yeah, that sounds like what I'm looking for. Just have to wait then I guess :) Thanks though. Just trying out Tryton for a couple of days, debating if I should use it instead of Odoo for my next customer project.18:35
nicoejanem: you should (I may be biased :D)18:37
janemnicoe: I am new to ERP systems in general, we built something for a client from scratch, which ended up much like an ERP, just led me to realize that it's wise to find a solid base, as many of the chalanges are very bussiness generic18:38
janemOdoo seemed promissing, but very messy, and they dont handle the commercial/opensource very well it seems..18:40
janemI am also wondering how "big" Tryton is, how many developers are there? By my googling it doesnt seem like there is to much traction on the project. I find some things, but I would expect an open source erp to attract more developers/project.18:44
janemThis is just a loose thought after googling a few days about different Tryton stuff.18:45
cedkjanem: we are mainly a community of people doing things not talking18:58
janemcedk: fair enough, and I dont mean to insult the project. It's just that I am interested in learning more about it and the state of it18:58
cedkjanem: I did not take it as an insult18:59
cedkjanem: if you compare with Odoo, their goal is to attract (and lock) as much as possible users19:00
cedkbut here we have mainly companies that install Tryton to their customers (often unfortnuatly rebranded)19:01
janemcedk: Yeah, thats the feeling I got too.19:01
janemcedk: I see. I will try to create a module and fiddle around with it. Just got my docker image up and running. I'll start digging in the documentation :)19:03
cedkjanem: major difference with Odoo is that Tryton migrates from version to version19:05
cedkwhile Odoo requires a contract19:05
janemcedk: I saw the discuss on the dockerimage btw.. I think it's more the docker way to have everything included in the image, database and all, ready to test/launch19:06
janemcedk: to me that's more the docker way19:06
cedkthis is just because we are a collectif that build a software so we share19:06
janemcedk: yeah, I'm definetly not choosing Odoo to build on, could offer it for a client ootb for very simple accounting stuff.19:06
cedkjanem: strange because docker are not persistant but you should want to persist the database?19:07
janemcedk: thats easy to fix.. I just installed postgresql, changed user to root, and in the checks if a empty database dir is mounted or not19:07
janemcedk: works like a charm19:07
janemcedk: I use it for many projects/services we deliver19:08
-!- Telesight( has joined #tryton19:10
janemcedk: it just checks if a dir "/data/database/" is mounted, if it is, and its empty, delete original postgres data folder, symlink it, and run the trytond-admin command19:11
janemcedk: if it exsistes, and is not empty, just sym link and do nothing else.. persistense19:11
janemcedk: I guess also the /var/lib/tryton directory should be mounted as well19:25
janemcedk: I'll be more then happy to share my image once I have time to clean it.19:37
alexbodnpokoli, of course for testing :)19:43
-!- smarro( has joined #tryton19:48
-!- sleepdead( has joined #tryton20:17
sleepdeadhey guys, i'm new to tryton and trying to learn its way. Is there a recommended way of running production? (Besides PostgreSQL)20:37
cedksleepdead: not really21:07
-!- JanGB( has joined #tryton21:08
cedksleepdead: indeed the best is to use what you already know21:14
-!- smarro( has joined #tryton21:28
-!- thaneor1(~ldlc6@ has joined #tryton21:34
sleepdeadcedk Thanks. I started tryton with uwsgi and it was using 200MB with python2 and 350MB with pypy. That's RAM. Are these numbers expected?21:43
-!- trilliji( has joined #tryton22:35
-!- janem( has joined #tryton22:37
-!- trilliji( has joined #tryton23:12
-!- JosDzG(~Thunderbi@ has joined #tryton23:33
-!- janem( has joined #tryton23:39
-!- trilliji( has joined #tryton23:58

Generated by 2.11.0 by Marius Gedminas - find it at!