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

[16.0][FIX] product_configurator_sale: pricelist with discount included in price #149

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

Conversation

techgrrow
Copy link

@techgrrow techgrrow commented Jan 29, 2025

Price was not updating when on the sale order was set a pricelist with discout included in price.

Fix of issue #148

price was not updating when on the sale order was set a pricelist with discout included in price
@OCA-git-bot
Copy link
Contributor

Hi @PCatinean,
some modules you are maintaining are being modified, check this out!

@@ -64,12 +64,26 @@ def _compute_price_unit(self):
for line in self:
if line.config_session_id:
account_tax_obj = self.env["account.tax"]
config_price = line.config_session_id.price
# context = self.env.context

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comments

# self = self.with_context(config_price=config_price)

# import ipdb; ipdb.set_trace()
if line.order_id.pricelist_id.discount_policy == "with_discount":

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if line.order_id.pricelist_id.discount_policy == "with_discount":
if line.order_id.pricelist_id.discount_policy == "with_discount" and line.product_id:

This will solve issues with failing tests.

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.

3 participants