[6.0.2] stock_planning: outgoing_before field in stock.planing is not correctly computed

Bug #802569 reported by Jordi Esteve (www.zikzakmedia.com)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

[6.0.2] stock_planning: outgoing_before field in stock.planing is not correctly computed.

The quantity in the 'Planned out' field (planned_outgoing) is not added between the start date of the current period and one day before the start of the computed period.

It works well doing this change in stock_planning/stock_planning.py file:

 @@ -338,7 +338,7 @@
                      FROM stock_planning AS planning \
                      LEFT JOIN stock_period AS period \
                      ON (planning.period_id = period.id) \
 - WHERE (period.date_stop >= %s) AND (period.date_stop <= %s) \
 + WHERE (period.date_stop >= %s) AND (period.date_start <= %s) \
                          AND (planning.product_id = %s) AND (planning.company_id = %s) \
                      GROUP BY planning.product_uom", \
                          (date_start, date_stop, val.product_id.id, val.company_id.id,))

Related branches

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Medium
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Atik Agewan(OpenERP) (aag-openerp) wrote :

Hello Jordi,

Thanks for reporting,
It has been fixed in lp:~openerp-dev/openobject-addons/trunk-bug-802569-aag
Revision ID: <email address hidden>
Revision num: 4883.
It will be available in trunk soon,

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
qdp (OpenERP) (qdp) wrote :

Hello Jordi,

unfortunately i can't find any situation where the outgoing_before field is wrongly computed. Can you provide me such a use case?
For me, it's clear that the periods that should be considered are all the ones that have a date_stop between
-the date_start of current period
-the day before the date_start of the period set on the stock planning
... and this is the case. In the case where current period = period set on the stock planning, then it will give 0 and this is the logical behavior.

Where am i wrong?
Quentin

Changed in openobject-addons:
status: Fix Committed → Incomplete
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Jordi,

stock_planning doesn't exist any more on latest v7 as well as trunk. stock_planning are totally deprecated from addons.
So this bug doesn't exists on latest version as well as trunk, Thats why I am closing this issue.

Thank you!

Changed in openobject-addons:
status: Incomplete → Invalid
assignee: OpenERP R&D Addons Team 2 (openerp-dev-addons2) → nobody
importance: Medium → Undecided
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.