summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToufik Benjaa <tbe@odoo.com>2018-09-26 10:01:55 +0200
committerToufik Benjaa <tbe@odoo.com>2018-09-26 12:15:09 +0200
commitf7d7eb06abf129433283c660db6aed49f649e549 (patch)
treefccee264227eb232998a7bce4cd2b658cac7d02d
parent9e9d8e3632e566de22e4971aea5c7f2ad74aa043 (diff)
[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.
-rw-r--r--addons/account/models/account_invoice.py2
1 files changed, 1 insertions, 1 deletions
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,