IRC logs of #tryton for Wednesday, 2017-02-22

chat.freenode.net #tryton log beginning Wed Feb 22 00:00:01 CET 2017
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:34
-!- perilla(~perilla@corp-190-57-169-210.cue.puntonet.ec) has joined #tryton00:44
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:52
-!- woakas2(~woakas@static.15.240.46.78.clients.your-server.de) has joined #tryton03:58
-!- dj_xatra(~dj_xatra@217.166.83.130) has joined #tryton07:21
-!- JanGB(~jan@ip92343817.dynamic.kabel-deutschland.de) has joined #tryton07:53
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton08:53
-!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton08:58
-!- udono(~udono@075-058-210-188.ip-addr.inexio.net) 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(~ldlc6@r167-56-170-211.dialup.adsl.anteldata.net.uy) has joined #tryton09:32
-!- janem(~stianaurd@cm-84.210.170.111.getinternet.no) has joined #tryton09:37
-!- rpit(~rpit@aftr-37-24-151-21.unity-media.net) has joined #tryton10:20
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton10:36
-!- janem(~stianaurd@cm-84.210.170.111.getinternet.no) has joined #tryton11:31
-!- mariomop(~quassel@host49.186-108-113.telecom.net.ar) has joined #tryton12:21
-!- mariomop(~quassel@host49.186-108-113.telecom.net.ar) has joined #tryton12:37
-!- smarro(~sebastian@cust-102-46-13-200.trynet.com.ar) has joined #tryton12:53
-!- JanGB(~jan@ip92343817.dynamic.kabel-deutschland.de) has joined #tryton12:56
-!- janem(~stianaurd@cm-84.210.170.111.getinternet.no) 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@201.209.41.227) 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 https://bugs.tryton.org/issue620613:46
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(~sebastian@cust-226-46-13-200.trynet.com.ar) has joined #tryton14:19
-!- alexbodn(~alex@213.57.190.189) 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 self.xxx and returning self.xxx.state15:17
mrichezwhat about if self.xxx is false ?15:18
mrichezmethod is linked to a selection inside a function field15:19
-!- csotelo_at_work(~csotelo@179.43.99.44) 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 : http://hg.tryton.org/modules/purchase/file/tip/purchase.py#l120715:21
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 https://bugs.tryton.org/issue622615:22
mrichezpokoli: so the if test is unnecessary ?15:22
pokolimrichez: no, because for on_change the purchase must have a none value15:23
pokolis/must/may15: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(~karla@r190-134-202-96.dialup.adsl.anteldata.net.uy) 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: https://bugs.tryton.org/issue583518:30
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 entrypoint.sh 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(~anthony@4dae0c97.ftth.telfortglasvezel.nl) 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(~sebastian@cust-127-46-13-200.trynet.com.ar) has joined #tryton19:48
-!- sleepdead(~morato@189-12-129-136.user.veloxzone.com.br) 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(~jan@ip92343817.dynamic.kabel-deutschland.de) has joined #tryton21:08
cedksleepdead: indeed the best is to use what you already know21:14
-!- smarro(~sebastian@cust-123-46-13-200.trynet.com.ar) has joined #tryton21:28
-!- thaneor1(~ldlc6@179.26.129.131) 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(~trilliji@cpe-67-255-39-42.stny.res.rr.com) has joined #tryton22:35
-!- janem(~stianaurd@cm-84.210.170.111.getinternet.no) has joined #tryton22:37
-!- trilliji(~trilliji@cpe-67-255-39-42.stny.res.rr.com) has joined #tryton23:12
-!- JosDzG(~Thunderbi@187.188.72.36) has joined #tryton23:33
-!- janem(~stianaurd@cm-84.210.170.111.getinternet.no) has joined #tryton23:39
-!- trilliji(~trilliji@cpe-67-255-39-42.stny.res.rr.com) has joined #tryton23:58

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!