You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

13 lines
408 B

# Copyright 2020 Tecnativa - João Marques
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class AccountBankStatementClearPartner(models.Model):
_inherit = "account.bank.statement"
def clear_partners(self):
self.mapped("line_ids").filtered(
lambda x: not x.journal_entry_ids and not x.account_id
).write({"partner_id": False})