[16.0][FIX] account_invoice_fixed_discount,account_invoice_triple_discount: Remove excludes#2109
Conversation
83118b3 to
32adefd
Compare
legalsylvain
left a comment
There was a problem hiding this comment.
Hi @hildickethan Thanks a lot to try to fix this problem.
Unfortunately, the current design you propose generate trouble in many places I think. For exemple, the data in the reports will be wrong, when discount_fixed is set, also the PDF will display bad things to customers.
Since these modules have co-existed until now without that feature taken care of,
In fact no. AFAIK, both modules never worked together. But the problem was hidden. If you don't think so, please mention the version where both module installed was working correctly. Thanks !
32adefd to
24d73f3
Compare
24d73f3 to
fbcb82f
Compare
Sorry, but I'm not conviced by the objective of this PR. Could we talk about it in the general issue, to avoid you loose time implementing something ? OCA/sale-workflow#3638 |
account_invoice_triple_discount/models/triple_discount_mixin.py
Outdated
Show resolved
Hide resolved
legalsylvain
left a comment
There was a problem hiding this comment.
if I summary, do you think it's possible to add a little glue module that
- adds a warning for end users, as you proposed here OCA/sale-workflow#3638 (comment) (or better, to hide triple discount fields), if fixed discount is != 0.
Thanks !
account_invoice_triple_discount/models/triple_discount_mixin.py
Outdated
Show resolved
Hide resolved
64f19e4 to
46a6ce0
Compare
|
@legalsylvain With the new changes and the glue module this is what I have ended up with, what do you think? Screenshots inside the details Example invoice PDF with a line with fixed discount and triple (wrong), normal triple discount and a normal fixed discount |
46a6ce0 to
cf3143c
Compare
0fa3a67 to
6a2f4ac
Compare
|
|
64f54f8 to
519fef7
Compare
legalsylvain
left a comment
There was a problem hiding this comment.
Thanks a lot !
Code review. No test. Lgtm !
Thanks you a lot to take time for this compatibility
519fef7 to
5c20f5f
Compare
|
One last push for i18n files so the warning can be translated |
5c20f5f to
ca18bb2
Compare
|
@OCA/accounting-maintainers : could you take a look over there ? thanks ! |
The goal is to keep the sale refactor in line with the invoice one. OCA/account-invoicing#1840 OCA/account-invoicing#2109
The goal is to keep the sale refactor in line with the invoice one. OCA/account-invoicing#1840 OCA/account-invoicing#2109
The goal is to keep the sale refactor in line with the invoice one. OCA/account-invoicing#1840 OCA/account-invoicing#2109
lmignon
left a comment
There was a problem hiding this comment.
LGTM (Functional tests) + Code review
legalsylvain
left a comment
There was a problem hiding this comment.
/ocabot merge nobump
|
Sorry @legalsylvain you are not allowed to merge. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
|
hi @OCA/accounting-maintainers Could you merge this one ? |
sergiocorato
left a comment
There was a problem hiding this comment.
Only a little remark, only code check, thanks!
|
depends on #2268 |
|
@hildickethan a rebase now should be very useful! |
2a7ee54 to
154f24b
Compare
154f24b to
5d9dd7c
Compare
|
@sergiocorato tests added + rebase |
|
Good work! |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 2dccb17. Thanks a lot for contributing to OCA. ❤️ |
The goal is to keep the sale refactor in line with the invoice one. OCA/account-invoicing#1840 OCA/account-invoicing#2109
The goal is to keep the sale refactor in line with the invoice one. OCA/account-invoicing#1840 OCA/account-invoicing#2109
The goal is to keep the sale refactor in line with the invoice one. OCA/account-invoicing#1840 OCA/account-invoicing#2109








Follow-up to the changes merged in #1840
Since having these modules in excludes ends up being a bit problematic and messy in github and existing installations that might have both installed, I think the better approach is nullifying the functionality of one of them when both are installed.
IMO if both are set the fixed discount should take priority, since the general sentiment when adding a fixed discount you're thinking "I just want to discount 20€ from this line".
Optimally, you would have a way of both co-existing and computing taking each other into account (ideally also the general and global discount modules would be included in this), but that would require a glue module. Since these modules have co-existed until now without that feature taken care of, I don't think it's a practical use case and not worth the time to implement it until someone needs it.
With these changes the modules can be co-installed and you can use either, just not simultaneously on the same line as the fixed will take priority.
If this seems OK, I will supersede OCA/sale-workflow#2885 and add them so we can get that merged also and finish this refactor
Screenshots