IRC logs of #tryton for Friday, 2021-04-02

chat.freenode.net #tryton log beginning Fri Apr 2 12:00:01 AM CEST 2021
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton22:54
-!- srgdts_(~srgdts@unaffiliated/srgdts) has joined #tryton01:55
-!- thaneor(~acer8@r167-61-82-147.dialup.adsl.anteldata.net.uy) has joined #tryton01:59
-!- thaneor2(~ldlc6@r167-61-82-147.dialup.adsl.anteldata.net.uy) has joined #tryton02:01
-!- Timitos(~kpreisler@2001:a61:42d:c01:762b:62ff:fe84:ed7e) has joined #tryton05:37
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton06:02
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton06:14
-!- nicoe(~nicoe@2a02:578:852a:c00:224:9bff:fe6c:a1b2) has joined #tryton06:55
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton07:24
-!- ludo2(~Thunderbi@2001:912:1480:380::1) has joined #tryton07:38
-!- alidipatrick(~alidipatr@154.126.11.245) has joined #tryton09:37
-!- alidipatrick(~alidipatr@154.126.11.245) has joined #tryton09:46
mrichezhi, did an on_change_with which return nothing resets default value on a field ?11:21
cedkmrichez: yes11:22
-!- mariomop(~quassel@181.29.189.235) has joined #tryton11:22
nicoeA function that returns nothing in python really returns None in fact11:22
mrichezso default value in a field would be erased ?11:23
mrichezmy example is on a sale, i've a default shipment_method. I define an on_change_with on the field shipment_method : if party with shipment_method then return party.shipment_method - No other return11:25
mrichezin test scenario, i create a Sale with a customer which has no shipment_method defined, so i expect the sale will stay with the default shipment_method value11:26
cedkmrichez: not it will not. That's why I say that on_change_with is not good for such use case11:26
mrichezcedk: ok, so i have to apply also for shipment_method (i did only for invoice_method)11:27
cedkor you have to return the original value but this is weird11:27
mrichezcedk: ok, understood11:27
mrichezcedk: will work with on_change instead of on_change_with11:28
mrichezpractical question: how to do when this line is outside the 80cols : self.sale_shipment_method = self.shipment_party.sale_shipment_method11:35
mrichezdefining a variable for "self.shipment_party.sale_shipment_method" to have a shorter sentence ?11:36
mrichezor using self.sale_shipment_method = (11:37
mrichez           and another line with :        self.shipment_party.sale_shipment_method)11:37
cedkthere is no definitive answer11:45
cedkusing a variable may be good if it is used multiple times11:45
cedkusing parenthesis is not wrong11:45
mrichezcedk: thanks12:06
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton12:06
mrichezone more question: how to merge 2 issues ? can i just add second issue in review description ?12:08
cedkmrichez: yes12:18
mrichezcedk: ok, done :-)12:18
-!- ludo2(~Thunderbi@221.114.141.88.rev.sfr.net) has joined #tryton12:22
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton12:52
-!- thaneor1(~ldlc6@r167-61-182-40.dialup.adsl.anteldata.net.uy) has joined #tryton14:02
-!- thaneor3(~acer8@r167-61-182-40.dialup.adsl.anteldata.net.uy) has joined #tryton14:03
-!- lucascastro(~lucascast@177-185-133-170.dynamic.isotelco.net.br) has joined #tryton14:28
-!- alidipatrick(~alidipatr@154.126.11.245) has joined #tryton15:30
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton15:51
-!- ludo3(~Thunderbi@221.114.141.88.rev.sfr.net) has joined #tryton15:58
-!- alidipatrick(~alidipatr@197.149.29.79) has joined #tryton16:49
-!- ludo3(~Thunderbi@2001:912:1480:380::1) has joined #tryton16:55
-!- alidipatrick(~alidipatr@197.149.29.79) has joined #tryton17:24
-!- alidipatrick(~alidipatr@154.126.11.41) has joined #tryton21:02
-!- alidipatrick(~alidipatr@154.126.11.83) has joined #tryton21:19
-!- thaneor(~acer8@r167-61-182-40.dialup.adsl.anteldata.net.uy) has joined #tryton21:50

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!