-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
[16.0][l10n_br_fiscal][IMP] l10n_br_fiscal: standardize data+demo load #3567
Conversation
Hi @renatonlima, |
815032a
to
1b18a91
Compare
2591ebc
to
eaa6458
Compare
pronto para revisão. Tirou tb mais de 500 linhas, coisa que é bom no modulo l10n_br_fiscal que já ta pesado demais... |
eaa6458
to
e786252
Compare
6bedbb0
to
8b60984
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Muito bom, parabéns pelo trabalho @rvalyi
Fica bem melhor essa nova abordagem.
8b60984
to
910d98e
Compare
@antoniospneto eu apenas fiz um force push para limpar o manifest https://github.com/OCA/l10n-brazil/compare/8b6098476cc28c11e350a0626c094d55fc4133c8..910d98e123fdc0a1e9e8c6afb6a8988f9f93c1b4 |
This PR has the |
vamos ver se os testes vão passar... |
/ocabot merge minor |
Hey, thanks for contributing! Proceeding to merge this for you. |
@rvalyi your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-3567-by-rvalyi-bump-minor. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
aquele problema das datas no mes de fevereiro, vamos ver amanhã... |
/ocabot merge minor |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 859b8d1. Thanks a lot for contributing to OCA. ❤️ |
Standardize the loading of all l10n_br_fiscal data + demo files.
In l10n_br_fiscal we have some very specific challenges:
This explains the peculiar loading hook we used in l10n_br_fiscal/hooks.py until now.
But after working on the isolation of the tests from the generic demo data, I also got convinced we could finally standardize the loading of the data + demo files.
In fact all it takes is a custom monkey patch of the odoo.tools.convert.convert_csv_file method to force noupdate=True for some files and to be able to filter and load only some demo records in demo/test mode for some large csv files.
Benefits:
NOTES: in 2022 the TIPI data was updated but the demo TIPI csv file kept using the old IPI from 2021 or before. So now that the tests and demo are using the same production ncm CSV file (a subset of it actually) I had to update a few tests to change the IPI from 5% to 3.25% for some products.