Skip to content
Snippets Groups Projects
Commit 8d62eacf authored by Rémy Voet (ryv)'s avatar Rémy Voet (ryv)
Browse files

[FIX] *stock*, mrp: fix effective_date


- Avoid to truncate the hour/min/sec in the computation of the
effective date which is related to the `date_done`
of the first incoming picking.
- With manufacturing in 3-step (pbm_sam), the store picking
had a source document == "New". It was the case because
the `_get_move_finished_values` was call before the create
and the name is set only on create.
To fix this issue, during the `create` set the origin of all move.
- To avoid to maintain old views unused,
remove unused view of stock move.
- The computation of the products_availability json is too expensive
to be in tree view (2.5 times long with it) of picking.
It will be hard to optimize because the half the time
is due to _get_report_lines method - already in batch (on 80 records).
- Review buttons of the replenishment list to be more Odooer.
- In some cases the delay alert date was wrongly compute:
  - If we new dest_move_ids of a existant move, the delay alert date
    won't be compute.
  - If the state (to done) and the date are save in same write call
    the alert date of next move won't be reset.
To avoids these issues, refactor the alert date to be a compute stored
fields.
- To avoid any confusion between date expected in the replenishement
(in date) and the purchase order receipt date (datetime),
we put the receipt date at the middle of the day.
Also  On-Time Delivery Rate computation counts
only when date are bigger effective date trunced to date.
Also used the timezone of the company by default (if not user timezone)

task-2246665

closes odoo/odoo#55379

Related: odoo/upgrade#1586
Related: odoo/enterprise#12309
Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
parent 57f805f7
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment