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] sale_loyalty_discount_attribute #97

Closed

Conversation

diogocsc
Copy link

No description provided.

@diogocsc diogocsc force-pushed the feat-dc-sale-loyalty-discount-attribute branch from 874df77 to c8ff0e6 Compare January 18, 2023 13:37
@diogocsc diogocsc force-pushed the feat-dc-sale-loyalty-discount-attribute branch from c8ff0e6 to 3dc2b2d Compare January 18, 2023 13:45
class SaleOrder(models.Model):
_inherit = "sale.order"

def _get_reward_values_discount(self, reward, coupon, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

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

@diogocsc Can you please add a test case for this?

Copy link
Author

Choose a reason for hiding this comment

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

Added unit tests in later commit

discount.update({"price_unit": price_unit})
return_res.append(discount)

return return_res
Copy link
Member

Choose a reason for hiding this comment

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

My feeling is that it should return resand the return_Resvariable is not needed.

Copy link
Author

Choose a reason for hiding this comment

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

Replaced in latest commit, using an index to update res.

@diogocsc diogocsc requested a review from dreispt February 1, 2023 12:00
"price_unit": 10.0,
}

def setUp(self):

Choose a reason for hiding this comment

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

@diogocsc Could you change this to setUpClass ?

Copy link
Member

Choose a reason for hiding this comment

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

Ping @diogocsc

@dreispt
Copy link
Member

dreispt commented Mar 30, 2023

@diogocsc CI is red, can you check please?

@dreispt
Copy link
Member

dreispt commented Mar 30, 2023

Seems like an odd pre-commit install error. Maybe with your new push the build gets green.

attributes_wise_price_unit = 0.0
for so_lines in self.order_line.filtered(
lambda l: not l.reward_id
and l.product_id.id in reward.discount_product_ids.ids
Copy link
Member

Choose a reason for hiding this comment

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

@Nikul-OSI We can also pick a product Category. Would this work in that case?

Choose a reason for hiding this comment

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

@dreispt No, This for only product which is selected on rewards.

image

@Nikul-OSI Nikul-OSI force-pushed the feat-dc-sale-loyalty-discount-attribute branch from d7e9e7b to 7e87530 Compare September 11, 2023 11:34
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 14, 2024
@github-actions github-actions bot closed this Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants