[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.
This commit is contained in:
Toufik Benjaa
2018-09-26 12:15:09 +02:00
parent 9e9d8e3632
commit f7d7eb06ab
+1 -1
View File
@@ -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,