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:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
6539
查看
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" />
| 相关帖文 | 回复 | 查看 | 活动 | |
|---|---|---|---|---|
|
|
1
3月 15
|
3813 | ||
|
|
0
3月 15
|
3935 | ||
|
|
3
7月 25
|
9501 | ||
|
|
1
5月 25
|
1701 | ||
|
|
0
1月 24
|
2341 |