diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 516c9f01b29..515366581a1 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -109,7 +109,7 @@ class SaleAdvancePaymentInv(models.TransientModel): } if order.fiscal_position_id: invoice_vals['fiscal_position_id'] = order.fiscal_position_id.id - invoice = self.env['account.move'].create(invoice_vals) + invoice = self.env['account.move'].sudo().create(invoice_vals).with_user(self.env.uid) invoice.message_post_with_view('mail.message_origin_link', values={'self': invoice, 'origin': order}, subtype_id=self.env.ref('mail.mt_note').id)