details:   https://code.tryton.org/tryton/commit/5a91f227db6e
branch:    default
user:      Sergi Almacellas Abellana <[email protected]>
date:      Mon Nov 17 11:22:21 2025 +0100
description:
        Add routings on bom form

        Closes #14367
diffstat:

 modules/production_routing/production.py     |   7 +++++++
 modules/production_routing/production.xml    |   5 +++++
 modules/production_routing/tryton.cfg        |   1 +
 modules/production_routing/view/bom_form.xml |  10 ++++++++++
 4 files changed, 23 insertions(+), 0 deletions(-)

diffs (57 lines):

diff -r 070a8b93efac -r 5a91f227db6e modules/production_routing/production.py
--- a/modules/production_routing/production.py  Thu Nov 06 18:15:38 2025 +0100
+++ b/modules/production_routing/production.py  Mon Nov 17 11:22:21 2025 +0100
@@ -5,6 +5,13 @@
 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',
diff -r 070a8b93efac -r 5a91f227db6e modules/production_routing/production.xml
--- a/modules/production_routing/production.xml Thu Nov 06 18:15:38 2025 +0100
+++ b/modules/production_routing/production.xml Mon Nov 17 11:22:21 2025 +0100
@@ -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"/>
diff -r 070a8b93efac -r 5a91f227db6e modules/production_routing/tryton.cfg
--- a/modules/production_routing/tryton.cfg     Thu Nov 06 18:15:38 2025 +0100
+++ b/modules/production_routing/tryton.cfg     Mon Nov 17 11:22:21 2025 +0100
@@ -16,6 +16,7 @@
     routing.RoutingOperation
     routing.RoutingStep
     routing.Routing_BOM
+    production.BOM
     production.Production
     product.ProductBom
     product.ProductionLeadTime
diff -r 070a8b93efac -r 5a91f227db6e 
modules/production_routing/view/bom_form.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/production_routing/view/bom_form.xml      Mon Nov 17 11:22:21 
2025 +0100
@@ -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>

Reply via email to