Vaibhav (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-bug-890205-vda into lp:openerp-web.

Requested reviews:
  OpenERP R&D Web Team (openerp-dev-web)
Related bugs:
  Bug #890205 in OpenERP Web: "pop up windows must have a name (model)"
  https://bugs.launchpad.net/openerp-web/+bug/890205

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-890205-vda/+merge/83151

Popup window title
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-890205-vda/+merge/83151
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-bug-890205-vda.
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js	2011-11-23 10:04:52 +0000
+++ addons/web/static/src/js/view_form.js	2011-11-23 12:44:19 +0000
@@ -1749,7 +1749,7 @@
                         return;
                     }
                     var pop = new openerp.web.form.FormOpenPopup(self.view);
-                    pop.show_element(self.field.relation, self.value[0],self.build_context(), {});
+                    pop.show_element(self.field.relation, self.value[0],self.build_context(), {title: self.string || self.name});
                     pop.on_write_completed.add_last(function() {
                         self.set_value(self.value[0]);
                     });
@@ -1910,6 +1910,7 @@
         var self = this;
         var pop = new openerp.web.form.SelectCreatePopup(this);
         pop.select_element(self.field.relation,{
+                title: this.string || this.name,
                 initial_ids: ids ? _.map(ids, function(x) {return x[0]}) : undefined,
                 initial_view: view,
                 disable_multiple_selection: true
@@ -2333,6 +2334,7 @@
             var pop = new openerp.web.form.SelectCreatePopup(this);
             pop.on_default_get.add(self.dataset.on_default_get);
             pop.select_element(self.o2m.field.relation,{
+                title: self.name,
                 initial_view: "form",
                 alternative_form_view: self.o2m.field.views ? self.o2m.field.views["form"] : undefined,
                 create_function: function(data, callback, error_callback) {
@@ -2356,6 +2358,7 @@
         var self = this;
         var pop = new openerp.web.form.FormOpenPopup(self.o2m.view);
         pop.show_element(self.o2m.field.relation, id, self.o2m.build_context(),{
+            title: self.name,
             auto_write: false,
             alternative_form_view: self.o2m.field.views ? self.o2m.field.views["form"] : undefined,
             parent_view: self.o2m.view,
@@ -2477,7 +2480,7 @@
 openerp.web.form.Many2ManyListView = openerp.web.ListView.extend(/** @lends openerp.web.form.Many2ManyListView# */{
     do_add_record: function () {
         var pop = new openerp.web.form.SelectCreatePopup(this);
-        pop.select_element(this.model, {},
+        pop.select_element(this.model, {title: this.name},
             new openerp.web.CompoundDomain(this.m2m_field.build_domain(), ["!", ["id", "in", this.m2m_field.dataset.ids]]),
             this.m2m_field.build_context());
         var self = this;
@@ -2494,7 +2497,7 @@
     do_activate_record: function(index, id) {
         var self = this;
         var pop = new openerp.web.form.FormOpenPopup(this);
-        pop.show_element(this.dataset.model, id, this.m2m_field.build_context(), {});
+        pop.show_element(this.dataset.model, id, this.m2m_field.build_context(), {title: this.name});
         pop.on_write_completed.add_last(function() {
             self.reload_content();
         });
@@ -2533,7 +2536,7 @@
         this.render_element();
         openerp.web.form.dialog(this.$element, {close:function() {
             self.check_exit();
-        }});
+        }, title: options.title || ""});
         this.start();
     },
     start: function() {
@@ -2720,7 +2723,7 @@
         this.context = context || {};
         this.options = _.defaults(options || {}, {"auto_write": true});
         this.render_element();
-        this.$element.dialog({title: '',
+        this.$element.dialog({title: options.title || '',
                     modal: true,
                     width: 960,
                     height: 600});

_______________________________________________
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