diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2018-04-10 10:10:34 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim-odoo@users.noreply.github.com> | 2018-04-10 11:10:29 +0200 |
| commit | d64ce530711d924f2814f6646390967ab2441d7f (patch) | |
| tree | 47d1ea028784ecdedf3f29065df761d0d37d6923 /addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js | |
| parent | 77bf2c96af30ae17ff43e8a08d2ae81b3960b3fa (diff) | |
[FIX] stock_calendar: scheduled data
- Install stock_calendar
- Create a stockable product
- Add the route "Buy"
- Add a vendor with a delivery lead time of 30 days
- Create a reordering rule for x units
- Run the schedulers
A PO is created, but the scheduled date is set as today, not today + 30
days.
What happens is the following:
1. Since no `calendar_id` is defined on the orderpoint, `_get_group`
returns `[(now, None)]`
2. `now` is used in the `procurement_values` of the `res_groups` by
`_procurement_from_orderpoint_get_groups`
3. The `res_groups` values are used in `_procure_orderpoint_confirm`
when calling `_prepare_procurement_values`.
4. `_prepare_procurement_values` is overridden by `stock_calendar` to
set a value for `next_delivery_date`. At this point, the `now` value
is used.
5. Finally, when creating the PO line, `_prepare_purchase_order_line` is
overridden by `stock_calendar` to set the `next_delivery_date` as
`date_planned`.
So, `date_planned` becomes `now`.
There should not be any date set when no `calendar_id` is defined.
opw-1828371
Diffstat (limited to 'addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js')
0 files changed, 0 insertions, 0 deletions
