[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user