python - Issue with Purchase Requisition Module - OpenErp -


i got error when click on "confirm requisition" button in module "purchase requisition"

 file "c:\program files\openerp 7.0-20130321-002353\server\server\openerp\addons\purchase_requisition\purchase_requisition.py", line 215, in wkf_confirm_order attributeerror: 'purchase.order' object has no attribute 'signal_purchase_cancel' 

the error code in 'purchase_requisition.py' follows:

class purchase_order(osv.osv): _inherit = "purchase.order" _columns = {     'requisition_id' : fields.many2one('purchase.requisition','purchase requisition') }  def wkf_confirm_order(self, cr, uid, ids, context=none ):     res = super(purchase_order, self).wkf_confirm_order(cr, uid, ids, context=context)     proc_obj = self.pool.get('procurement.order')     po in self.browse(cr, uid, ids, context=context):         if po.requisition_id , (po.requisition_id.exclusive=='exclusive'):             order in po.requisition_id.purchase_ids:                 if order.id != po.id:                     proc_ids = proc_obj.search(cr, uid, [('purchase_id', '=', order.id)])                     if proc_ids , po.state=='confirmed':                         proc_obj.write(cr, uid, proc_ids, {'purchase_id': po.id})                     self.signal_purchase_cancel(cr, uid, [order.id])                 po.requisition_id.tender_done(context=context)     return res  purchase_order() 

i did not develop module, cause of error?

any appreciated, in advance!

i think have not latest code.

in local code this:

class purchase_order(osv.osv):     _inherit = "purchase.order"     _columns = {         'requisition_id' : fields.many2one('purchase.requisition','purchase requisition')     }     def wkf_confirm_order(self, cr, uid, ids, context=none):         res = super(purchase_order, self).wkf_confirm_order(cr, uid, ids, context=context)         proc_obj = self.pool.get('procurement.order')         po in self.browse(cr, uid, ids, context=context):             if po.requisition_id , (po.requisition_id.exclusive=='exclusive'):                 order in po.requisition_id.purchase_ids:                     if order.id<>po.id:                         proc_ids = proc_obj.search(cr, uid, [('purchase_id', '=', order.id)])                         if proc_ids , po.state=='confirmed':                             proc_obj.write(cr, uid, proc_ids, {'purchase_id': po.id})                         wf_service = netsvc.localservice("workflow")                         wf_service.trg_validate(uid, 'purchase.order', order.id, 'purchase_cancel', cr)                     po.requisition_id.tender_done(context=context)         return res 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -