chat.freenode.net #tryton log beginning Thu Apr 22 12:00:01 AM CEST 2021 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 22:53 | |
-!- udono(~udono@098-131-067-156.ip-addr.inexio.net) has joined #tryton | 00:28 | |
-!- thaneor2(~ldlc6@r167-61-68-88.dialup.adsl.anteldata.net.uy) has joined #tryton | 00:45 | |
-!- thaneor3(~acer8@r167-61-68-88.dialup.adsl.anteldata.net.uy) has joined #tryton | 00:46 | |
-!- udono(~udono@098-131-067-156.ip-addr.inexio.net) has joined #tryton | 04:07 | |
-!- springwurm(~springwur@5.104.149.54) has joined #tryton | 05:07 | |
-!- Timitos(~kpreisler@2001:a61:482:eb01:762b:62ff:fe84:ed7e) has joined #tryton | 05:28 | |
-!- LordVan(~LordVAn@gentoo/developer/LordVan) has joined #tryton | 05:37 | |
LordVan | hi | 05:37 |
---|---|---|
LordVan | I 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 |
LordVan | what is wrong with fields.One2Many('party.party', 'contacts', 'Sale contacts') ? | 05:39 |
pokoli | LordVan: did you have a contacts field in party ? | 05:43 |
LordVan | no | 05:44 |
LordVan | ah | 05:44 |
LordVan | ACTION re-reads one2many code | 05:44 |
LordVan | i thought this might get added automatically | 05:45 |
LordVan | so i need to add a field for Party too like filed.Many2One('sale.sale.extra_contacts') | 05:47 |
LordVan | (ignore the typo) | 05:48 |
pokoli | LordVan: yes, you need to manually add the field used to fill the relation | 06:09 |
LordVan | yeah that seems to have been my mistake | 06:09 |
LordVan | thanks for pointing that out | 06:09 |
LordVan | she the Many2One should be fine the way i put it above (minus the typo) right? | 06:25 |
pokoli | LordVan: that was easy to spot ;-) | 06:25 |
pokoli | LordVan: for Many2One you need at least two arguments: The model name to point at and the label of the field | 06:26 |
LordVan | ah yes the name | 06:26 |
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton | 06:28 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 06:41 | |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 06:52 | |
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton | 07:02 | |
-!- ludo2(~Thunderbi@2001:912:1480:380::1) has joined #tryton | 07:43 | |
-!- LordVan(~LordVAn@gentoo/developer/LordVan) has joined #tryton | 10:11 | |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 10:18 | |
-!- mariomop(~quassel@181.29.189.235) has joined #tryton | 11:12 | |
-!- springwurm(~springwur@5.104.149.54) has joined #tryton | 12:37 | |
-!- thaneor(~acer8@r167-61-88-128.dialup.adsl.anteldata.net.uy) has joined #tryton | 12:49 | |
-!- 32NAABDS9(~ldlc6@r167-61-88-128.dialup.adsl.anteldata.net.uy) has joined #tryton | 13:05 | |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 13:05 | |
-!- ludo2(~Thunderbi@2001:912:1480:380::1) has joined #tryton | 13:05 | |
-!- Timitos(~kpreisler@2001:a61:482:eb01:762b:62ff:fe84:ed7e) has joined #tryton | 13:05 | |
-!- udono(~udono@098-131-067-156.ip-addr.inexio.net) has joined #tryton | 13:05 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 14:22 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:224:9bff:fe6c:a1b2) has joined #tryton | 14:45 | |
-!- cryptic(~cryptic@142-196-139-017.res.spectrum.com) has joined #tryton | 14:46 | |
-!- ludo2(~Thunderbi@221.114.141.88.rev.sfr.net) has joined #tryton | 15:04 | |
-!- ludo2(~Thunderbi@2001:912:1480:380::1) has joined #tryton | 15:22 | |
-!- springwurm_(~springwur@5.104.149.54) has joined #tryton | 16:28 | |
-!- jcm_(~jcm@78.194.214.1) has joined #tryton | 17:43 | |
-!- thaneor(~acer8@r167-61-88-128.dialup.adsl.anteldata.net.uy) has joined #tryton | 17:55 | |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 19:34 | |
-!- lucascastro(~lucascast@177-185-139-167.dynamic.isotelco.net.br) has joined #tryton | 20:03 | |
-!- lucas_(~lucascast@177.185.139.167) has joined #tryton | 20:16 | |
-!- lucas_(~lucascast@177.185.139.167) has joined #tryton | 20:18 | |
-!- lucascastro(~lucascast@177-185-139-167.dynamic.isotelco.net.br) has joined #tryton | 20:20 | |
-!- LordVan(~lordvan@gentoo/developer/LordVan) has joined #tryton | 20:29 | |
LordVan | hi | 20:30 |
LordVan | I've got a question regarding a view for Many2One / One2Many | 20:31 |
LordVan | I added extra_contacts = fields.One2Many('party.party', 'sale_contacts', 'Sale Contacts', ..) to Sale and sale_contacts = fields.Many2One('sale.sale', 'Sale', ondelete = 'RESTRICT') to Party | 20:32 |
LordVan | now i wanted to show this on a new tab on the sale form | 20:32 |
LordVan | so I added a <page string="Contacts" col="2" id="extra_contacts"><label name=" ... > <field ..> </page> in the notebook | 20:34 |
LordVan | but what I get is basically an empty list with a button to add a new party | 20:34 |
LordVan | but i want to be able to add existing parties here | 20:34 |
LordVan | how would i best go about this? | 20:35 |
LordVan | I can add contacts using proteus of course but i am unsure how to best do this in the UI | 20:44 |
LordVan | i think i am doing this view wrong actually | 20:47 |
LordVan | as 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 |
LordVan | I am wondering now .. am I doing this "the wrong way" ? should I do something similar like party_relation but for sale -> party instead? hmm | 20:50 |
cedk | LordVan: it is a Many2Many and not a One2Many that you describe | 21:57 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!