Skip to content

Conversation

@mpascuall
Copy link

This module automatically computes sale orders commitment date based on the product template sale_delay
and product attribute variant lead time fields.

cc https://github.com/APSL 14210
@miquelalzanillas @lbarry-apsl @javierobcn @peluko00 @BernatObrador @ppyczko please review

@mpascuall mpascuall force-pushed the 18.0-add-sale_order_compute_commitment_date branch from ad03179 to 01c9036 Compare June 26, 2025 08:15
@rousseldenis rousseldenis added this to the 18.0 milestone Jun 30, 2025
Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

class ProductTemplate(models.Model):
_inherit = "product.template"

extend_lead_time = fields.Boolean(
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO, this field name should reflect the attribute term as the name is too generic.

Something like attribute_extend_lead_time.

)

@api.depends(
"order_line.product_id",
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO, only order_line.product_id should be taken into account here.

You should manage the fact changing the delay, the product variant lead time or the extend configuration will trigger a compute on every existing sale order line that uses that product. And that is unwanted behavior

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.

2 participants