Hi,
in my form i added two fields for attachment work but this code could not save two different attachement in each field, it just save automatically the same attachement in both of them. how plz can i resolve this.
this my code in .py :
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
in my form i added two fields for attachment work but this code could not save two different attachement in each field, it just save automatically the same attachement in both of them. how plz can i resolve this.
this my code in .py :
Hi Medmars,
Would this solve your problem?
Regards,
-make
identity_card= fields.Many2many(comodel_name="ir.attachment",
relation="m2m_ir_identity_card_rel",
column1="m2m_id",
column2="attachment_id",
string="Identity Card")
contract = fields.Many2many(comodel_name="ir.attachment",
relation="m2m_ir_contract_rel".
column1="m2m_id",
column2="attachment_id",
string="Contract")
<field name="identity_card" widget="many2many_binary"/>
<field name="contract" widget="many2many_binary"/>
Perfect answer ! Thanks
This man deserves Nobel prize :)
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 | |
---|---|---|---|---|
|
1
thg 9 20
|
10724 | ||
|
2
thg 7 25
|
4483 | ||
|
2
thg 12 24
|
7666 | ||
How to ORDER BY? [Odoo 10]
Đã xử lý
|
|
2
thg 11 24
|
28429 | |
|
2
thg 5 24
|
7399 |
This will give you solution https://www.odoo.com/apps/modules/10.0/max_base_multi_attachment/