-
Notifications
You must be signed in to change notification settings - Fork 6
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
[ADD] grap_pos_change_sale_move: Aggregate policy #25
base: 12.0
Are you sure you want to change the base?
Conversation
I see now that you have split the module |
Hi @remytms thanks for this work !
Just a question :
|
Hi @legalsylvain , Thanks for this quick review !
Yes, the goal was to add functionality but not modify the default behaviour of this module.
I agree that this config is lonely on the res.company. My point of view is that putting this config on
I think it can be good like this. But to be more generic, I think one option should be to have the default Odoo behaviour. Sort of bypass for this module, especially if the configuration is put on the
I have to check that the aggregation works fine when there is multiple taxes applied on the same product. I didn't achieve to have the good amount on the tax move.line, because it seams that Odoo tries to compute the vat_excl price based on the vat_incl price. But that give wrong amount of tax. Ex: Product with 5% and 20% VAT : 10€ (VAT excl) -> 12,5€ (VAT incl) But when odoo tries to get the vat_excl price from the vat_incl, it seams to compute like this: VAT 5% -> 12,5 / 1,05 and VAT 20% -> 12,5 / 1,20. But that's not correct. So I moved to tax based on the vat_excl price. So that all price are given VAT excl, and things are computed well. |
I don't think so ! 10€ VAT excl = 12 VAT incl. (10 * 1.2) |
I agree with your example, but it states that there is only one tax that is applied to the product. I'm talking about a product with two different taxes on the same product. I created such a product in the test data: (https://github.com/grap/grap-odoo-custom-account/pull/25/files#diff-6960beb0255a39910bdea429eb48d6c7f2f7cebbc3d83b24e43e60e4f9616d16R46). So the 5% tax and the 20% tax apply on the base price. 12,5€ (incl taxes) = 10 € + (10 € * 0,05) + (10 € * 0,20). Do you get my point ? I edited the computation of the price incl taxes |
ca3b3c6
to
f1e2da0
Compare
Codecov Report
@@ Coverage Diff @@
## 12.0 #25 +/- ##
==========================================
- Coverage 84.10% 77.54% -6.56%
==========================================
Files 55 27 -28
Lines 1082 726 -356
Branches 175 0 -175
==========================================
- Hits 910 563 -347
- Misses 139 163 +24
+ Partials 33 0 -33
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
0662221
to
bd05e9f
Compare
bd05e9f
to
2d5ee71
Compare
@legalsylvain I've made some little changes on this module (commits seams explicit). I also upgraded the README and added a migration file. Module will be fully tested by accountant at BEES coop. I will let you know what's the results of theses tests. |
Hi @remytms. what is the result of your test ? |
0e21100
to
28065fc
Compare
This PR has been in production for us for a while. It recently disappeared from our test instance due to merge conflicts. I've fixed the conflicts and force-pushed. @remytms Please take a look at this PR when you're back from holidays :) |
Add a new parameter on res.company to choose how move.line are aggregated when closing a pos.session. Two options can be selected: 1. "Group by account and tax", it means that: - product move.line are aggregated by account and by taxes. - tax move.line are aggregated by tax. - only one counter part move.line are written for the whole pos.session 2. "Group by account, tax and partner", it means that: - product move.line are aggregated by account, by taxes and by partner. - tax move.line are aggregated by tax and by partner. - counter part move.line are aggregated by partner. This is a first attempt. Readme should be changed later when these changes will be validated.
As account.move.line are grouped by tax, showing tax name in the name of the account.move.line help to find maching lines between tax lines and product selling lines.
The purpose of this migration file is to set the right Sale Move Policy for databases where the previous version of this module was installed in order to not change the behaviour of this module on theses databases.
28065fc
to
bd6dc59
Compare
rebased on top of the 12.0 branch. |
@legalsylvain As @carmenbianca suggested this PR has been in production for a while and accountant seams to be happy with it. |
Hi @remytms : Is it OK if I let your PR open ? And when I migrate in V16, I integrate your work ? |
Yes, it's OK. You can ping me to review the migration if you want. |
Add a new parameter on res.company to chose how move.line are
aggregated when closing a pos.session.
Three options can be selected:
This is a first attempt. Readme should be changed later when these
changes will be validated.
Coop IT Easy linked task