fixup! [MIG] repair_refurbish (mrp_repair_refurbish): Migration to 12.0

This commit is contained in:
Akim Juillerat
2019-03-12 19:17:07 +01:00
committed by Mateu Griful
parent 7e94d7f53d
commit f637f26cb5

View File

@@ -7,9 +7,10 @@ class StockMove(models.Model):
_inherit = 'stock.move'
@api.model
def create(self, vals):
@api.model_create_multi
def create(self, vals_list):
if 'force_refurbish_location_dest_id' in self.env.context:
vals['location_dest_id'] = self.env.context[
'force_refurbish_location_dest_id']
return super().create(vals)
for vals in vals_list:
vals['location_dest_id'] = self.env.context[
'force_refurbish_location_dest_id']
return super().create(vals_list)