[FIX] mrp: demo data for shop floor

We only show the move that requires a manual operation in the
shop floor application. Currently we only see the MO for table top
with a single operation to register the finished serial.

It's a bit funnier to see also the components required and check them

Also the manual_consumption field is a compute store without inverse.
It means it's readonly true by default. But we should be able to pass
a value and use it instead of the compute

X-original-commit: 58118291e148a144058c0c883ddd138187a86f3d
Part-of: odoo/odoo#131707
This commit is contained in:
Arnold Moyaux
2023-08-14 13:41:55 +02:00
committed by Tiffany Chang (tic)
parent 9c8a9991eb
commit cc39341fc2
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -310,6 +310,7 @@
<record id="mrp_bom_line_wood_panel" model="mrp.bom.line">
<field name="product_id" ref="product_product_wood_panel"/>
<field name="product_qty">2</field>
<field name="manual_consumption">True</field>
<field name="product_uom_id" ref="uom.product_uom_unit"/>
<field name="sequence">1</field>
<field name="bom_id" ref="mrp_bom_table_top"/>
+2 -1
View File
@@ -455,7 +455,8 @@ class MrpBomLine(models.Model):
attachments_count = fields.Integer('Attachments Count', compute='_compute_attachments_count')
tracking = fields.Selection(related='product_id.tracking')
manual_consumption = fields.Boolean(
'Manual Consumption', default=False, compute='_compute_manual_consumption', store=True, copy=True,
'Manual Consumption', default=False, compute='_compute_manual_consumption',
readonly=False, store=True, copy=True,
help="When activated, then the registration of consumption for that component is recorded manually exclusively.\n"
"If not activated, and any of the components consumption is edited manually on the manufacturing order, Odoo assumes manual consumption also.")
manual_consumption_readonly = fields.Boolean(