Chirag Patel (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/6.1-opw-575750-cpa 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-575750-cpa/+merge/111780

Hello,

Options not reach at write method of DataSet.

Current language is English.

Demo: Sales > Addresses Book > Customers
1) Edit one Customer.
2) Edit one Categories.
3) Edit categories name's translation.
4) Change the French translation.
5) Save translation dialog.
6) Save partner categories dialog.

Observed: Edited categories display in French language in customer formview.  
Expected: Edited categories should be in English.

Translation dialog save button pass the context to write method of ProxyDataSet.
ProxyDataSet not pass options to write method of dataset.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-575750-cpa/+merge/111780
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/6.1-opw-575750-cpa.
=== modified file 'addons/web/static/src/js/data.js'
--- addons/web/static/src/js/data.js	2012-03-14 11:10:14 +0000
+++ addons/web/static/src/js/data.js	2012-06-25 06:07:21 +0000
@@ -831,7 +831,7 @@
     },
     on_create: function(data) {},
     write: function (id, data, options, callback) {
-        this.on_write(id, data);
+        this.on_write(id, data, options);
         if (this.write_function) {
             return this.write_function(id, data, options, callback);
         } else {

=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js	2012-06-14 08:40:09 +0000
+++ addons/web/static/src/js/view_form.js	2012-06-25 06:07:21 +0000
@@ -3039,14 +3039,14 @@
         this.dataset.child_name = this.options.child_name;
         this.setup_form_view();
     },
-    on_write: function(id, data) {
+    on_write: function(id, data, options) {
         if (!this.options.auto_write)
             return;
         var self = this;
         var wdataset = new openerp.web.DataSetSearch(this, this.model, this.context, this.domain);
         wdataset.parent_view = this.options.parent_view;
         wdataset.child_name = this.options.child_name;
-        wdataset.write(id, data, {}, function(r) {
+        wdataset.write(id, data, options, function(r) {
             self.on_write_completed();
         });
     },

_______________________________________________
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