diff --git a/addons/account/models/account.py b/addons/account/models/account.py index 7ffafe75010..e73bfc10345 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -203,6 +203,8 @@ class AccountAccount(models.Model): @api.onchange('internal_type') def onchange_internal_type(self): self.reconcile = self.internal_type in ('receivable', 'payable') + if self.internal_type == 'liquidity': + self.reconcile = False @api.onchange('code') def onchange_code(self): diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index fa1dc45f459..f65487073fe 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -1575,7 +1575,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, readonly=False) + product_image = fields.Binary('Product Image', related="product_id.image", store=False, readonly=True) account_id = fields.Many2one('account.account', string='Account', domain=[('deprecated', '=', False)], default=_default_account, help="The income or expense account related to the selected product.") diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 6e8b5e43769..b1df4fca6f4 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -396,7 +396,7 @@ class AccountMove(models.Model): reversed_move = self.copy(default={ 'date': date, 'journal_id': journal_id.id if journal_id else self.journal_id.id, - 'ref': _('%sreversal of: ') % (_('Automatic ') if auto else '') + self.name, + 'ref': (_('Automatic reversal of: %s') if auto else _('Reversal of: %s')) % (self.name), 'auto_reverse': False}) for acm_line in reversed_move.line_ids.with_context(check_move_validity=False): acm_line.write({ @@ -1268,8 +1268,9 @@ class AccountMoveLine(models.Model): """ self.ensure_one() amount = -self.balance * distribution.percentage / 100.0 + default_name = self.name or (self.ref or '/' + ' -- ' + (self.partner_id and self.partner_id.name or '/')) return { - 'name': self.name, + 'name': default_name, 'date': self.date, 'account_id': distribution.account_id.id, 'partner_id': self.partner_id.id, diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml index a34a743db4a..f4e1d6863eb 100644 --- a/addons/account/views/account_view.xml +++ b/addons/account/views/account_view.xml @@ -22,8 +22,8 @@ -