Merge lp:~openerp-dev/openerp-web/trunk-bug-849020-vja into lp:openerp-web

Proposed by Vishmita Jadeja (openerp)
Status: Rejected
Rejected by: Xavier (Open ERP)
Proposed branch: lp:~openerp-dev/openerp-web/trunk-bug-849020-vja
Merge into: lp:openerp-web
Diff against target: 11 lines (+1/-0)
1 file modified
addons/web/static/src/js/view_list.js (+1/-0)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/trunk-bug-849020-vja
Reviewer Review Type Date Requested Status
Xavier (Open ERP) (community) Disapprove
Review via email: mp+76332@code.launchpad.net

Description of the change

 Need to Update Pager after delete the record.

To post a comment you must log in.
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Calling self.reload_content means the whole list is going to be removed an reinserted, not just that the pager is going to be updated.

This has the following issues:

* If the list is long, the user will lose his position
* State unsaved (e.g. a line being edited) will be lost
* The list will flicker (all records will disappear and reappear)

Not to mention it is logically nonsensical to do it that way: `reload_content` empties the whole list and reloads it fully, so there is no need to recompute the aggregate results or to remove records one by one from the internal records collection.

review: Disapprove

Unmerged revisions

1055. By vishmita <vja@vja-desktop>

[FIX]Counter of History items shows correct number.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/view_list.js'
2--- addons/web/static/src/js/view_list.js 2011-09-15 09:42:46 +0000
3+++ addons/web/static/src/js/view_list.js 2011-09-21 06:03:24 +0000
4@@ -455,6 +455,7 @@
5 _(ids).each(function (id) {
6 self.records.remove(self.records.get(id));
7 });
8+ self.reload_content();
9 self.compute_aggregates();
10 });
11 },