This commit is contained in:
xtremxpert 2024-12-19 11:20:44 -05:00
parent b06e9c4569
commit 3ba182fe0e
3 changed files with 10 additions and 8 deletions

View file

@ -21,9 +21,8 @@
'assets': {
'web.assets_backend': [
'customer_itch_cycle/static/src/js/cycle_product_partner_list_view.js',
],
'web.assets_backend_xml': [
'customer_itch_cycle/static/src/xml/process_history_button.xml',
],
},
'installable': True,

View file

@ -28,8 +28,8 @@ class CycleProductPartnerListController extends ListController {
}
// Enregistrement de la vue personnalisée
registry.category("views").add("process_history_button_in_tree", {
registry.category("views").add("cycle_product_partner_list", {
...listView,
Controller: CycleProductPartnerListController,
buttonTemplate: "customer_itch_cycle.button_in_tree",
buttonTemplate: "customer_itch_cycle.process_history_button_in_tree",
});

View file

@ -1,5 +1,8 @@
<template id="process_history_button_in_tree" name="Button in Tree">
<t t-call="web.Button" class="btn-primary" t-on-click="ProcessHistoryButton">
<t t-esc="__('Mettre à jour depuis commandes passées')"/>
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="customer_itch_cycle.process_history_button_in_tree" name="Button in Tree">
<button class="btn btn-primary" t-on-click="ProcessHistoryButton">
Mettre à jour depuis commandes passées
</button>
</t>
</template>
</templates>