OpenUpgrade icon indicating copy to clipboard operation
OpenUpgrade copied to clipboard

[13.0][OU-IMP] l10n_be: migration script (account.account.tag)

Open remytms opened this issue 2 years ago • 8 comments

Migrate account.account.tag to fit the new account.tax and its repartition lines.

remytms avatar Jan 04 '23 16:01 remytms

@sbidoul this PR might interest you when migrating Belgian accounting. :)

remytms avatar Apr 20 '23 14:04 remytms

@marielejeune Can you give a look at this migration script? Thanks. :)

remytms avatar Feb 13 '24 14:02 remytms

Hi @remytms, I've seen your PR a few days ago, but I'm really not an accounting specialist and I don't think I've the competencies to functionally give any comment :/

marielejeune avatar Feb 13 '24 14:02 marielejeune

Thanks @marielejeune , if you know a Belgian accounting person do not hesitate to ping him/her.

remytms avatar Feb 13 '24 15:02 remytms

@luc-demeyer You may be interested by this pull request. :)

remytms avatar Feb 13 '24 15:02 remytms

Hi @remytms I am trying your script on a customer's database migration. I'll give you a complete feedback when I'll finish the migration. But I already have a functional question, since I'm not an accounting specialist. I got the following error:

There is several account.tax found for the account.tax.template ID 141 '21% EU S.' that are used on account.move.line. Clean up account.tax by renaming your specific account.tax and migrate it via a dedicated script. The matching account.tax ID 133, 551

Indeed, both taxes with ID 133 and 551 have the same name, look the same, but one of them is linked to Company 1 (Belgian company) and the second one is linked to Company 2 (also Belgian company).

Is it a problem to have 2 taxes coming from the same tax template? If yes, what should have been done when initializing invoicing for these 2 companies? Duplicate the tax templates?

marielejeune avatar Feb 23 '24 09:02 marielejeune

Indeed as @marielejeune said I think this does not work if you have multiple companies in Belgium, as the taxes will be duplicated - but not the tax templates, as they are created through XML. You should loop on the companies, change the signature of find_account_tax(env, xmlid, account_tax_template) to find_account_tax(env, xmlid, account_tax_template, company) and search both the taxes and the move lines restricted to company.

fd-oncodna avatar Feb 26 '24 15:02 fd-oncodna

@marielejeune @fd-oncodna Thanks a lot for your remark and suggestion about multi-company. Changes added.

remytms avatar Mar 13 '24 14:03 remytms

I close this PR in favor of this one: #4432

remytms avatar May 22 '24 10:05 remytms