TypeError: object of type 'BrowseRecordIterator' has no len()

Bug #1379411 reported by Quentin THEURET @Amaris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OERPLib
Fix Released
Undecided
Unassigned

Bug Description

We cannot check the length of a 'BrowseRecordIterator'.

To reproduce:

len(self.get('purchase.order').browse(1).order_lines) returns an error.

Revision history for this message
Sébastien Alix (sebastien-alix) wrote :

Hi Quentin! Ça va ? :)

Indeed, I will fix that. As a workaround, you can do this:

>>> len(self.get('purchase.order').browse(1).order_lines.ids)

Otherwise, we are migrating OERPLib on GitHub (thanks to Nhomar): https://github.com/osiell/oerplib
I will update this Launchpad project later after the next release.

Revision history for this message
Sébastien Alix (sebastien-alix) wrote :
Changed in oerplib:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.