diff --git a/addons/purchase/static/src/js/tours/purchase.js b/addons/purchase/static/src/js/tours/purchase.js index b9e875f2a26..7baab8f4370 100644 --- a/addons/purchase/static/src/js/tours/purchase.js +++ b/addons/purchase/static/src/js/tours/purchase.js @@ -115,14 +115,8 @@ tour.register('purchase_tour' , { position: "bottom", run: 'click', }, { - trigger: ".ui-sortable-handle", + trigger: ".o_field_widget [name=price_unit]", extra_trigger: ".o_purchase_order", - content: _t("Click here to edit or move the quotation line."), - position: "bottom", - run: 'click', -}, { - trigger: ".o_form_editable input[name='price_unit']", - extra_trigger: ".o_form_editable input[name='price_unit']", content: _t("Once you get the price from the vendor, you can complete the purchase order with the right price."), position: "right", run: 'text 200.00' diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py index 74728c651e3..ae94b3fe03c 100644 --- a/addons/stock/models/stock_move.py +++ b/addons/stock/models/stock_move.py @@ -56,7 +56,7 @@ class StockMove(models.Model): product_uom_qty = fields.Float( 'Demand', digits='Product Unit of Measure', - default=0.0, required=True, states={'done': [('readonly', True)]}, + default=1.0, required=True, states={'done': [('readonly', True)]}, help="This is the quantity of products from an inventory " "point of view. For moves in the state 'done', this is the " "quantity of products that were actually moved. For other " diff --git a/addons/stock/models/stock_quant.py b/addons/stock/models/stock_quant.py index 70fd13db007..a4fa331d710 100644 --- a/addons/stock/models/stock_quant.py +++ b/addons/stock/models/stock_quant.py @@ -92,6 +92,7 @@ class StockQuant(models.Model): in_date = fields.Datetime('Incoming Date', readonly=True, required=True, default=fields.Datetime.now) tracking = fields.Selection(related='product_id.tracking', readonly=True) on_hand = fields.Boolean('On Hand', store=False, search='_search_on_hand') + product_categ_id = fields.Many2one(related='product_tmpl_id.categ_id') # Inventory Fields inventory_quantity = fields.Float( diff --git a/addons/stock/tests/test_move.py b/addons/stock/tests/test_move.py index 8a336c1162c..f810a640604 100644 --- a/addons/stock/tests/test_move.py +++ b/addons/stock/tests/test_move.py @@ -4413,7 +4413,7 @@ class StockMove(TransactionCase): 'product_uom': self.uom_unit.id, }) self.assertEqual(move1.state, 'draft') - self.assertEqual(move1.product_uom_qty, 0) + self.assertEqual(move1.product_uom_qty, 1) move1.product_uom_qty = 100 move1.product_id = self.product_serial move1._onchange_product_id() diff --git a/addons/stock/views/stock_quant_views.xml b/addons/stock/views/stock_quant_views.xml index 4460dd02c57..402a1398fc1 100644 --- a/addons/stock/views/stock_quant_views.xml +++ b/addons/stock/views/stock_quant_views.xml @@ -11,6 +11,7 @@ + @@ -128,6 +129,7 @@ + @@ -351,6 +353,7 @@ +