-
-
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
[16.0][MIG] sale_margin_delivered: Migration to 16.0 #183
[16.0][MIG] sale_margin_delivered: Migration to 16.0 #183
Conversation
…l on delivery purchase price [UPD] README.rst [UPD] Update sale_margin_delivered.pot Update translation files Updated by Update PO files to match POT (msgmerge) hook in Weblate.
…not delivered qty (OCA#43) [FIX] sale_margin_delivered: Set % delivered percent to quantities ordered if the line has not delivered quantities [ADD] icon.png
…to compute delivered margin. Other module tests fails [UPD] README.rst
…yer instead of stock move
… has not quantity delivered TT26105
…e to this Odoo commit OCA/OCB@8ca10a8
We don't want to compute margin based on stock moves for non storable products. This specially true for services and kits. TT33499
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.
code review.
Apart a dependency question. LGTM.
thanks !
"website": "https://github.com/OCA/margin-analysis", | ||
"category": "Sales", | ||
"license": "AGPL-3", | ||
"depends": ["sale_stock", "sale_margin_security"], |
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.
"depends": ["sale_stock", "sale_margin_security"], | |
"depends": ["sale_stock"], |
Please do not force to install module that are not required.
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.
But you need to depend on this module to be able to apply the permissions of the "sale_margin_security.group_sale_margin_security" group in the "sale_margin_delivered.view_order_form" view. Isn't it?
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.
can be a glue module. something like sale_margin_delivered_security
- module A : sale_margin_security deploy a restriction to hide margin to some users
- module B : sale_margin_delivered displays real delivered margin. (other feature).
user can want feature B without feature A.
Making both modules working together can be done with a glue module IMO.
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.
I agree with what you say Sylvain, someone who has the need to have those modules separately should feel free to make those changes.
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.
ok ! So I'll propose a PR against this PR.
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.
Done here : Tecnativa#2
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.
LGTM!!
Functional review ok
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.
waiting for some refactoring in the the dependency.
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.
/> | ||
<field | ||
name="margin_delivered_percent" | ||
string="% Margin" |
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.
string="% Margin" | |
string="% Margin dlvd. (%)" |
This string is error prone IMO. The standard margin (introduced in sale_margin) is name "Margin (%)".
if both fields are displayed, it is not possible for end user to know what are the field displayed. In my opinion, should "Margin dlvd. (%)"
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.
You are right much clearer and avoids leading to errors, thanks for everything :)
Please do a rebase to remove the merge commit. |
…_margin_delivered_security
9cae375
to
8bb1c62
Compare
/ocabot migration sale_margin_delivered |
@openupgrade.migrate() | ||
def migrate(env, version): | ||
if env["ir.module.module"].search( | ||
[("name", "=", "sale_margin_delivered"), ("state", "=", "installed")] |
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.
This is not needed, as if this is being executed is because the module is installed.
] | ||
) | ||
if sale_margin_delivered_security: | ||
sale_margin_delivered_security.button_immediate_install() |
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.
Don't do this, but just change the state to to install
.
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.
corrected :)
8bb1c62
to
6ef326b
Compare
] | ||
) | ||
if sale_margin_delivered_security: | ||
sale_margin_delivered_security.state = "installed" |
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.
sale_margin_delivered_security.state = "installed" | |
sale_margin_delivered_security.state = "to install" |
…ed_security TT44910
6ef326b
to
febd948
Compare
/ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 360dd59. Thanks a lot for contributing to OCA. ❤️ |
Hi. I had a unanswered question here : #183 (review) |
It can be an improvement, yes |
Supersede: #176
cc @Tecnativa TT44910
@chienandalu @sergio-teruel please review