Changeset 2060 for WAeUP_SRP/trunk/skins/waeup_utilities
- Timestamp:
- 26 Jul 2007, 20:14:20 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_utilities/ti_167_resolve.py
r2059 r2060 40 40 cost = batch.getObject().getContent().cost 41 41 batch_cost[prefix_batch] = cost 42 # query = Eq('prefix_batch',prefix_batch) 43 # pins = aq_pins(query) 44 # for pin in pins: 45 # context.portal_pins.modifyRecord(pin=pin.pin,cost=cost) 46 # logger.info("finished to insert cost property into pins-catatlog") 42 query = Eq('prefix_batch',prefix_batch) 43 pins = aq_pins(query) 44 for pin in pins: 45 context.portal_pins.modifyRecord(pin=pin.pin,cost=cost) 46 #rwrite("%s, %s" % (prefix_batch,cost)) 47 logger.info("Cost %s (for %s) in portal_pins replaced" % (cost,prefix_batch)) 47 48 query = Eq('portal_type',"Payment") 48 49 payments = aq_portal(query) … … 56 57 if batch_cost.has_key(prefix_batch): 57 58 count += 1 58 payment_doc.edit(mapping = {'amount': 59 payment_doc.edit(mapping = {'amount': 59 60 batch_cost[prefix_batch]}) 61 #rwrite("%s: %s:%s" % (count,prefix_batch,payment_doc.order_id)) 62 logger.info("Cost in payment object %s (%s) replaced (#%s)" % (payment.id,payment_doc.order_id,count)) 60 63 else: 61 rwrite("cost %s:%s not found" % (prefix_batch,payment_doc.order_id)) 64 #rwrite("cost %s:%s not found" % (prefix_batch,payment_doc.order_id)) 65 logger.info("Prefix %s (%s) not found" % (prefix_batch,payment_doc.order_id)) 62 66 no_cost +=1 63 67 logger.info("updated %d payment amounts, %d costs not found" % (count,no_cost)) 64 68 65 69
Note: See TracChangeset for help on using the changeset viewer.