Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][FIX] account_avatax_oca: Install on multi-country #444

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from

Conversation

RLeeOSI
Copy link

@RLeeOSI RLeeOSI commented Aug 13, 2024

On install of account_avatax_oca in an environment where the main company is not in the United States, install fails with error "The tax group must have the same country_id as the tax using it.". The default tax is created in the main company, and the country_id is defined in the XML data file, but the tax group computes its country_id from the main company's country, and the SQL constraint error appears. This is true even if the active company is a USA company, and the main company is not active.

@OCA-git-bot
Copy link
Contributor

Hi @dreispt,
some modules you are maintaining are being modified, check this out!

@dreispt
Copy link
Member

dreispt commented Aug 13, 2024

I'm afraid this fix is just a workaround to allow you installing the module.
The country is needs to be set as US.
It is just that you don't want the Fiscal Position to be created for a non-US base company.

Perhaps the proper solution is to have this config data added though the CoA Template...

@RLeeOSI
Copy link
Author

RLeeOSI commented Aug 13, 2024

I agree that this is a workaround. The ideal situation would leave you with the module data created on the US company. However, I don't see a way that would cover every scenario (e.g. US company hasn't been created yet, main company is non-US but does sales in US), so I think the best solution may be to allow install, then instruct the user to use the module data as a template and correctly create the data in whatever company they need to. Unfortunately, that's not simple either, as tax groups cannot be created/imported through the UI.

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants