Hi all,
How can i store a Many2many field in res.config.settings in odoo 13.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- सीआरएम
- e-Commerce
- लेखांकन
- इन्वेंटरी
- PoS
- Project
- MRP
This question has been flagged
Hi,
Try refer following blog
https://www.cybrosys.com/blog/how-to-save-many2many-field-in-odoo-13-settings
Regards
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
3
अग॰ 23
|
10357 | ||
|
1
फ़र॰ 21
|
3675 | ||
|
2
सित॰ 21
|
8694 | ||
|
0
मार्च 21
|
2292 | ||
|
1
अग॰ 18
|
5227 |