[FIX] account: usability fix when no partner and journal set
when an account.payment object had no partner and no journal, the computation of is_internal_transfer was wrongly computed as True... and the information banner was displayed accordingly closes odoo/odoo#77122 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
@@ -381,7 +381,7 @@ class AccountPayment(models.Model):
|
||||
@api.depends('partner_id', 'destination_account_id', 'journal_id')
|
||||
def _compute_is_internal_transfer(self):
|
||||
for payment in self:
|
||||
payment.is_internal_transfer = payment.partner_id == payment.journal_id.company_id.partner_id
|
||||
payment.is_internal_transfer = payment.partner_id and payment.partner_id == payment.journal_id.company_id.partner_id
|
||||
|
||||
@api.depends('payment_type', 'journal_id')
|
||||
def _compute_payment_method_line_id(self):
|
||||
|
||||
Reference in New Issue
Block a user