chat.freenode.net #tryton log beginning Mon Mar 8 12:00:01 AM CET 2021 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 23:09 | |
-!- srgdts_(~srgdts@unaffiliated/srgdts) has joined #tryton | 02:12 | |
-!- noosanon(uid489102@gateway/web/irccloud.com/x-dvjiaqnwytybmvvl) has joined #tryton | 05:24 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 05:58 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton | 06:37 | |
-!- Timitos(~kpreisler@2001:a61:42d:c01:762b:62ff:fe84:ed7e) has joined #tryton | 06:52 | |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 07:27 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 08:06 | |
-!- udono(~udono@157-058-210-188.ip-addr.inexio.net) has joined #tryton | 09:17 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 09:47 | |
-!- thaneor2(~acer8@r167-61-18-64.dialup.adsl.anteldata.net.uy) has joined #tryton | 09:51 | |
-!- thaneor3(~ldlc6@r167-61-18-64.dialup.adsl.anteldata.net.uy) has joined #tryton | 09:52 | |
-!- mariomop(~quassel@181.29.189.235) has joined #tryton | 10:42 | |
mrichez | Hi, 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#l12 | 11:47 |
---|---|---|
mrichez | as they are redefined inside each class | 11:47 |
udono | mrichez: IMHO it looks like you found duplicated code | 12:19 |
mrichez | udono: my thought too :-) | 12:19 |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 13:04 | |
pokoli | mrichez: the method is declared outside of the class because it is reused on both classes | 13:25 |
pokoli | mrichez: so the method inside the configuration class is duplicated | 13:25 |
pokoli | mrichez: it will be great if you can submit a patch to remove them :) | 13:25 |
mrichez | pokoli: :-) | 13:25 |
mrichez | pokoli: 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#l18 | 13:28 |
pokoli | mrichez: no, because the field name is fixed on the groping modules | 13:29 |
pokoli | mrichez: on the sale example the field to be computed changes depending on the field_name argument | 13:29 |
pokoli | the method returns another method because the method is diferent depending on the field_name | 13:29 |
mrichez | pokoli: ok | 13:29 |
mrichez | in 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 #tryton | 15:39 | |
pokoli | mrichez: you can use view_attributes to only include the xpath when the module is activated | 15:53 |
-!- rpit1(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 15:53 | |
pokoli | mrichez: are you facing this problem with tryton standard modules? or two custom modules? | 15:53 |
mrichez | pokoli: 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 |
mrichez | pokoli: this issue https://bugs.tryton.org/issue10160 | 15:56 |
pokoli | I see, so we have two modules that do not depend on each other but you want to have the separator to include them | 15:57 |
pokoli | mrichez: 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 after | 15:58 |
mrichez | pokoli: both are standard modules :-) | 15:58 |
mrichez | pokoli: but not mandatory | 15:59 |
pokoli | mrichez: another option is to just remove the shipment separator | 16:04 |
pokoli | mrichez: I mean moved to the sale module (which is the one that both modules share in common) | 16:05 |
mrichez | pokoli: but separator will be empty until i activate sale_shipment_cost or sale_shipment_grouping ? | 16:07 |
pokoli | mrichez: this is currently implemented only for notebook pages, but I imagine we can implement the same for separators | 16:08 |
pokoli | for me it does not make sense to have a separator without any other field latter | 16:08 |
mrichez | pokoli: indeed | 16:09 |
pokoli | mrichez: this is the code that remove the empty pages https://hg.tryton.org/trytond/file/5797b992383d/trytond/model/modelview.py#l504 | 16:10 |
mrichez | pokoli: such code could be then implemented for separator ? | 16:11 |
mrichez | as separator is at the same level than fields | 16:12 |
pokoli | mrichez: no, we should use a diferent xpath that picks separator s without following nodes | 16:12 |
mrichez | pokoli: feature request ? | 16:13 |
pokoli | mrichez: yes, it's a new feature | 16:13 |
mrichez | pokolli: ok, i'll create then... | 16:14 |
pokoli | mrichez: 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 further | 16:14 |
mrichez | pokoli: ok, that 'll be a discuss.. but for tomorrow.. i had to leave now | 16:15 |
pokoli | mrichez: just take your time no hurries. I read you tomorrow on discuss :) | 16:16 |
mrichez | pokoli: :-) | 16:16 |
-!- thaneor(~acer8@r167-61-166-131.dialup.adsl.anteldata.net.uy) has joined #tryton | 21:54 | |
-!- thaneor1(~ldlc6@r167-61-166-131.dialup.adsl.anteldata.net.uy) has joined #tryton | 21:55 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!