Skip to content

Commit 6d52a43

Browse files
[IMP] repair_stock_consumption_step: add "consumption" in visible status' of status bar
1 parent 6f9758b commit 6d52a43

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

repair_stock_consumption_step/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/repair",
1212
"maintainers": ["sbejaoui"],
13-
"depends": ["repair", "repair_warehouse"],
13+
"depends": ["repair", "repair_warehouse", "base_view_inheritance_extension"],
1414
"excludes": ["repair_stock_move"],
1515
"data": ["views/repair_order.xml", "views/stock_warehouse.xml"],
1616
"demo": [],

repair_stock_consumption_step/models/repair_order.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ class RepairOrder(models.Model):
1515
related="warehouse_id.repair_consumption_step"
1616
)
1717
state = fields.Selection(
18-
selection_add=[("consumption", "Waiting Consumption")],
18+
# Put "consumption" step before "done" step (for UI)
19+
selection_add=[("consumption", "Waiting Consumption"), ("done",)],
1920
ondelete={"consumption": "set done"},
2021
)
2122

repair_stock_consumption_step/views/repair_order.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
Consumption
2121
</button>
2222
</xpath>
23+
24+
<xpath expr="//field[@name='state']" position="attributes">
25+
<attribute
26+
name="statusbar_visible"
27+
operation="text_add"
28+
>{old_value},consumption</attribute>
29+
</xpath>
2330
</field>
2431
</record>
2532

0 commit comments

Comments
 (0)