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:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
3
thg 8 23
|
10387 | ||
|
1
thg 2 21
|
3692 | ||
|
2
thg 9 21
|
8716 | ||
|
0
thg 3 21
|
2300 | ||
|
1
thg 8 18
|
5245 |