Skip to Content
Menu
This question has been flagged
5 Replies
8226 Views

While creating a new invoice, the system shows a Validation error.

"This entry contains some tax from an unallowed country. Please check its fiscal position and your tax configuration. "

I have double checked the country selected in Tax, Tax group, and Fiscal position. Everything is the same country. In the company, the selected company is also the same. 

 By default, the system takes the United States as the country while creating new Tax as well. 

Avatar
Discard

Hi,

I have the same issue, can someone have the solution or how to fix this issue on Odoo 15 Community ?

Best Answer

You can remove Country From : 


1. Tax Group 

2. Taxes 

3. Accounting > Configuration > Managements > Tax Report 



that will solve your problem 

Avatar
Discard
Best Answer

I tried everything, and in the end, it was resolved by just deleting the tax and creating a new one. Duplicating the tax didn't work and threw a country error, which suggests that another country is saved with the tax which can't be changed from the interface. Hope this helps someone!

Avatar
Discard
Best Answer

It sounds like there may be an issue with the tax configuration in your Odoo instance. Here are a few things you can try to troubleshoot the issue:

  1. Double-check the tax configuration for the "Deposit" product to ensure that the tax rate and tax group are set correctly. Make sure that the tax rate is set to the correct rate for the country where the products will be delivered.

  2. Check the fiscal position of the customer to ensure that it is set to the correct country. If the fiscal position is set to a different country than the one where the products will be delivered, it could cause the validation error you are seeing.

  3. Check the tax configuration for the company to ensure that it is set to the correct country. Make sure that the tax configuration for the company matches the country where the products will be delivered.

  4. Make sure that the country selected in the tax configuration is the same as the country selected in the company configuration. If the countries are different, it could cause the validation error you are seeing.

  5. If you are still having issues, you may want to try deleting the tax configuration for the "Deposit" product and creating a new one. This can sometimes resolve issues with tax configuration.

I hope these suggestions help to resolve the issue you are experiencing. If you are still having issues after trying these steps

Avatar
Discard
Best Answer

In the taxes master - the country field is there. If the different country is configured then the problem araises.

For Example, in the company settings you add Australia. But in the taxes if you add United states this this problem will araise, once change the correct country in taxes problem solved.

Avatar
Discard
Best Answer

Hi, 

In order to find a solution to this, you need to understand why odoo shows this message. 
For that, you should debug following code: 

@api.constrains('line_ids', 'fiscal_position_id', 'company_id')
def _validate_taxes_country(self):
""" By playing with the fiscal position in the form view, it is possible to keep taxes on the invoices from
a different country than the one allowed by the fiscal country or the fiscal position.
This contrains ensure such account.move cannot be kept, as they could generate inconsistencies in the reports.
"""
self._compute_tax_country_id() # We need to ensure this field has been computed, as we use it in our check
for record in self:
amls = record.line_ids
impacted_countries = amls.tax_ids.country_id | amls.tax_line_id.country_id | amls.tax_tag_ids.country_id
if impacted_countries and impacted_countries != record.tax_country_id:
raise ValidationError(_("This entry contains some tax from an unallowed country. Please check its fiscal position and your tax configuration."))



In your invoice's example, can you please tell us the value of the following variables : impacted_countries & record.tax_country_id ? 

Waiting for your reply. 

Avatar
Discard
Related Posts Replies Views Activity
2
Apr 24
6984
1
Aug 23
1571
0
Aug 22
1700
1
Feb 23
1730
2
Feb 23
1815