diff options
| author | Rajesh Prajapati (OpenERP) <rpr@tinyerp.com> | 2013-04-01 15:01:52 +0530 |
|---|---|---|
| committer | Rajesh Prajapati (OpenERP) <rpr@tinyerp.com> | 2013-04-01 15:01:52 +0530 |
| commit | d241e853ca60cdfe3758113cd6019eab541c4955 (patch) | |
| tree | b16b66cdb9f4e6c6897aa140a86bfc736b01145c /addons/google_docs | |
| parent | deb23a62b75e332e0b6a6f24df8b8c5d704ffc98 (diff) | |
[IMP] google_docs : changes for user field in filters
bzr revid: rpr@tinyerp.com-20130401093152-02ux70o02dxp5a2a
Diffstat (limited to 'addons/google_docs')
| -rw-r--r-- | addons/google_docs/google_docs.py | 2 | ||||
| -rw-r--r-- | addons/google_docs/res_config_user_view.xml | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py index 3894eb7f318..999e4b29a29 100644 --- a/addons/google_docs/google_docs.py +++ b/addons/google_docs/google_docs.py @@ -188,7 +188,7 @@ class config(osv.osv): _description = "Google Drive templates config" def _list_all_models(self, cr, uid, context=None): - cr.execute("SELECT model, name from ir_model") + cr.execute("SELECT model, name from ir_model order by name") return cr.fetchall() def _resource_get(self, cr, uid, ids, name, arg, context=None): diff --git a/addons/google_docs/res_config_user_view.xml b/addons/google_docs/res_config_user_view.xml index a874d802c98..8e75577999d 100644 --- a/addons/google_docs/res_config_user_view.xml +++ b/addons/google_docs/res_config_user_view.xml @@ -25,7 +25,7 @@ <field name="model_id" on_change="onchange_model_id(model_id)"/> <label for='filter_id'/> <div> - <field name='filter_id' context="{'default_user_id': False, 'default_model_id': model_id}" domain="[('user_id','=',False)]"/> + <field name='filter_id' context="{'default_user_id': False, 'default_model_id': model_id, 'hide_user_field': True}" domain="[('user_id','=',False)]"/> <p class="oe_grey"> To Create a new filter, go to the list of documents you want to attach a google document to and save the filter. Then come back to this view. The saved filter will be available in the field above. @@ -84,6 +84,17 @@ </field> </record> + <record id="inherited_ir_filters_view" model="ir.ui.view"> + <field name="name">filters</field> + <field name="model">ir.filters</field> + <field name="inherit_id" ref="base.ir_filters_view_form"/> + <field name="arch" type="xml"> + <xpath expr="//field[@name='user_id']" position="replace"> + <field name="user_id" invisible="context.get('hide_user_field', False)"/> + </xpath> + </field> + </record> + <menuitem name='Google Drive configuration' id='menu_gdocs_config' parent='base.menu_administration'/> <menuitem id='menu_gdocs_model_config' parent='menu_gdocs_config' action='action_google_docs_users_config'/> </data> |
