Skip to content

Buffer Procurement Wizard planned date wrong for manufactured buffer #563

@jbaudoux

Description

@jbaudoux

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions