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

16 lines
683 B
Python

8 months ago
# -*- coding: utf-8 -*-
from odoo import api, fields, models, _, Command
from odoo.osv import expression
class AccountTaxGroup(models.Model):
_inherit = 'account.tax.group'
# _description = 'Tax Group'
# _order = 'sequence asc'
def _any_is_configured(self, company_id):
domain = expression.OR([[('property_tax_payable_account_id', '!=', False)],
[('property_tax_receivable_account_id', '!=', False)],
[('property_advance_tax_payment_account_id', '!=', False)]])
group_with_config = self.with_company(company_id).search_count(domain)
return group_with_config > 0