[FIX] fix debug mode: correct id and xml_id (web client)
authorGéry Debongnie <ged@odoo.com>
Mon, 24 Nov 2014 10:35:13 +0000 (11:35 +0100)
committerGéry Debongnie <ged@odoo.com>
Mon, 24 Nov 2014 14:26:07 +0000 (15:26 +0100)
This commit fixes two issues with debug mode:
* when a default searchview is requested, it is
initialized without its view_id. Problem is that it prevents debug mode from editing the view.
*  add xml_id in Edit action form view(debug mode) : this makes the xml id visible in form view

addons/web/static/src/js/search.js
openerp/addons/base/ir/ir_actions.py
openerp/addons/base/ir/ir_actions.xml

index 2859c30..148f466 100644 (file)
@@ -415,6 +415,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
     view_loaded: function (r) {
         var self = this;
         this.fields_view_get = r;
+        this.view_id = this.view_id || r.view_id;
         this.prepare_search_inputs();
         if (this.$buttons) {
 
index 168537f..943fa09 100644 (file)
@@ -51,6 +51,7 @@ class actions(osv.osv):
         'name': fields.char('Name', required=True),
         'type': fields.char('Action Type', required=True),
         'usage': fields.char('Action Usage'),
+        'xml_id': fields.function(osv.osv.get_external_id, type='char', string="External ID"),
         'help': fields.text('Action description',
             help='Optional help text for the users with a description of the target view, such as its usage and purpose.',
             translate=True),
index bd5ede5..bf73b65 100644 (file)
                     <group>
                         <group>
                             <field name="name"/>
+                            <field name="xml_id" string="External ID"/>
                             <field name="res_model" string="Object"/>
                             <field name="src_model" string="Source Object"/>
                         </group>