-
-
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
[16.0][ADD] sale_lead_time_profile #3539
base: 16.0
Are you sure you want to change the base?
Conversation
2619b9b
to
e9a7924
Compare
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.
Partial review.
e9a7924
to
d0fe46b
Compare
d0fe46b
to
0ff8e28
Compare
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.
This looks very very specific too me, with too many hardcoded values, and doesn't look specific enough to applicable in other contexts...
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 |
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 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.
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