diff --git a/addons/stock_account/models/product.py b/addons/stock_account/models/product.py index 855d1b5e8ac..a87cdcd7510 100644 --- a/addons/stock_account/models/product.py +++ b/addons/stock_account/models/product.py @@ -269,7 +269,8 @@ class ProductProduct(models.Model): am_vals_list.append(move_vals) account_moves = self.env['account.move'].sudo().create(am_vals_list) - account_moves.post() + if account_moves: + account_moves.post() def _run_fifo(self, quantity, company): self.ensure_one()