-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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][16.0] Sale Margin Update #3374
base: 16.0
Are you sure you want to change the base?
Conversation
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.
Hi @ljimenezsidoo great to see your contribution. You are proposing a new addon so I would prefer make a deeper description of PR's digging on the specific requirement is trying to fulfill, comparing maybe with standard behavior or whether it is possible with a functional approach to address the real issue. If You clarify those points I think will be more helpful to understand what is this about. Maybe U can tag me then. Thank U.
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This modules use a wizard to update the margin on sale orders. |
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'm not either a native English speaker but I think this is not what U said in PR the addon does, and It's not the same U are pointing in manifest's summary.
|
||
* Go to desire sale order | ||
* Close to margin field there is a button with refresh icon | ||
* This open new wizard and you can update the 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.
Again, Does it update margin or unit_price?
|
||
{ | ||
"name": "Sale Margin Update", | ||
"summary": "Recalculate expected unit price from 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.
I think this is more aligned to what U written in PR's description.
1 - self.sale_margin_percent / 100 | ||
) | ||
price_unit_with_discount = price_subtotal / line.product_uom_qty | ||
line.price_unit = price_unit_with_discount / (1 - (line.discount / 100)) |
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.
At the end, I think it's recomputing price_unit field right?
Recalculate expected unit price from margin using new wizard on sale order