[FIX] mrp_subcontracting: fix traceback in bom overview

Steps to reproduce the bug:
- Enable subcontracting in mrp settings
- Create a storable product:
    - add “azure interior “ as supplier
    - Create a BoM:
        - Type: subcontracting
        - subcontractor: azure interior
        - save
- Click on BoM overview

Problem:
Traceback is triggered: “OwlError: Invalid props for component
'BomOverviewSpecialLine': 'precision' is missing (should be a number)”

opw-3321346

closes odoo/odoo#123435

X-original-commit: 60eca5439e72786bb0e913d7ac643697376205c9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
This commit is contained in:
Touati Djamel (otd)
2023-06-05 14:49:46 +02:00
parent 45387e5974
commit a1213accd6
2 changed files with 4 additions and 2 deletions
@@ -7,7 +7,9 @@
<BomOverviewSpecialLine
type="'subcontracting'"
showOptions="props.showOptions"
data="props.data"/>
data="props.data"
precision="props.precision"
/>
</t>
</xpath>
</t>
@@ -7,7 +7,7 @@
</xpath>
<xpath expr="//td[@name='quantity']" position="inside">
<span t-if="props.type == 'subcontracting'" t-esc="formatFloat(subcontracting.quantity)"/>
<span t-if="props.type == 'subcontracting'" t-esc="formatFloat(subcontracting.quantity, {'digits': [false, precision]})"/>
</xpath>
<xpath expr="//td[@name='uom']" position="inside">