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 #tryton00:04
-!- srgdts_(~srgdts@unaffiliated/srgdts) has joined #tryton03:04
-!- thaneor(~acer8@r167-61-82-147.dialup.adsl.anteldata.net.uy) has joined #tryton03:04
-!- thaneor2(~ldlc6@r167-61-82-147.dialup.adsl.anteldata.net.uy) has joined #tryton04:04
-!- Timitos(~kpreisler@2001:a61:42d:c01:762b:62ff:fe84:ed7e) has joined #tryton07:04
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton08:04
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton08:04
-!- nicoe(~nicoe@2a02:578:852a:c00:224:9bff:fe6c:a1b2) has joined #tryton08:04
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:04
-!- ludo2(~Thunderbi@2001:912:1480:380::1) has joined #tryton09:04
-!- alidipatrick(~alidipatr@154.126.11.245) has joined #tryton11:04
-!- alidipatrick(~alidipatr@154.126.11.245) has joined #tryton11:04
mrichezhi, did an on_change_with which return nothing resets default value on a field ?13:04
cedkmrichez: yes13:04
-!- mariomop(~quassel@181.29.189.235) has joined #tryton13:04
nicoeA function that returns nothing in python really returns None in fact13:04
mrichezso default value in a field would be erased ?13:04
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 return13:04
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 value13:04
cedkmrichez: not it will not. That's why I say that on_change_with is not good for such use case13:04
mrichezcedk: ok, so i have to apply also for shipment_method (i did only for invoice_method)13:04
cedkor you have to return the original value but this is weird13:04
mrichezcedk: ok, understood13:04
mrichezcedk: will work with on_change instead of on_change_with13:04
mrichezpractical question: how to do when this line is outside the 80cols : self.sale_shipment_method = self.shipment_party.sale_shipment_method13:04
mrichezdefining a variable for "self.shipment_party.sale_shipment_method" to have a shorter sentence ?13:04
mrichezor using self.sale_shipment_method = (13:04
mrichez           and another line with :        self.shipment_party.sale_shipment_method)13:04
cedkthere is no definitive answer13:04
cedkusing a variable may be good if it is used multiple times13:04
cedkusing parenthesis is not wrong13:04
mrichezcedk: thanks14:04
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton14:04
mrichezone more question: how to merge 2 issues ? can i just add second issue in review description ?14:04
cedkmrichez: yes14:04
mrichezcedk: ok, done :-)14:04
-!- ludo2(~Thunderbi@221.114.141.88.rev.sfr.net) has joined #tryton14:04
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton14:04
-!- thaneor1(~ldlc6@r167-61-182-40.dialup.adsl.anteldata.net.uy) has joined #tryton16:04
-!- thaneor3(~acer8@r167-61-182-40.dialup.adsl.anteldata.net.uy) has joined #tryton16:04
-!- lucascastro(~lucascast@177-185-133-170.dynamic.isotelco.net.br) has joined #tryton16:04
-!- alidipatrick(~alidipatr@154.126.11.245) has joined #tryton17:04
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton17:04
-!- ludo3(~Thunderbi@221.114.141.88.rev.sfr.net) has joined #tryton17:04
-!- alidipatrick(~alidipatr@197.149.29.79) has joined #tryton18:04
-!- ludo3(~Thunderbi@2001:912:1480:380::1) has joined #tryton18:04
-!- alidipatrick(~alidipatr@197.149.29.79) has joined #tryton19:04
-!- alidipatrick(~alidipatr@154.126.11.41) has joined #tryton23:04
-!- alidipatrick(~alidipatr@154.126.11.83) has joined #tryton23:04
-!- thaneor(~acer8@r167-61-182-40.dialup.adsl.anteldata.net.uy) has joined #tryton23:04

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