Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
1630 Prikazi

i found this code in odoo14 but i dont how to resolve this things.

@api.constrains('children_tax_ids', 'type_tax_use')
def _check_children_scope(self):
for tax in self:
if not tax._check_m2m_recursion('children_tax_ids'):
raise ValidationError(_("Recursion found for tax '%s'.") % (tax.name,))
if any(child.type_tax_use not in ('none', tax.type_tax_use) or child.tax_scope != tax.tax_scope for child in tax.children_tax_ids):
raise ValidationError(_('The application scope of taxes in a group must be either the same as the group or left empty.'))


Avatar
Opusti
Best Answer

this error message you are encountering, "Recursion found for tax 'sales'", indicates that there is a circular reference or loop in the children_tax_ids many-to-many relationship. This means that a tax is referencing itself or causing a loop in the relationships.

To resolve this issue, you need to identify and remove the circular reference. Here's what you can do:

  1. Check your tax records in the children_tax_ids field for any circular references.
  2. Review the relationships between tax records and ensure that there are no direct or indirect loops.
  3. Make sure that a tax cannot reference itself directly or indirectly through other taxes.


Avatar
Opusti
Avtor

Thank you shubham.

Related Posts Odgovori Prikazi Aktivnost
2
nov. 23
2275
5
nov. 22
2934
0
mar. 22
2375
0
feb. 22
1893
0
dec. 21
1421