← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 653789] Re: sale sale.py picking rate wrong calculation

 

*** This bug is a duplicate of bug 613063 ***
    https://bugs.launchpad.net/bugs/613063

--Based on the trunk sale/stock testing done by my colleagues for 6.0 migration.
Ferdinand seems true.


** This bug has been marked a duplicate of bug 613063
   [sale][regression] picked status/progress bar isn't updated properly on sale order
 * You can subscribe to bug 613063 by following this link: https://bugs.launchpad.net/openobject-addons/+bug/613063/+subscribe

-- 
sale sale.py picking rate wrong calculation
https://bugs.launchpad.net/bugs/653789
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: New

Bug description:
IMHO the following statement must check for m.state instead of mp.state to measure the picking rate 
the procurement has nothing to do with the picking !?

    def _picked_rate(self, cr, uid, ids, name, arg, context=None):
        if not ids:
            return {}
        res = {}
        for id in ids:
            res[id] = [0.0, 0.0]
        cr.execute('''SELECT
                p.sale_id,sum(m.product_qty), mp.state as mp_state
            FROM
                stock_move m
            LEFT JOIN
                stock_picking p on (p.id=m.picking_id)
            LEFT JOIN
                mrp_procurement mp on (mp.move_id=m.id)
            WHERE
                p.type != 'internal' AND
                p.sale_id in ('''+','.join(map(str, ids))+''')
            GROUP BY mp.state, p.sale_id''')