I had seen in list view. But how we will make it in kanban view?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kirjanpito
- Varastointi
- PoS
- Project
- MRP
Tämä kysymys on merkitty
Hello
Try with below code:
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="KanbanView.buttons">
<t t-jquery="button" t-operation="after">
<t t-if="widget.modelName == 'yourmodelname'">
<button
class="oe_button oe_highlight"
type="button">My Button</button>
</t>
</t>
</t>
</templates>
i tried this and i get a schema error (AssertionError: Document does not comply with schema)
@Mosab - that's because you have to put this XML inside qweb section of the manifest, and not on data (which usually has files stored under /static/src/xml/)
Thus, you would need a controller to bind it with the code you want to run, so a little bit more complicated
Hello, You can try it.
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve"><t t-extend="ImportView.import_button">
<t t-jquery="button.o_button_import" t-operation="after">
<button t-if="widget.modelName == 'your model name'"
class="btn btn-primary" type="button">Button name</button>
</t>
</t>
</templates>
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
|
3
lokak. 23
|
8949 | ||
|
1
syysk. 23
|
3393 | ||
|
1
toukok. 23
|
2359 | ||
|
2
huhtik. 23
|
2905 | ||
Inherit Element form kanban View
Ratkaistu
|
|
1
maalisk. 23
|
2301 |