diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index f646b0abf1f..d00d3a06e51 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -667,7 +667,7 @@ class Picking(models.Model): return res def write(self, vals): - if vals.get('picking_type_id') and self.state != 'draft': + if vals.get('picking_type_id') and any(picking.state != 'draft' for picking in self): raise UserError(_("Changing the operation type of this record is forbidden at this point.")) # set partner as a follower and unfollow old partner if vals.get('partner_id'): diff --git a/doc/cla/corporate/subteno-it.md b/doc/cla/corporate/subteno-it.md index 1739c616579..ad90a853a5a 100644 --- a/doc/cla/corporate/subteno-it.md +++ b/doc/cla/corporate/subteno-it.md @@ -14,3 +14,5 @@ List of contributors: Christian LECOUFLE christian.lecoufle@subteno-it.fr https://github.com/cle-subteno-it Vincent COFFIN vincent.coffin@subteno-it.fr https://github.com/vco-subteno-it +Jeremy CORMIER jco@subteno.com https://github.com/jco-subteno-it +Jeremy CORMIER jeremy.cormier@subteno-it.fr https://github.com/jco-subteno-it \ No newline at end of file