IRC logs of #tryton for Thursday, 2021-04-22

chat.freenode.net #tryton log beginning Thu Apr 22 12:00:01 AM CEST 2021
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton22:53
-!- udono(~udono@098-131-067-156.ip-addr.inexio.net) has joined #tryton00:28
-!- thaneor2(~ldlc6@r167-61-68-88.dialup.adsl.anteldata.net.uy) has joined #tryton00:45
-!- thaneor3(~acer8@r167-61-68-88.dialup.adsl.anteldata.net.uy) has joined #tryton00:46
-!- udono(~udono@098-131-067-156.ip-addr.inexio.net) has joined #tryton04:07
-!- springwurm(~springwur@5.104.149.54) has joined #tryton05:07
-!- Timitos(~kpreisler@2001:a61:482:eb01:762b:62ff:fe84:ed7e) has joined #tryton05:28
-!- LordVan(~LordVAn@gentoo/developer/LordVan) has joined #tryton05:37
LordVanhi05:37
LordVanI was trying to add a One2Many field to sale so I can have multiple contacts but somehow I seem to be misunderstanding something there how it is supposed to work ..05:38
LordVanwhat is wrong with fields.One2Many('party.party', 'contacts', 'Sale contacts') ?05:39
pokoliLordVan: did you have a contacts field in party ?05:43
LordVanno05:44
LordVanah05:44
LordVanACTION re-reads one2many code05:44
LordVani thought this might get added automatically05:45
LordVanso i need to add a field for Party too like filed.Many2One('sale.sale.extra_contacts')05:47
LordVan(ignore the typo)05:48
pokoliLordVan: yes, you need to manually add the field used to fill the relation06:09
LordVanyeah that seems to have been my mistake06:09
LordVanthanks for pointing that out06:09
LordVanshe the Many2One should be fine the way i put it above (minus the typo) right?06:25
pokoliLordVan: that was easy to spot ;-)06:25
pokoliLordVan: for Many2One you need at least two arguments: The model name to point at and the label of the field06:26
LordVanah yes the name06:26
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton06:28
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton06:41
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton06:52
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton07:02
-!- ludo2(~Thunderbi@2001:912:1480:380::1) has joined #tryton07:43
-!- LordVan(~LordVAn@gentoo/developer/LordVan) has joined #tryton10:11
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton10:18
-!- mariomop(~quassel@181.29.189.235) has joined #tryton11:12
-!- springwurm(~springwur@5.104.149.54) has joined #tryton12:37
-!- thaneor(~acer8@r167-61-88-128.dialup.adsl.anteldata.net.uy) has joined #tryton12:49
-!- 32NAABDS9(~ldlc6@r167-61-88-128.dialup.adsl.anteldata.net.uy) has joined #tryton13:05
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton13:05
-!- ludo2(~Thunderbi@2001:912:1480:380::1) has joined #tryton13:05
-!- Timitos(~kpreisler@2001:a61:482:eb01:762b:62ff:fe84:ed7e) has joined #tryton13:05
-!- udono(~udono@098-131-067-156.ip-addr.inexio.net) has joined #tryton13:05
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton14:22
-!- nicoe(~nicoe@2a02:578:852a:c00:224:9bff:fe6c:a1b2) has joined #tryton14:45
-!- cryptic(~cryptic@142-196-139-017.res.spectrum.com) has joined #tryton14:46
-!- ludo2(~Thunderbi@221.114.141.88.rev.sfr.net) has joined #tryton15:04
-!- ludo2(~Thunderbi@2001:912:1480:380::1) has joined #tryton15:22
-!- springwurm_(~springwur@5.104.149.54) has joined #tryton16:28
-!- jcm_(~jcm@78.194.214.1) has joined #tryton17:43
-!- thaneor(~acer8@r167-61-88-128.dialup.adsl.anteldata.net.uy) has joined #tryton17:55
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton19:34
-!- lucascastro(~lucascast@177-185-139-167.dynamic.isotelco.net.br) has joined #tryton20:03
-!- lucas_(~lucascast@177.185.139.167) has joined #tryton20:16
-!- lucas_(~lucascast@177.185.139.167) has joined #tryton20:18
-!- lucascastro(~lucascast@177-185-139-167.dynamic.isotelco.net.br) has joined #tryton20:20
-!- LordVan(~lordvan@gentoo/developer/LordVan) has joined #tryton20:29
LordVanhi20:30
LordVanI've got a question regarding a view for Many2One / One2Many20:31
LordVanI added extra_contacts = fields.One2Many('party.party', 'sale_contacts', 'Sale Contacts', ..) to Sale and sale_contacts = fields.Many2One('sale.sale', 'Sale', ondelete = 'RESTRICT') to Party20:32
LordVannow i wanted to show this on a new tab on the sale form20:32
LordVanso I added a <page string="Contacts" col="2" id="extra_contacts"><label name=" ... > <field ..> </page> in the notebook20:34
LordVanbut what I get is basically an empty list with a button to add a new party20:34
LordVanbut i want to be able to add existing parties here20:34
LordVanhow would i best go about this?20:35
LordVanI can add contacts using proteus of course but i am unsure how to best do this in the UI20:44
LordVani think i am doing this view wrong actually20:47
LordVanas i want to be able to just link to existing records (and psosibly add new ones if they do not exist) .. but if i do it like this all i can do is add new parties  .. and delete them too (i do not want the users to be able to delete from here .. just remove the "link")20:47
LordVanI am wondering now .. am I doing this "the wrong way" ? should I do something similar like party_relation but for sale -> party instead? hmm20:50
cedkLordVan: it is a Many2Many and not a One2Many that you describe21:57

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