~mga/openobject-addons/account_india

« back to all changes in this revision

Viewing changes to stock_planning/stock_planning.py

  • Committer: Fabien Pinckaers
  • Date: 2008-12-14 16:48:05 UTC
  • Revision ID: fp@tinyerp.com-20081214164805-el7vuhu6p54ftv5y
improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
204
204
    def _get_planned_sale(self, cr, uid, ids, field_name, arg, context):
205
205
        res = {}
206
206
        for val in self.browse(cr, uid, ids):
207
 
            cr.execute('select sum(product_qty) from stock_planning_sale_prevision where product_id = %d and period_id = %d',(val.product_id.id,val.period_id.id))
 
207
            cr.execute('select sum(product_qty) from stock_planning_sale_prevision where product_id = %s and period_id = %s',(val.product_id.id,val.period_id.id))
208
208
            product_qty = cr.fetchall()[0][0]
209
209
            res[val.id] = product_qty
210
210
        return res