Add routings on bom form

Closes #14367
This commit is contained in:
Sergi Almacellas Abellana
2025-11-17 11:22:21 +01:00
parent 66da5bf18a
commit 612e7b72e1
4 changed files with 23 additions and 0 deletions
+7
View File
@@ -5,6 +5,13 @@ from trytond.pool import PoolMeta
from trytond.pyson import Eval, If
class BOM(metaclass=PoolMeta):
__name__ = 'production.bom'
routings = fields.Many2Many(
'production.routing-production.bom', 'bom', 'routing', "Routings")
class Production(metaclass=PoolMeta):
__name__ = 'production'
routing = fields.Many2One('production.routing', 'Routing',
@@ -3,6 +3,11 @@
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="bom_view_form">
<field name="model">production.bom</field>
<field name="inherit" ref="production.bom_view_form"/>
<field name="name">bom_form</field>
</record>
<record model="ir.ui.view" id="production_view_form">
<field name="model">production</field>
<field name="inherit" ref="production.production_view_form"/>
+1
View File
@@ -16,6 +16,7 @@ model:
routing.RoutingOperation
routing.RoutingStep
routing.Routing_BOM
production.BOM
production.Production
product.ProductBom
product.ProductionLeadTime
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/notebook" position="inside">
<page name="routings">
<field name="routings" colspan="4"/>
</page>
</xpath>
</data>