Does anyone know how to make a one2many tree to add attachments?
คำถามนี้ถูกตั้งค่าสถานะ
1
ตอบกลับ
7871
มุมมอง
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" />
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อ| Related Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
|---|---|---|---|---|
|
|
1
มี.ค. 15
|
4747 | ||
|
|
0
มี.ค. 15
|
5092 | ||
|
|
0
พ.ค. 26
|
2 | ||
|
|
0
เม.ย. 26
|
2 | ||
|
|
0
มี.ค. 26
|
13 |