← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 837586] [NEW] date_expected not correctly updated

 

Public bug reported:

In the object "stock.picking" the method get_min_max_date() is used to
calculate the fields min_date and max_date. Therefore the field
'date_expected' of all stock moves is selected.

With the methods _set_minimum_date()  and _set_maximum_date() the
expected dates of all stock moves should be updated so that the function
get_min_max_date() reflects the desired date.

BUT:  _set_minimum_date()  and _set_maximum_date() update the field
'date' of the stock moves, whereas get_min_max_date() uses the field
'date_expected' of the stock moves to calculate the dates!

Example:

There is a stock picking with 1 stock move ('date': 8/30/2011, 'date_expected': 9/10/2011).
For the picking the following value is calculated: 'min_date': 9/10/2011

If I now change the 'min_date' of the picking to 9/12/2011, then the
'date' field of the stock move is set to 9/12/2011 also, but the
'date_expected' is not touched.

So after reloading the 'min_date' of the picking is set back to
9/12/2011 (since it is calculated using the 'date_expected' field of the
stock moves).

** Affects: openobject-addons
     Importance: Undecided
         Status: New


** Tags: date move stock

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/837586

Title:
  date_expected not correctly updated

Status in OpenERP Modules (addons):
  New

Bug description:
  In the object "stock.picking" the method get_min_max_date() is used to
  calculate the fields min_date and max_date. Therefore the field
  'date_expected' of all stock moves is selected.

  With the methods _set_minimum_date()  and _set_maximum_date() the
  expected dates of all stock moves should be updated so that the
  function get_min_max_date() reflects the desired date.

  BUT:  _set_minimum_date()  and _set_maximum_date() update the field
  'date' of the stock moves, whereas get_min_max_date() uses the field
  'date_expected' of the stock moves to calculate the dates!

  Example:

  There is a stock picking with 1 stock move ('date': 8/30/2011, 'date_expected': 9/10/2011).
  For the picking the following value is calculated: 'min_date': 9/10/2011

  If I now change the 'min_date' of the picking to 9/12/2011, then the
  'date' field of the stock move is set to 9/12/2011 also, but the
  'date_expected' is not touched.

  So after reloading the 'min_date' of the picking is set back to
  9/12/2011 (since it is calculated using the 'date_expected' field of
  the stock moves).

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/837586/+subscriptions


Follow ups

References