Hi all,
How can i store a Many2many field in res.config.settings in odoo 13.
To pytanie dostało ostrzeżenie
Hi,
Try refer following blog
https://www.cybrosys.com/blog/how-to-save-many2many-field-in-odoo-13-settings
Hope it helps
Hello Frodo Baggins,
Suppose xyz named object is available and set M2M in res.config.settings object.
class ResConfigSettings (models.TransientModel):
_inherit = 'res.config.settings'
xyz_id = fields.Many2one ('xyz')
xyz_ids = fields.Many2many (
'xyz',
'xyz_res_config_settings_rel',
'xyz table's field ',
'xyz_id')
note: Many2many field can't see in database.
Regards,
Email: odoo@aktivsoftware.com
res.config.settings is a transient model so we could not store anything in it.
you have to make m2m field either compute filed with inverse or related field.
https://github.com/odoo/odoo/blob/13.0/addons/crm/models/res_config_settings.py#L24
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
|
3
lip 23
|
12368 | ||
|
|
1
lut 21
|
5467 | ||
|
|
2
wrz 21
|
10945 | ||
|
|
0
mar 21
|
3680 | ||
|
|
1
sie 18
|
7061 |