Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-383758-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-383758-msh/+merge/94327

Hello, 

Fixed the issue of concurrency_info which not allow us to create two records in 
editable listview.

Demo :- Product -> edit any product -> Supplier Information Tab -> Edit 
supplier -> there is one2many field for pricelist which editable, create two 
records there, while you save second record you will get concurrency issue, 
even though except you nobody have changed the document.

Reason :- The editable tree view is inside one2many, here both form as well as 
listgrid,mako have concurrency_info, so when you save first record at that time 
write method will be called and parent relation will be updated so the 
write_date will changed for parent object but the concurrency form is not 
updated, only concurrency of listgrid will be updated with response header's 
concurrency, so when you save second record the concurrency_info of form will 
be passed which is old when we open the form, and the write_date of parent 
object is already changed with creation of first record in one2many.

Hence changed the code so that always concurrency_info of view_form change.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-383758-msh/+merge/94327
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-383758-msh.
=== modified file 'addons/openerp/static/javascript/openerp/openerp.base.js'
--- addons/openerp/static/javascript/openerp/openerp.base.js	2011-11-23 08:38:45 +0000
+++ addons/openerp/static/javascript/openerp/openerp.base.js	2012-02-23 07:07:19 +0000
@@ -333,7 +333,7 @@
                             "'" + concurrency_data + "'" +
                             ")"
                     );
-            jQuery('#' + model.replace(/\./g, '-') + '-' + id)
+            jQuery("#view_form").find('#' + model.replace(/\./g, '-') + '-' + id)
                     .val(formatted_concurrency_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

Reply via email to