chat.freenode.net #tryton log beginning Fri Apr 2 12:00:01 AM CEST 2021 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 22:54 | |
-!- srgdts_(~srgdts@unaffiliated/srgdts) has joined #tryton | 01:55 | |
-!- thaneor(~acer8@r167-61-82-147.dialup.adsl.anteldata.net.uy) has joined #tryton | 01:59 | |
-!- thaneor2(~ldlc6@r167-61-82-147.dialup.adsl.anteldata.net.uy) has joined #tryton | 02:01 | |
-!- Timitos(~kpreisler@2001:a61:42d:c01:762b:62ff:fe84:ed7e) has joined #tryton | 05:37 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 06:02 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton | 06:14 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:224:9bff:fe6c:a1b2) has joined #tryton | 06:55 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 07:24 | |
-!- ludo2(~Thunderbi@2001:912:1480:380::1) has joined #tryton | 07:38 | |
-!- alidipatrick(~alidipatr@154.126.11.245) has joined #tryton | 09:37 | |
-!- alidipatrick(~alidipatr@154.126.11.245) has joined #tryton | 09:46 | |
mrichez | hi, did an on_change_with which return nothing resets default value on a field ? | 11:21 |
---|---|---|
cedk | mrichez: yes | 11:22 |
-!- mariomop(~quassel@181.29.189.235) has joined #tryton | 11:22 | |
nicoe | A function that returns nothing in python really returns None in fact | 11:22 |
mrichez | so default value in a field would be erased ? | 11:23 |
mrichez | my 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 return | 11:25 |
mrichez | in 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 value | 11:26 |
cedk | mrichez: not it will not. That's why I say that on_change_with is not good for such use case | 11:26 |
mrichez | cedk: ok, so i have to apply also for shipment_method (i did only for invoice_method) | 11:27 |
cedk | or you have to return the original value but this is weird | 11:27 |
mrichez | cedk: ok, understood | 11:27 |
mrichez | cedk: will work with on_change instead of on_change_with | 11:28 |
mrichez | practical question: how to do when this line is outside the 80cols : self.sale_shipment_method = self.shipment_party.sale_shipment_method | 11:35 |
mrichez | defining a variable for "self.shipment_party.sale_shipment_method" to have a shorter sentence ? | 11:36 |
mrichez | or using self.sale_shipment_method = ( | 11:37 |
mrichez | and another line with : self.shipment_party.sale_shipment_method) | 11:37 |
cedk | there is no definitive answer | 11:45 |
cedk | using a variable may be good if it is used multiple times | 11:45 |
cedk | using parenthesis is not wrong | 11:45 |
mrichez | cedk: thanks | 12:06 |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 12:06 | |
mrichez | one more question: how to merge 2 issues ? can i just add second issue in review description ? | 12:08 |
cedk | mrichez: yes | 12:18 |
mrichez | cedk: ok, done :-) | 12:18 |
-!- ludo2(~Thunderbi@221.114.141.88.rev.sfr.net) has joined #tryton | 12:22 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 12:52 | |
-!- thaneor1(~ldlc6@r167-61-182-40.dialup.adsl.anteldata.net.uy) has joined #tryton | 14:02 | |
-!- thaneor3(~acer8@r167-61-182-40.dialup.adsl.anteldata.net.uy) has joined #tryton | 14:03 | |
-!- lucascastro(~lucascast@177-185-133-170.dynamic.isotelco.net.br) has joined #tryton | 14:28 | |
-!- alidipatrick(~alidipatr@154.126.11.245) has joined #tryton | 15:30 | |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 15:51 | |
-!- ludo3(~Thunderbi@221.114.141.88.rev.sfr.net) has joined #tryton | 15:58 | |
-!- alidipatrick(~alidipatr@197.149.29.79) has joined #tryton | 16:49 | |
-!- ludo3(~Thunderbi@2001:912:1480:380::1) has joined #tryton | 16:55 | |
-!- alidipatrick(~alidipatr@197.149.29.79) has joined #tryton | 17:24 | |
-!- alidipatrick(~alidipatr@154.126.11.41) has joined #tryton | 21:02 | |
-!- alidipatrick(~alidipatr@154.126.11.83) has joined #tryton | 21:19 | |
-!- thaneor(~acer8@r167-61-182-40.dialup.adsl.anteldata.net.uy) has joined #tryton | 21:50 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!