openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #01910
Re: [Merge] lp:~openerp-community/openerp-mgmtsystem/nc-extend into lp:openerp-mgmtsystem/6.1
Review: Needs Fixing no test, review
Hi,
Thanks for your changes.
You introduced a bug in your revision 53, you can't do that:
3122 + def case_reset(self, cr, uid, ids, context=None, *args):
The keyword arguments should always be after the positional arguments.
Your method will be parsed correctly, but if you try to call it using the keyword and some extra args:
case_reset(cr, uid, ids, context={}, arg1, arg2)
You'll have a syntax error:
SyntaxError: non-keyword arg after keyword arg
I think that the only way to have a keyword argument with *args is:
def case_reset(self, cr, uid, ids, *args, **kwargs):
context = kwargs.get('context')
--
https://code.launchpad.net/~openerp-community/openerp-mgmtsystem/nc-extend/+merge/140259
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openerp-mgmtsystem/nc-extend.
References