Does anyone know how to make a one2many tree to add attachments?
To pytanie dostało ostrzeżenie
1
Odpowiedz
7257
Widoki
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" />
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
|
1
mar 15
|
4304 | ||
|
|
0
mar 15
|
4470 | ||
|
|
0
lis 25
|
3 | ||
|
|
3
lip 25
|
10244 | ||
|
|
1
maj 25
|
2448 |