IRC logs of #tryton for Monday, 2021-03-08

chat.freenode.net #tryton log beginning Mon Mar 8 12:00:01 AM CET 2021
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:09
-!- srgdts_(~srgdts@unaffiliated/srgdts) has joined #tryton02:12
-!- noosanon(uid489102@gateway/web/irccloud.com/x-dvjiaqnwytybmvvl) has joined #tryton05:24
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton05:58
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton06:37
-!- Timitos(~kpreisler@2001:a61:42d:c01:762b:62ff:fe84:ed7e) has joined #tryton06:52
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton07:27
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:06
-!- udono(~udono@157-058-210-188.ip-addr.inexio.net) has joined #tryton09:17
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton09:47
-!- thaneor2(~acer8@r167-61-18-64.dialup.adsl.anteldata.net.uy) has joined #tryton09:51
-!- thaneor3(~ldlc6@r167-61-18-64.dialup.adsl.anteldata.net.uy) has joined #tryton09:52
-!- mariomop(~quassel@181.29.189.235) has joined #tryton10:42
mrichezHi, wondering the use of the methods defined here : https://hg.tryton.org/modules/sale_shipment_grouping/file/default/configuration.py#l12    and here: http://hg.tryton.org/modules/sale_invoice_grouping/file/default/configuration.py#l1211:47
mrichezas they are redefined inside each class11:47
udonomrichez: IMHO it looks like you found duplicated code12:19
mrichezudono: my thought too :-)12:19
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton13:04
pokolimrichez: the method is declared outside of the class because it is reused on both classes13:25
pokolimrichez: so the method inside the configuration class is duplicated13:25
pokolimrichez: it will be great if you can submit a patch to remove them :)13:25
mrichezpokoli: :-)13:25
mrichezpokoli: but method outside the class should be a method with a method inside like for sale: https://hg.tryton.org/modules/sale/file/tip/configuration.py#l1813:28
pokolimrichez: no, because the field name is fixed on the groping modules13:29
pokolimrichez: on the sale example the field to be computed changes depending on the field_name argument13:29
pokolithe method returns another method because the method is diferent depending on the field_name13:29
mrichezpokoli: ok13:29
mrichezin xpath is it possible to create a node conditionally ? i mean one tryton module adds a separator in a tab, in another module i would add a field under this separator but those modules are not dependent. How to check if this separator exists to add my field after this separator ?15:35
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton15:39
pokolimrichez: you can use view_attributes to only include the xpath when the module is activated15:53
-!- rpit1(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton15:53
pokolimrichez: are you facing this problem with tryton standard modules? or two custom modules?15:53
mrichezpokoli: tryton standard modules: sale_shipment_grouping introduce a "shipment" separator in the "sale" tab on the party form, i would like to add sale_shipment_cost_method a this place (feature on sale_shipment_cost)15:55
mrichezpokoli: this issue https://bugs.tryton.org/issue1016015:56
pokoliI see, so we have two modules that do not depend on each other but you want to have the separator to include them15:57
pokolimrichez: probably the separator should be moved to standard module (so you can add after them), but then we need a way to remove separators that do not have any field after15:58
mrichezpokoli: both are standard modules :-)15:58
mrichezpokoli: but not mandatory15:59
pokolimrichez: another option is to just remove the shipment separator16:04
pokolimrichez: I mean moved to the sale module (which is the one that both modules share in common)16:05
mrichezpokoli: but separator will be empty until i activate sale_shipment_cost or sale_shipment_grouping ?16:07
pokolimrichez: this is currently implemented only for notebook pages, but I imagine we can implement the same for separators16:08
pokolifor me it does not make sense to have a separator without any other field latter16:08
mrichezpokoli: indeed16:09
pokolimrichez: this is the code that remove the empty pages https://hg.tryton.org/trytond/file/5797b992383d/trytond/model/modelview.py#l50416:10
mrichezpokoli: such code could be then implemented for separator ?16:11
mrichezas separator is at the same level than fields16:12
pokolimrichez: no, we should use a diferent xpath that picks separator s without following nodes16:12
mrichezpokoli: feature request ?16:13
pokolimrichez: yes, it's a new feature16:13
mrichezpokolli: ok, i'll create then...16:14
pokolimrichez: but my proposal it's just an Idea, don't kow if there is a better way to solve it. So probably better to discuss with the full context before going further16:14
mrichezpokoli: ok, that 'll be a discuss.. but for tomorrow.. i had to leave now16:15
pokolimrichez: just take your time no hurries. I read you tomorrow on discuss :)16:16
mrichezpokoli: :-)16:16
-!- thaneor(~acer8@r167-61-166-131.dialup.adsl.anteldata.net.uy) has joined #tryton21:54
-!- thaneor1(~ldlc6@r167-61-166-131.dialup.adsl.anteldata.net.uy) has joined #tryton21:55

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