Does anyone know how to make a one2many tree to add attachments?
لقد تم الإبلاغ عن هذا السؤال
1
الرد
7892
أدوات العرض
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
مارس 15
|
4756 | ||
|
|
0
مارس 15
|
5097 | ||
|
|
0
مايو 26
|
2 | ||
|
|
0
أبريل 26
|
2 | ||
|
|
0
مارس 26
|
13 |