From 3a11c99ccbbc240da4d373be117d54465d0fa581 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 30 Sep 2024 07:47:36 +0200 Subject: [PATCH] stock_usability: Add product_barcode on orderpoint tree view (optional hide) --- stock_usability/models/stock_warehouse_orderpoint.py | 1 + stock_usability/views/stock_warehouse_orderpoint.xml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/stock_usability/models/stock_warehouse_orderpoint.py b/stock_usability/models/stock_warehouse_orderpoint.py index 8efad64..83f734c 100644 --- a/stock_usability/models/stock_warehouse_orderpoint.py +++ b/stock_usability/models/stock_warehouse_orderpoint.py @@ -14,6 +14,7 @@ class StockWarehouseOrderpoint(models.Model): # In the 'stock' module, the default value for 'trigger' is 'auto' # but all the Odoo deployments I've seen so far need 'manual' by default trigger = fields.Selection(default='manual') + product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode") def _procure_orderpoint_confirm( self, use_new_cursor=False, company_id=None, raise_user_error=True): diff --git a/stock_usability/views/stock_warehouse_orderpoint.xml b/stock_usability/views/stock_warehouse_orderpoint.xml index 9ab844f..3e99b9b 100644 --- a/stock_usability/views/stock_warehouse_orderpoint.xml +++ b/stock_usability/views/stock_warehouse_orderpoint.xml @@ -25,6 +25,9 @@ show + + +