Skip to content
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

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

ljimenezsidoo
Copy link
Contributor

Recalculate expected unit price from margin using new wizard on sale order

Copy link

@rrebollo rrebollo left a 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.
Copy link

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
Copy link

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.",
Copy link

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))
Copy link

@rrebollo rrebollo Nov 3, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants