Skip to content
Snippets Groups Projects
Commit 1495b54a authored by Touati Djamel (otd)'s avatar Touati Djamel (otd)
Browse files

[FIX] purchase_stock: don't set effective_date only for return pickings

Steps to reproduce the bug:
- Create a storable product “P1”:
    - route: dropship

- Create a purchase order:
    - customer: Azure interior
    - Deliver to: Dropship
    - Dropship Address: any address
    - Receipt Date: Tomorrow
    - Product: “P1”

- Conform the Picking
- Go to the dropship transfer:
    - Validate the picking

- Go to the Scheduled Action > Purchase reminder
- Run Manually

Problem:
The reminder email for the delivery is sent While the picking is in the
'done' status.

When we run the Scheduled action, the `_send_reminder_mail` function is
triggered in which we get the orders with the `_get_orders_to_remind`
function but we filter the purchase orders which have an "effective_date"
already set:
https://github.com/odoo/odoo/blob/181c7d82e30d0848bbac7f7d0188e81aced0af07/addons/purchase_stock/models/purchase.py#L279

but as in drop-shipping, the dest location is customer and the
"effective_date" is not set:
https://github.com/odoo/odoo/blob/16.0/addons/purchase_stock/models/purchase.py#L53



opw-3246218

closes odoo/odoo#118064

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent ac11470b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment