Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openobject-client-web/6.0-opw-578685-msh into
lp:openobject-client-web.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-578685-msh/+merge/122486
Hello,
Fixed the issue of many2many pager inconsistent behaviour.
Demo:- Create some more records in many2many like in partner category I have
500 records and limit is 50, so now to check inconsistency just click on next
paging records in 2/3 times you will get the issue.
when you click next records 2/3 times the count is shown proper but the record
will not be appear.
Reason :- The issue is generated due to
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-383682-msh/+merge/93358
but now after this fix we don't need assign current.ids to ids because the fix
is already doing the same filtering the record based on limit and offset,
otherwise what happen whatever ids we have filtered first time so that filtered
ids will be set in current.ids and next time we will have only 50 ids in
current.ids instead of 500 ids, due to which this inconsistency is created in
pager.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-578685-msh/+merge/122486
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/6.0-opw-578685-msh.
=== modified file 'addons/openerp/widgets/form/_m2m.py'
--- addons/openerp/widgets/form/_m2m.py 2012-06-08 16:55:21 +0000
+++ addons/openerp/widgets/form/_m2m.py 2012-09-03 10:28:36 +0000
@@ -59,8 +59,6 @@
params.name = attrs.get('name', '')
current = params.chain_get(self.name)
- if current and params.source == self.name:
- ids = current.ids
self.model = attrs.get('relation', 'model')
self.link = attrs.get('link', None)
@@ -81,8 +79,7 @@
self.switch_to = view_mode[-1]
if view_type == view_mode[-1]: self.switch_to = view_mode[0]
- if ids is None:
- ids = attrs.get('value') or []
+ ids = attrs.get('value') or []
id = (ids or None) and ids[0]
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp