Does anyone know how to make a one2many tree to add attachments?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
1
Reply
5902
Views
ODOO 13
Model:
class MrpBomLine (models.Model): _inherit = 'mrp.bom' bom_file_ids = fields.One2many ("ir.attachment", "res_id")
View:
<field name = "bom_file_ids" widget = "one2many" nolabel = "1" mode = "tree"> <tree string = "BOMFiles" editable = "bottom"> <field name = "create_date" /> <field name = "name" /> </tree> </field>
This will give you a basic list view ... To attach files I am using a button like this:
< widget name = "attach_document" string = "Attach BOM Excel File" action = "message_post" />
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 | |
---|---|---|---|---|
|
1
Mar 15
|
3103 | ||
|
0
Mar 15
|
3371 | ||
|
1
May 25
|
800 | ||
|
0
Jan 24
|
1563 | ||
|
2
May 23
|
8437 |