Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openerp-web/6.1-opw-577204-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-577204-msh/+merge/117245
Hello,
Fixed the issue of Translation Dialog, here translation is not saved properly
when we try to change the translation of one2many form field.
Demo:- Sale -> Price List -> Edit any Price List -> Edit Price List Version ->
Change the Translation of name field Price list version and save you will see
you will get wrong Translation term(Last language translation term).
Reason :- When there is a one2many field it will call the write of
BufferedDataset which will check wheather record with same id exist or not, if
yed then write in that, so here onClick of Save button of Translation Dialog,
write method is called for each language and written in cache record of dataset
for each language and term of last language is set in cache record of dataset,
so translation dialog will not work for field of one2many.
Hence called the write of Dataset so that it directly writes to database.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-577204-msh/+merge/117245
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/6.1-opw-577204-msh.
=== modified file 'addons/web/static/src/js/views.js'
--- addons/web/static/src/js/views.js 2012-06-29 10:53:25 +0000
+++ addons/web/static/src/js/views.js 2012-07-30 11:42:22 +0000
@@ -1064,7 +1064,7 @@
});
}
trads_mutex.exec(function() {
- return self.view.dataset.write(self.view.datarecord.id, data, { context : { 'lang': code } });
+ return new session.web.DataSet(self, self.view.dataset.model, self.view.dataset.get_context()).write(self.view.datarecord.id, data, { context : { 'lang': code }})
});
});
this.close();
_______________________________________________
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