diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py index 8e3336c2672..dcc727af49a 100644 --- a/addons/stock/models/product.py +++ b/addons/stock/models/product.py @@ -909,11 +909,10 @@ class ProductTemplate(models.Model): def action_update_quantity_on_hand(self): advanced_option_groups = [ 'stock.group_stock_multi_locations', - 'stock.group_production_lot', 'stock.group_tracking_owner', - 'product.group_tracking_lot' + 'stock.group_tracking_lot' ] - if (self.env.user.user_has_groups(','.join(advanced_option_groups))): + if (self.env.user.user_has_groups(','.join(advanced_option_groups))) or self.tracking != 'none': return self.action_open_quants() else: default_product_id = self.env.context.get('default_product_id', len(self.product_variant_ids) == 1 and self.product_variant_id.id) diff --git a/addons/stock/views/product_views.xml b/addons/stock/views/product_views.xml index 473c3de6771..1e2d8e64919 100644 --- a/addons/stock/views/product_views.xml +++ b/addons/stock/views/product_views.xml @@ -258,7 +258,7 @@ @@ -366,7 +366,7 @@ diff --git a/addons/stock/wizard/stock_change_product_qty.py b/addons/stock/wizard/stock_change_product_qty.py index 02854694e18..c6d08f22c41 100644 --- a/addons/stock/wizard/stock_change_product_qty.py +++ b/addons/stock/wizard/stock_change_product_qty.py @@ -16,6 +16,7 @@ class ProductChangeQuantity(models.TransientModel): 'New Quantity on Hand', default=1, digits='Product Unit of Measure', required=True, help='This quantity is expressed in the Default Unit of Measure of the product.') + product_uom_id = fields.Many2one(related='product_tmpl_id.uom_id') @api.onchange('product_id') def _onchange_product_id(self): diff --git a/addons/stock/wizard/stock_change_product_qty_views.xml b/addons/stock/wizard/stock_change_product_qty_views.xml index 932d617242d..bad700fda76 100644 --- a/addons/stock/wizard/stock_change_product_qty_views.xml +++ b/addons/stock/wizard/stock_change_product_qty_views.xml @@ -6,16 +6,26 @@ stock.change.product.qty - + - - - + + + + + + + + + + + +