odoo/addons/google_docs/res_config_user_view.xml

55 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- add google docs config field in user form -->
<record model="ir.ui.view" id="view_google_docs_config_tree">
<field name="name">google_docs.config.tree</field>
<field name="model">google.docs.config</field>
<field name="arch" type="xml">
<tree string="Google Docs Configuration">
<field name="model_id"/>
<field name="name_template"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_google_docs_config_form">
<field name="name">google_docs.config.form</field>
<field name="model">google.docs.config</field>
<field name="arch" type="xml">
<form string="Google Docs Configuration" version="7.0">
<group>
<field name="model_id"/>
<label for='gdocs_resource_id'/>
<div>
<field name='gdocs_resource_id'/>
<p class="oe_grey">
This is the id of the template document, on google side. You can find it thanks to its URL:
<ul>
<li>for a text document with url like `https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is `document:123456789`</li>
<li>for a spreadsheet document with url like `https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, the ID is `spreadsheet:123456789`</li>
<li>for a presentation (slide show) document with url like `https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id.p`, the ID is `presentation:123456789`</li>
<li>for a drawing document with url like `https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is `drawings:123456789`</li>
</ul>
</p>
</div>
<field name='name_template'/>
</group>
</form>
</field>
</record>
<record model='ir.actions.act_window' id='action_google_docs_users_config'>
<field name='name'>Models configuration</field>
<field name='res_model'>google.docs.config</field>
<field name='type'>ir.actions.act_window</field>
<field name='view_type'>form</field>
<field name='view_id' ref='view_google_docs_config_tree'/>
</record>
<menuitem name='Google Docs configuration' id='menu_gdocs_config' parent='base.menu_administration'/>
<menuitem name='Models configuration' id='menu_gdocs_model_config' parent='menu_gdocs_config' action='action_google_docs_users_config'/>
</data>
</openerp>