diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-07-26 09:55:26 +0200 |
|---|---|---|
| committer | Pierre Masereel <pim@odoo.com> | 2016-11-21 13:50:52 +0100 |
| commit | a572b8115cdaa3a28f5c977a6006ddfa95647987 (patch) | |
| tree | 6619b4f210ec72cfc3c69cbe5197b530bebadc7f /addons/website/static/src/xml/website.contentMenu.xml | |
| parent | bcf1e38af8cdd800e5ef516895a83e3d64af83e8 (diff) | |
[FIX] purchase: do not reset expected date
A misleading behavior occurs with the recomputation of scheduled date.
Here is the use case:
- Create a PO with 2 products
- For the product 1, set the scheduled date to today + 7 days
- For the product 2, set the scheduled date to today + 14 days
When saving, the scheduled date of product 2 is reset to today + 7 days.
This is of course unexpected, but moreover, a different behavior can
happen depending on how the scheduled dates are modified. In the
previous case (both products have now the same scheduled date), one can
observe 2 situations.
Case 1.
For the product 2, set the scheduled date to today + 14 days and save.
In this case, the scheduled date of product 2 is not reset.
Case 2.
- For the product 1, set the scheduled date to today + 8 days
- For the product 2, set the scheduled date to today + 14 days
In this case, the scheduled date of product 2 is reset to today + 8 days
when saving
The reason of a different behavior in the 2 situations is that the
scheduled date of the PO is changed in case 2 and not in case 1. Since
the scheduled date of the PO is changed, it triggers the inverse
function `_inverse_date_planned`.
When saving, it is not possible to know whether the scheduled date of
the PO was changed on purpose by the user or recomputed. There are 2
solutions to get a consistent behavior:
- Force the scheduled date of each line to be the same than the
scheduled date of the PO. However, this makes the scheduled date of
the line useless.
- Do not change the scheduled date of the lines when the schedued date
of the PO is changed. However, this removes the ability to reset
automatically the scheduled date of the all lines at once.
This is the second solution which is chosen with this commit.
opw-682934
opw-684063
Closes #12904
Backport of rev: https://github.com/odoo/odoo/commit/4326d864d83125abc8f82dfb0089021abf22f9ca
opw-692873
Diffstat (limited to 'addons/website/static/src/xml/website.contentMenu.xml')
0 files changed, 0 insertions, 0 deletions
