diff --git a/addons/mrp/models/stock_warehouse.py b/addons/mrp/models/stock_warehouse.py index 1036f19c5b1..8f38dfad3c3 100644 --- a/addons/mrp/models/stock_warehouse.py +++ b/addons/mrp/models/stock_warehouse.py @@ -29,12 +29,12 @@ class StockWarehouse(models.Model): return result def _get_manufacture_route_id(self): - manufacture_route_id = self.env.ref('mrp.route_warehouse0_manufacture').id - if not manufacture_route_id: - manufacture_route_id = self.env['stock.location.route'].search([('name', 'like', _('Manufacture'))], limit=1).id - if not manufacture_route_id: + manufacture_route = self.env.ref('mrp.route_warehouse0_manufacture', raise_if_not_found=False) + if not manufacture_route: + manufacture_route = self.env['stock.location.route'].search([('name', 'like', _('Manufacture'))], limit=1) + if not manufacture_route: raise exceptions.UserError(_('Can\'t find any generic Manufacture route.')) - return manufacture_route_id + return manufacture_route.id def _get_manufacture_pull_rules_values(self, route_values): if not self.manu_type_id: diff --git a/addons/product/report/product_product_templates.xml b/addons/product/report/product_product_templates.xml index 8fb2bf122d7..66f9594a529 100644 --- a/addons/product/report/product_product_templates.xml +++ b/addons/product/report/product_product_templates.xml @@ -17,7 +17,9 @@ - + + + diff --git a/addons/stock_account/models/stock.py b/addons/stock_account/models/stock.py index 5bb399257c9..e91521e5037 100644 --- a/addons/stock_account/models/stock.py +++ b/addons/stock_account/models/stock.py @@ -226,7 +226,7 @@ class StockMove(models.Model): # product_obj = self.pool.get('product.product') if any(q.qty <= 0 for q in move.quant_ids) or move.product_qty == 0: # if there is a negative quant, the standard price shouldn't be updated - return + continue # Note: here we can't store a quant.cost directly as we may have moved out 2 units # (1 unit to 5€ and 1 unit to 7€) and in case of a product return of 1 unit, we can't # know which of the 2 costs has to be used (5€ or 7€?). So at that time, thanks to the diff --git a/addons/web_editor/static/src/js/rte.js b/addons/web_editor/static/src/js/rte.js index 595602d6305..564857966b5 100644 --- a/addons/web_editor/static/src/js/rte.js +++ b/addons/web_editor/static/src/js/rte.js @@ -326,9 +326,12 @@ var RTE = Widget.extend({ }); // start element observation - $(document).on('content_changed', '.o_editable', function (event) { + $(document).on('content_changed', '.o_editable', function (ev) { self.trigger('change', this); - $(this).addClass('o_dirty'); + if (!ev.__isDirtyHandled) { + $(this).addClass('o_dirty'); + ev.__isDirtyHandled = true; + } }); $('#wrapwrap, .o_editable').on('click.rte', '*', this, this.onClick.bind(this)); @@ -357,6 +360,10 @@ var RTE = Widget.extend({ this.__saved = {}; // list of allready saved views and data + + $('.o_editable') + .destroy() + .removeClass('o_editable o_is_inline_editable'); var defs = $('.o_dirty') .removeAttr('contentEditable') .removeClass('o_dirty oe_carlos_danger o_is_inline_editable')