how can create this buttoms in my own tree view?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
This forum doesn't allow me to post any forward slash character in the Answer, otherwise it's going to be blank.
I post all the code needed in the comment.
This widget seems to only work with in-field tree view, so you cannot have an individual tree view then being referenced.
Also, the display_type field is required.
A field can only have 1 in-field tree view, so if you display the same one2many field in the form view more than 1 time. The last in-field tree view will override any previous definition.
hi, ty for the answer, i try to do but the button arent funct
https://gyazo.com/567bb865ca2a0bdc1db854bd411cbd49
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
cze 25
|
1924 | ||
|
3
lip 25
|
3515 | ||
|
1
maj 25
|
1635 | ||
|
1
maj 25
|
1886 | ||
|
4
maj 25
|
3007 |
<field name="one2many_field" widget="section_and_note_one2many" mode="tree">
<tree>
<control>
<create name="add_product_control" string="Add a product"/>
<create name="add_section_control" string="Add a section" context="{'default_display_type': 'line_section'}"/>
<create name="add_note_control" string="Add a note" context="{'default_display_type': 'line_note'}"/>
</control>
</tree>
</field>
display_type = fields.Selection([('line_section', "Section"), ('line_note', "Note")], default=False, help="Technical field for UX purpose.")
put Create=True in the tree and work