openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #09076
[Bug 956234] Re: Code error: schedulers.py order kwarg in read method
Hello,
I don't have any procedure to reproduce the steps which lead to the
portion of code impacted.
But one thing I'm sure is that the method read doesn't accept the argument "order" as it is actually at line 270:
procure_datas = procurement_obj.read(cr, uid, pro_ids, ['id', 'product_qty'], context=context, order='product_qty desc')
This leads to the error :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: read() got an unexpected keyword argument 'order'
I've attached a branch with the fix. The sort here is not necessary,
this is a very very small optimization in order to reduce the number of
loops.
I know you prefer to have steps to reproduce the issue, but thats a
coding error, it's easy to check the signature of the method read and
check that there is no "order" nor **kwargs arguments.
Thanks
Guewen
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/956234
Title:
Code error: schedulers.py order kwarg in read method
Status in OpenERP Addons (modules):
Incomplete
Bug description:
Hello,
At line 270 of schedulers.py in procurement addons:
http://bazaar.launchpad.net/~openerp/openobject-addons/6.1/view/head:/procurement/schedulers.py#270
you'll see that the read method is called with an extra keyword
argument "order" which is not in the read signature.
This stops the schedulers and it also seems that the cursor doesn't
close properly when this happens.
Thanks
best regards
Guewen
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/956234/+subscriptions
References