Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openerp-web/6.1-opw-579115-msh into lp:openerp-web/6.1.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #1010400 in OpenERP Web: "[list] drag and drop reordering: allow
reordering but does not save it in page view"
https://bugs.launchpad.net/openerp-web/+bug/1010400
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-579115-msh/+merge/123943
Hello,
Fixed the issue of list view record reordering, page view is readonly mode so
user must not be allowed to change the sequence that is he should not allowed
to drag and drop list rows, also changed sequence is not going to save in page
view, so it is unnecessary to allow user to drag and drop.
Demo :- I open a product
- I go to the Suppliers tab
- If it has no or one supplier only, I edit the product to add some
- I save it so I'm on the page view again
- I drag & drop the lines to reorder them -> sequence numbers are updated on
my screen and lines are moved
- I refresh the page -> sequence numbers reset
As we are in page view we should not allow user to modify the sequence as it is
readonly mode ans also it is never going to save in page view.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-579115-msh/+merge/123943
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/6.1-opw-579115-msh.
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js 2012-09-03 13:17:44 +0000
+++ addons/web/static/src/js/view_form.js 2012-09-12 12:26:46 +0000
@@ -2480,6 +2480,7 @@
view.options.addable = null;
view.options.deletable = null;
view.options.isClarkGable = false;
+ view.options.reorderable = false;
}
} else if (view.view_type === "form") {
if (self.is_readonly()) {
=== modified file 'addons/web/static/src/js/view_list.js'
--- addons/web/static/src/js/view_list.js 2012-06-25 07:20:46 +0000
+++ addons/web/static/src/js/view_list.js 2012-09-12 12:26:46 +0000
@@ -1363,7 +1363,7 @@
// "sequence" column in the view.
if ((dataset.sort && dataset.sort())
|| !_(this.columns).any(function (column) {
- return column.name === 'sequence'; })) {
+ return column.name === 'sequence'; }) || !list.options.reorderable) {
return;
}
// ondrop, move relevant record & fix sequences
_______________________________________________
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