IRC logs of #tryton for Friday, 2022-11-04

irc.libera.chat #tryton log beginning Fri Nov 4 12:00:01 AM CET 2022
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:04
-!- ChanServ changed mode/#tryton -> +o cedk 00:04
-!- springwurm(~springwur@5.104.149.54) has joined #tryton06:31
LordVanhi. I have a question: I was considering making the shipment out lines editable in the tree view. but is it possible to do that per column too?07:10
LordVanthe way I understand https://docs.tryton.org/projects/server/en/latest/topics/views/index.html editable="1" on the tree tag would make everything editable?07:11
LordVanthe only way I could imagnine this work would be <tree editable="1" ..> <field readonly="1" name="bla" /> <field name="foo" /> </tree>07:12
LordVanis that the correct way to do this?07:12
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton07:39
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton07:58
-!- ChanServ changed mode/#tryton -> +o cedk 07:58
-!- htgoebel(~hartmut@p200300d5df122d008f20b09c4eeec113.dip0.t-ipconnect.de) has joined #tryton08:08
-!- htgoebel(~hartmut@p200300d5df122d008f20b09c4eeec113.dip0.t-ipconnect.de) has left #tryton08:08
-!- rpit(~rpit@p200300c88f3b7e00ca0d9a1455ec95df.dip0.t-ipconnect.de) has joined #tryton08:13
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton08:28
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton09:01
mrichezhi, i need to hide a field on move treeview in Supplier Shipment Form view. From yesterday discuss on irc, i could use view_attributes to hide field with tree_invisible depending on context. 09:32
mrichezSo where defining context on supplier_shipment model ? setup method ?09:33
pokoliLordVan: once the view is editable any editalbe field will be writtable09:51
pokolimrichez: the context can be defined on the action window09:52
LordVanpokoli, so i cannot use the field tag to make it readonly in the tree view?09:52
pokoliLordVan: yes you can 09:54
mrichezpokoli: thanks!09:54
pokoliLordVan: but is better to set readonly on models so it is updated to any views09:54
LordVanwell i want it updateable in th detail view09:55
LordVanjust not in the treeview to avoid some user errors /accidents ^^09:55
pokoliLordVan: there is no concept of updatable. If the user is allowed to create on the one2many it will be able to create new records on the editable view09:56
LordVanhm09:56
LordVanok I might leave it without doing that then 09:57
LordVanfor the time being09:57
LordVanthanks09:59
LordVanone thing though .. i thought there was a "creatable" attribute on tree to decide if records can be created . no?10:00
mrichezpokoli: should a context_model always having a form ? i just need to define a boolean field to true10:10
pokolimrichez: not context_model but just context field on action window: https://hg.tryton.org/modules/account_invoice/file/06b657529465/invoice.xml#l4810:22
pokoliit will be great if the action documentation is improved to explain such feature10:22
pokoliLordVan: yes, it was added on 6.4: https://docs.tryton.org/projects/server/en/latest/releases.html#version-6-4-0-2022-05-0210:23
pokoliLordVan: https://docs.tryton.org/projects/server/en/latest/topics/views/index.html#id210:23
mrichezpokoli: ok :-)10:24
mrichezpokoli: did an eval take care of context values ? 10:59
mrichezpokoli: i define: <field name="context" eval="{'shipment_in': True}" pyson="1"/>11:00
mrichezpokoli: and my view_attributes is : return super().view_attributes() + [('/tree/button[@name="update_quantity_wizard"]', 'tree_invisible', Eval('shipment_in', False)),]11:01
mrichezpokoli: but it seems not working11:01
cedkmrichez: it does but as 'context'11:56
mrichezcedk: so what's wrong with my example ?11:57
mrichezcedk: so i should doing this: Get(Eval('context', {}), 'shipment_in', False))12:01
cedkmrichez: normally yes12:29
mrichezcedk: hum... not working... i'll explain my problem on discuss...12:36
cedkmrichez: indeed looking in tryton/tryton/gui/window/view_form/view/list.py the screen context is directly the PYSONDecoder so it is directly the context that is evaluated13:11
-!- springwurm(~springwur@2a01:76c0:302:ab00::39b) has joined #tryton13:11
mrichezcedk: i put the problem on discuss: https://discuss.tryton.org/t/hiding-column-in-treeview-on-specific-model/5672/113:16
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton13:16
-!- springwurm(~springwur@5.104.149.54) has joined #tryton13:21
-!- rmu(~robert@cpe90-146-68-21.liwest.at) has joined #tryton15:39

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