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

account_chart_update: mass update on several companies #1818

Open
fgi-osw opened this issue Feb 13, 2024 · 3 comments
Open

account_chart_update: mass update on several companies #1818

fgi-osw opened this issue Feb 13, 2024 · 3 comments

Comments

@fgi-osw
Copy link

fgi-osw commented Feb 13, 2024

The wizard "only" allows to edit in one company at a time. Well, it remains a great tool, but in case of minor changes, in case of dozens of companies, it's quicker to use an import file.

Is there a way to update at once in several companies using the same chart template?

Do you see an issue in doing so?

Thank you!

@pedrobaeza
Copy link
Member

Hi, Frédéric! I'm afraid the tool is not thought for that mass-update.

It's easy to pipe through a shell script for doing in mass though, but not having decision power between them:

for company in env["res.company"].search([]):
    print(f"Company {company.name} ({company.id})")
    wizard = env["wizard.update.charts.accounts"].with_company(company).create({"company_id": company.id, "chart_template_id": company.chart_template_id.id, "continue_on_errors": True, "recreate_xml_ids": True})
    wizard.action_find_records()
    wizard.action_update_records()
    env.cr.commit()

@fgi-osw
Copy link
Author

fgi-osw commented Feb 15, 2024

Thank you @pedrobaeza !

btw any recommendation on how to set it up? Is it not safer to configure custom charts (with new accounts, taxes) rather than editing existing ones? In order to keep a fully standard setup in the system, in case. @

@pedrobaeza
Copy link
Member

There's not too much problem in creating new accounts, but new taxes should be more controlled, specially in Spain, as the localization modules don't use taxes grids (it's a conscious decision by several reasons (you can see them here - in Spanish -: https://youtu.be/bmXozh08xbM?t=740)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants