In the case of a manufactured buffer, the planned date computation depends on the bom context location. Changing the context location on the bom shows how the dlt is affected.
When we procure manually a buffer with the wizard, it prepares the lines based on the location of the buffer. However, the planned date is based on the "Stock" location dlt instead of that procurement location.
It looks to me that when buffer._get_date_planned() is called in ddmrp/wizards/make_procurement_buffer.py
|
"date_planned": buffer._get_date_planned(), |
it's missing to put the location in the context
|
if self.env.context.get("location_id", None): |
The consequence, in my case, is that the planned date is using the supplier lead time instead of the dlt of buffered components. On Stock it's purchased, on the production location it is buffered.
cc @LoisRForgeFlow @BernatPForgeFlow @JordiBForgeFlow @meredith-alana @Highcooley
In the case of a manufactured buffer, the planned date computation depends on the bom context location. Changing the context location on the bom shows how the dlt is affected.
When we procure manually a buffer with the wizard, it prepares the lines based on the location of the buffer. However, the planned date is based on the "Stock" location dlt instead of that procurement location.
It looks to me that when
buffer._get_date_planned()is called in ddmrp/wizards/make_procurement_buffer.pyddmrp/ddmrp/wizards/make_procurement_buffer.py
Line 33 in 8a98e41
it's missing to put the location in the context
ddmrp/ddmrp/models/mrp_bom.py
Line 66 in 8a98e41
The consequence, in my case, is that the planned date is using the supplier lead time instead of the dlt of buffered components. On Stock it's purchased, on the production location it is buffered.
cc @LoisRForgeFlow @BernatPForgeFlow @JordiBForgeFlow @meredith-alana @Highcooley