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][ADD] sale_lead_time_profile #3539

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

AungKoKoLin1997
Copy link
Contributor

This module enhances the sales order process by adding a delivery_lead_time that is determined based on the most closely matching lead time profile. This time is then incorporated into the customer_lead of each sale order line, optimizing delivery scheduling based on specific lead time configurations.

@qrtl QT4790

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-add-sale_lead_time_profile branch from 2619b9b to e9a7924 Compare January 16, 2025 07:21
@rousseldenis rousseldenis added this to the 16.0 milestone Jan 16, 2025
Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

Partial review.

sale_lead_time_profile/models/lead_time_profile.py Outdated Show resolved Hide resolved
sale_lead_time_profile/models/lead_time_profile.py Outdated Show resolved Hide resolved
sale_lead_time_profile/models/sale_order.py Outdated Show resolved Hide resolved
sale_lead_time_profile/models/sale_order.py Outdated Show resolved Hide resolved
sale_lead_time_profile/models/sale_order.py Show resolved Hide resolved
sale_lead_time_profile/views/lead_time_profile_views.xml Outdated Show resolved Hide resolved
sale_lead_time_profile/views/lead_time_profile_views.xml Outdated Show resolved Hide resolved
sale_lead_time_profile/views/lead_time_profile_views.xml Outdated Show resolved Hide resolved
sale_lead_time_profile/models/sale_order.py Outdated Show resolved Hide resolved
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-add-sale_lead_time_profile branch from e9a7924 to d0fe46b Compare January 17, 2025 02:54
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-add-sale_lead_time_profile branch from d0fe46b to 0ff8e28 Compare January 17, 2025 03:10
Copy link
Member

@mmequignon mmequignon left a comment

Choose a reason for hiding this comment

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

This looks very very specific too me, with too many hardcoded values, and doesn't look specific enough to applicable in other contexts...

Comment on lines +27 to +44
score += 1
else:
return -1
if self.partner_id:
if partner == self.partner_id:
score += 3
else:
return -1
elif self.state_id:
if partner.state_id == self.state_id:
score += 2
else:
return -1
elif self.country_id:
if partner.country_id == self.country_id:
score += 1
else:
return -1
Copy link
Member

Choose a reason for hiding this comment

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

I would make those configurable. Also, I think it lacks some comments. Why is partner +3 and not +42? I feel like this should be configured on the company.

And as I see it, I'm thinking that maybe we could sum values.
For a given profile, profile score is warehouse score + partner score + …, according to what the customer wants to.

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

Successfully merging this pull request may close these issues.

4 participants