From b60b781e2e0a0846a9afc7a70f5d948123e5f59a Mon Sep 17 00:00:00 2001 From: rhe Date: Wed, 5 Jun 2019 11:43:46 +0000 Subject: [PATCH] [IMP] point_of_sale: Add the uom to the order line If we were using Units of Measure before, the pos order line didn't show what unit we were using. Now we display the Units of Measure in the order line if the option is active. TASK-ID: 2001995 closes odoo/odoo#33915 Signed-off-by: pimodoo --- addons/point_of_sale/models/pos_order.py | 1 + addons/point_of_sale/views/pos_order_view.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index abf858acfc2..912b8bb4de5 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -1032,6 +1032,7 @@ class PosOrderLine(models.Model): tax_ids = fields.Many2many('account.tax', string='Taxes', readonly=True) tax_ids_after_fiscal_position = fields.Many2many('account.tax', compute='_get_tax_ids_after_fiscal_position', string='Taxes to Apply') pack_lot_ids = fields.One2many('pos.pack.operation.lot', 'pos_order_line_id', string='Lot/serial Number') + product_uom_id = fields.Many2one('uom.uom', string='Product UoM', related='product_id.uom_id') @api.model def _prepare_refund_data(self, refund_order_id): diff --git a/addons/point_of_sale/views/pos_order_view.xml b/addons/point_of_sale/views/pos_order_view.xml index 0447244444d..21a4d9e3fbe 100644 --- a/addons/point_of_sale/views/pos_order_view.xml +++ b/addons/point_of_sale/views/pos_order_view.xml @@ -38,6 +38,7 @@ +