From f7d7eb06abf129433283c660db6aed49f649e549 Mon Sep 17 00:00:00 2001 From: Toufik Benjaa Date: Wed, 26 Sep 2018 10:01:55 +0200 Subject: [PATCH] [FIX] account: avoid to rewrite product image when refunding invoice - When refunding an invoice the field product_image is modified and tries to write on the product image field for no reason. --- addons/account/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 8735aa0fec0..8486397b300 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -1459,7 +1459,7 @@ class AccountInvoiceLine(models.Model): ondelete='set null', index=True, oldname='uos_id') product_id = fields.Many2one('product.product', string='Product', ondelete='restrict', index=True) - product_image = fields.Binary('Product Image', related="product_id.image", store=False) + product_image = fields.Binary('Product Image', related="product_id.image", store=False, readonly=True) account_id = fields.Many2one('account.account', string='Account', required=True, domain=[('deprecated', '=', False)], default=_default_account,