[FIX] mrp: fix missing uom for operations/byproducts in BoM Overview
Wrong key was used to display the unit of measure in the BoM Overview, leaving the cells empty. closes odoo/odoo#114934 X-original-commit: a6eba909a8f2ab07ddb239b4b64e82d51f724e66 Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com> Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
This commit is contained in:
@@ -328,7 +328,7 @@ class ReportBomStructure(models.AbstractModel):
|
||||
'currency_id': company.currency_id.id,
|
||||
'name': byproduct.product_id.display_name,
|
||||
'quantity': line_quantity,
|
||||
'uom': byproduct.product_uom_id.name,
|
||||
'uom_name': byproduct.product_uom_id.name,
|
||||
'prod_cost': company.currency_id.round(price),
|
||||
'parent_id': bom.id,
|
||||
'level': level or 0,
|
||||
@@ -360,7 +360,7 @@ class ReportBomStructure(models.AbstractModel):
|
||||
'link_id': operation.id,
|
||||
'link_model': 'mrp.routing.workcenter',
|
||||
'name': operation.name + ' - ' + operation.workcenter_id.name,
|
||||
'uom': _("Minutes"),
|
||||
'uom_name': _("Minutes"),
|
||||
'quantity': duration_expected,
|
||||
'bom_cost': self.env.company.currency_id.round(total),
|
||||
'currency_id': company.currency_id.id,
|
||||
@@ -459,7 +459,7 @@ class ReportBomStructure(models.AbstractModel):
|
||||
'name': byproduct['name'],
|
||||
'type': 'byproduct',
|
||||
'quantity': byproduct['quantity'],
|
||||
'uom': byproduct['uom'],
|
||||
'uom': byproduct['uom_name'],
|
||||
'prod_cost': byproduct['prod_cost'],
|
||||
'bom_cost': byproduct['bom_cost'],
|
||||
'level': level + 1,
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<tr>
|
||||
<td name="td_mrp_bom_byproducts_f" class="text-end" t-esc="byproduct['name']"/>
|
||||
<td class="text-end"><strong>Unit Cost</strong></td>
|
||||
<td class="text-start" groups="uom.group_uom" t-esc="byproduct['uom']"/>
|
||||
<td class="text-start" groups="uom.group_uom" t-esc="byproduct['uom_name']"/>
|
||||
<td t-if="data['show_availabilities']"/>
|
||||
<td t-if="data['show_availabilities']"/>
|
||||
<td t-if="data['show_availabilities']"/>
|
||||
|
||||
Reference in New Issue
Block a user