Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openerp-web/6.1-opw-580244-msh into lp:openerp-web/6.1.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-580244-msh/+merge/128867
Hello,
Fixed the issue of drag and drop list record, here if all record have sequence
0 and if drag same record two times then record disappeared from the list.
Demo :- To reproduce this issue find view in which there is sequence field like
in Supplier One2many in Product form,tried to change the sequence of all record
to 0, now you have records with all have sequence 0, now drag and drop the same
record two times, you will see the record dragged two times disappeared.
Reason :- When we drag the row so we remove that row from content, and add the
row at specified index, but here we have code in set method of Record that if
record has same value and old_value then we just return so change is not called
and record which we have dragged will not be rendered, In this scenario that
all record has 0 sequence so when you drag any record the sequence will be 1
for that record because previous record has sequence value 0 and when you again
dragged the same record the previous record has sequence 0 so the sequence of
current record will not change and old_value and value will be same so record
dragged second time not rendred.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-580244-msh/+merge/128867
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/6.1-opw-580244-msh.
=== 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-10-10 07:04:19 +0000
@@ -1549,9 +1549,6 @@
set: function (key, value, options) {
options = options || {};
var old_value = this.attributes[key];
- if (old_value === value) {
- return this;
- }
this.attributes[key] = value;
if (!options.silent) {
this.trigger('change:' + key, this, value, old_value);
_______________________________________________
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