[IMP] google_docs : changes for user field in filters

bzr revid: rpr@tinyerp.com-20130401093152-02ux70o02dxp5a2a
This commit is contained in:
Rajesh Prajapati (OpenERP) 2013-04-01 15:01:52 +05:30
parent deb23a62b7
commit d241e853ca
2 changed files with 13 additions and 2 deletions

View File

@ -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):

View File

@ -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>