From 8c2e112f70d65d4ae797f805780802cc79057dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20G=C3=B6ttsch?= Date: Tue, 18 Mar 2025 20:31:46 +0100 Subject: [PATCH] [imp] nfu_sale_order_batch_packaging: remove product recreation and duplicated code --- sale_order_batch/models/sale_order_batch_product.py | 1 - sale_order_batch/views/sale_order_batch_product_views.xml | 7 ++++++- sale_order_batch/views/sale_order_batch_views.xml | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sale_order_batch/models/sale_order_batch_product.py b/sale_order_batch/models/sale_order_batch_product.py index 33dcb0f..3f07556 100644 --- a/sale_order_batch/models/sale_order_batch_product.py +++ b/sale_order_batch/models/sale_order_batch_product.py @@ -32,7 +32,6 @@ class SaleOrderBatchProduct(models.Model): readonly=False, precompute=True, domain="[('sales', '=', True), ('product_id','=',product_id)]", - check_company=True, ) product_packaging_qty = fields.Float(compute="_compute_product_packaging_qty") diff --git a/sale_order_batch/views/sale_order_batch_product_views.xml b/sale_order_batch/views/sale_order_batch_product_views.xml index f366f9f..20bff33 100644 --- a/sale_order_batch/views/sale_order_batch_product_views.xml +++ b/sale_order_batch/views/sale_order_batch_product_views.xml @@ -23,8 +23,13 @@ - + + diff --git a/sale_order_batch/views/sale_order_batch_views.xml b/sale_order_batch/views/sale_order_batch_views.xml index c0bb798..dd80a76 100644 --- a/sale_order_batch/views/sale_order_batch_views.xml +++ b/sale_order_batch/views/sale_order_batch_views.xml @@ -122,11 +122,12 @@ widget="section_and_note_one2many" attrs="{'readonly': [('state', 'in', ('closed'))]}" > - + +