Skip to Content
Menu
This question has been flagged
1 Reply
1623 Views

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
Discard
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
Discard
Author

Thank you shubham.

Related Posts Replies Views Activity
2
Nov 23
2266
5
Nov 22
2927
0
Mar 22
2369
0
Feb 22
1886
0
Dec 21
1410