[MERGE] forward port of branch saas-3 up to c666030
authorDenis Ledoux <dle@odoo.com>
Wed, 5 Nov 2014 12:40:30 +0000 (13:40 +0100)
committerDenis Ledoux <dle@odoo.com>
Wed, 5 Nov 2014 12:40:30 +0000 (13:40 +0100)
addons/mrp/mrp.py
addons/web/static/src/js/view_form.js

index 2a59733..1efefca 100644 (file)
@@ -1053,6 +1053,8 @@ class mrp_production(osv.osv):
             'production_id': production.id,
             'origin': production.name,
         }
+        if production.move_prod_id:
+            production.move_prod_id.write({'location_id': destination_location_id})
         move_id = stock_move.create(cr, uid, data, context=context)
         #a phantom bom cannot be used in mrp order so it's ok to assume the list returned by action_confirm
         #is 1 element long, so we can take the first.
index e281845..79e217a 100644 (file)
@@ -4398,7 +4398,9 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
         return _.every(this.records.records, function(record){
             r = record;
             _.each(self.editor.form.fields, function(field){
+                field._inhibit_on_change_flag = true;
                 field.set_value(r.attributes[field.name]);
+                field._inhibit_on_change_flag = false;
             });
             return _.every(self.editor.form.fields, function(field){
                 field.process_modifiers();