From 498b7f73857189d1b22204c3f71f35d03ec4afb7 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 1 Jul 2025 09:36:21 +0700 Subject: add sale order on po bom and add bom on po bom --- indoteknik_custom/models/mrp_production.py | 5 +++-- indoteknik_custom/models/purchase_order.py | 1 + indoteknik_custom/views/mrp_production.xml | 2 +- indoteknik_custom/views/purchase_order.xml | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/indoteknik_custom/models/mrp_production.py b/indoteknik_custom/models/mrp_production.py index 14821f27..85b8405f 100644 --- a/indoteknik_custom/models/mrp_production.py +++ b/indoteknik_custom/models/mrp_production.py @@ -110,8 +110,9 @@ class MrpProduction(models.Model): 'picking_type_id': 28, # indoteknik bandengan receipts 'date_order': current_time, 'product_bom_id': self.product_id.id, - # 'sale_order_id': self.sale_order_id.id, - 'note_description': 'from Manufacturing Order' + 'sale_order_id': self.sale_order.id, + 'manufacturing_id': self.id, + 'note_description': 'from Manufacturing Order', } domain = [ diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 1a7e50f8..a3941b3b 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -97,6 +97,7 @@ class PurchaseOrder(models.Model): string="BU Related Count", compute='_compute_bu_related_count' ) + manufacturing_id = fields.Many2one('mrp.production', string='Manufacturing Orders') @api.depends('name') def _compute_bu_related_count(self): diff --git a/indoteknik_custom/views/mrp_production.xml b/indoteknik_custom/views/mrp_production.xml index 3de52a08..5057415f 100644 --- a/indoteknik_custom/views/mrp_production.xml +++ b/indoteknik_custom/views/mrp_production.xml @@ -11,7 +11,7 @@ - + diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml index 530fd115..dae23eed 100755 --- a/indoteknik_custom/views/purchase_order.xml +++ b/indoteknik_custom/views/purchase_order.xml @@ -87,7 +87,8 @@ - + + -- cgit v1.2.3