-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
[MIG][12.0] account_invoice_margin: Migration to v12.0 #66
[MIG][12.0] account_invoice_margin: Migration to v12.0 #66
Conversation
8ebfc8f
to
166ba4f
Compare
ee3cf22
to
ecb81bf
Compare
Squashed administrative commits |
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.
Could you make a dependency to the module product_replenishment_cost
and replace the line
purchase_price = self.product_id.standard_price
by
purchase_price = self.product_id.replenishment_cost
https://github.com/OCA/margin-analysis/tree/12.0/product_replenishment_cost
It will allow easy overload.
Thanks !
Otherwise, LGTM. Thanks for porting this usefull module.
@legalsylvain sorry, but we don't want to introduce new dependencies for something not useful for us. There are 2 options:
|
I understand, even if it is the objective of this OCA module is to harmonize, the use of standard_price. Well, at least, could you just add a function to allow easily overload, avoiding to rewrite functions ? Thanks. Add :
And :
|
@legalsylvain Hi, I think that this changes would be done in a base module that returns the field or method to read price standard_price and other fields for analysis purposes and the other modules must denpend of this... |
@sergio-teruel said :
@pedrobaeza said :
I see it a little bit contradictory. @sergio-teruel : what about to implement my last proposal. I see it as very light change, without impact, and let developpers to overload the function as they want. If you have no time, I can do this little change, no problem. |
@legalsylvain it's not contradictory, because you are quoting just part of the reply. My colleague is proposing to open an issue for discussing the best way to implement it (as you know we always want the best in the ecosystem), but do it in the future (probably on v13), not now, due to time constraints. The problem I see analyzing your proposal is that it's not possible to have a method (or not performant) on the invoice report: https://github.com/OCA/margin-analysis/pull/66/files#diff-d561cc05dc73b10d983544aff45e51e7R14 |
Hi, I think that I didn't explain correctly my request. i think that it is harmless, and allow customization, regarding purchase_price computation. Is it OK for you ? |
@sergio-teruel the module product_replenishment_cost seems pretty basic to me. |
@legalsylvain yes, I have mixed things about fields. I have merged your PR. |
@sergio-teruel this is missing the recent patch #64. Or is not needed anymore? |
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.
thanks !
LGTM. Code review. No test.
@pedrobaeza #64 is now in commit history |
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.
Fix missing
[UPD] README.rst [UPD] Update account_invoice_margin.pot Translated using Weblate (Spanish) Currently translated at 100.0% (7 of 7 strings) Translation: margin-analysis-11.0/margin-analysis-11.0-account_invoice_margin Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-11-0/margin-analysis-11-0-account_invoice_margin/es/
[UPD] README.rst
…t invoice margin security group set
[FIX] account_invoice_margin: Set purchase_price when user has not set invoice margin security group set
df133f8
to
ebef67c
Compare
Now yes.... |
/ocabot merge |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 6ea3bee. Thanks a lot for contributing to OCA. ❤️ |
Seems that my commit (Tecnativa#1) has been lost in the last rebase. I don't understand why ? |
@sergio-teruel you always have to do |
Thanks for your quick answer !
No need. I'm currently working on a PR. I'll do it. |
OK, I'll wait then. |
cc @Tecnativa TT20158
@carlosdauden @chienandalu Canyou reviw?