[MERGE] forward port of branch saas-3 up to 3d80dc2
authorChristophe Simonis <chs@odoo.com>
Thu, 4 Sep 2014 15:51:42 +0000 (17:51 +0200)
committerChristophe Simonis <chs@odoo.com>
Thu, 4 Sep 2014 15:51:42 +0000 (17:51 +0200)
1  2 
addons/calendar/__openerp__.py
addons/calendar/calendar.py
addons/calendar/calendar_data.xml
addons/crm_partner_assign/crm_portal_view.xml
addons/sale/sale.py
addons/web/static/src/js/views.js

@@@ -40,18 -40,24 +40,19 @@@ If you need to manage your meetings, yo
      'website': 'http://www.openerp.com',
      'demo': ['calendar_demo.xml'],
      'data': [
+         'calendar_cron.xml',
 -        'security/calendar_security.xml',
          'security/ir.model.access.csv',
 +        'security/calendar_security.xml',
          'calendar_view.xml',
          'contacts_view.xml',
 -        'calendar_data.xml',        
 -    ],
 -    'js': [
 -        'static/src/js/*.js'
 +        'calendar_data.xml',
 +        'views/calendar.xml',
      ],
      'qweb': ['static/src/xml/*.xml'],
 -    'css': [
 -        'static/src/css/calendar.css'
 +    'test': [
 +        'test/calendar_test.yml',
 +        'test/test_calendar_recurrent_event_case2.yml'
      ],
 -    'test' : [
 -              'test/calendar_test.yml',
 -              'test/test_calendar_recurrent_event_case2.yml'
 -              ],
      'installable': True,
      'application': True,
      'auto_install': False,
Simple merge
Simple merge
Simple merge
@@@ -408,12 -415,26 +415,26 @@@ instance.web.ActionManager = instance.w
              if (this.dialog_widget && !this.dialog_widget.isDestroyed()) {
                  this.dialog_widget.destroy();
              }
+             // explicitly passing a closing action to dialog_stop() prevents
+             // it from reloading the original form view
              this.dialog_stop(executor.action);
              this.dialog = new instance.web.Dialog(this, {
 +                title: executor.action.name,
                  dialogClass: executor.klass,
              });
-             this.dialog.on("closing", null, options.on_close);
+             // chain on_close triggers with previous dialog, if any
+             this.dialog.on_close = function(){
+                 options.on_close.apply(null, arguments);
+                 if (pre_dialog && pre_dialog.on_close){
+                     // no parameter passed to on_close as this will
+                     // only be called when the last dialog is truly
+                     // closing, and *should* trigger a reload of the
+                     // underlying form view (see comments above)
+                     pre_dialog.on_close();
+                 }
+             };
+             this.dialog.on("closing", null, this.dialog.on_close);
 -            this.dialog.dialog_title = executor.action.name;
              if (widget instanceof instance.web.ViewManager) {
                  _.extend(widget.flags, {
                      $buttons: this.dialog.$buttons,