Hello, i have a little big problem
i want to show only the purchase taxes in purchase account move and sale taxes in sale account move, this is my code
Someone help me pls :(((
def _get_tax_domain(self):
for rec in self:
if rec.move_type in ['in_invoice', 'in_refund', 'in_receipt']:
domain = [('type_tax_use', '=', 'sale'), ('tax_group_id.name', 'in', ['Retención RENTA', 'Retención IVA'])]
else:
domain = [('type_tax_use', '=', 'purchase'), ('tax_group_id.name', 'in', ['Retención RENTA', 'Retención IVA'])]
return domain
new_taxes = fields.Many2many('account.tax', domain=_get_tax_domain)