← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 754431] Re: stock: can't call draft_validate with new signature

 

Hello,

I forgot to mention the problem is calling the function from my custom
module. The related code is responsible for completing the picking
setting its state to 'done'.

with picking in current sale_order:
picks[0].draft_validate(cr, uid, [picks[0].id])

and the error is raised.

Thank you,

Eduardo

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/754431

Title:
  stock:  can't call draft_validate with new signature

Status in OpenERP Modules (addons):
  Incomplete

Bug description:
  when calling the function I get this error:

  [2011-04-08 11:12:15,541][sob60] ERROR:web-services:[09]:     picks[0].draft_validate(cr, uid, [picks[0].id])
  [2011-04-08 11:12:15,541][sob60] ERROR:web-services:[10]:   File "/home/eduardo/openerp60/openerp-server-6.0.2/bin/osv/orm.py", line 181, in <lambda>
  [2011-04-08 11:12:15,541][sob60] ERROR:web-services:[11]:     return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
  [2011-04-08 11:12:15,541][sob60] ERROR:web-services:[12]: TypeError: draft_validate() takes at most 5 arguments (7 given)

  I have noted the changes in the function and its signature:
  in v.5: def draft_validate(self, cr, uid, ids, *args):
  in v.6: def draft_validate(self, cr, uid, ids, context=None):
  the old version works fine for me in v.6 too.

  Eduardo



References