~mga/openobject-addons/account_india

« back to all changes in this revision

Viewing changes to dm/campaign.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:
1137
1137
 
1138
1138
                    """If the product is a compound product (BoM) => Add Subproducts infos in document notes"""
1139
1139
                    note = []
1140
 
                    cr.execute("select id from mrp_bom where product_id = %d limit 1" % (pline.product_id.id))
 
1140
                    cr.execute("select id from mrp_bom where product_id = %s limit 1" % (pline.product_id.id))
1141
1141
                    bom_id = cr.fetchone()
1142
1142
                    if bom_id:
1143
1143
                        bom = self.pool.get('mrp.bom').browse(cr, uid, [bom_id[0]])[0]
1301
1301
 
1302
1302
                        """Create 1 PO for the main supplier"""
1303
1303
                        """Get the main supplier = the 1st product supplier with sequence = 1"""
1304
 
                        cr.execute('select name from product_supplierinfo where product_id = %d and sequence = 1', (pline.product_id.id,))
 
1304
                        cr.execute('select name from product_supplierinfo where product_id = %s and sequence = 1', (pline.product_id.id,))
1305
1305
                        res = cr.fetchone()
1306
1306
                        supplier = self.pool.get('res.partner').browse(cr,uid,[res[0]])[0]
1307
1307
                        partner_id = supplier.id