summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParth Gajjar (Open ERP) <pga@tinyerp.com>2013-05-10 14:43:33 +0530
committerParth Gajjar (Open ERP) <pga@tinyerp.com>2013-05-10 14:43:33 +0530
commit482fb99ffd0a9cf43978f38e9b325d2b17fbf23b (patch)
tree82d2e1f32faffa14dbddc6bd14026e79b83be2b0
parentff3fded96e208f989ee35cfc714610adc0fbc6a4 (diff)
[IMP] Improved Code
bzr revid: pga@tinyerp.com-20130510091333-gmn2gwdo48jglsfu
-rw-r--r--addons/google_docs/google_docs_demo.xml36
-rw-r--r--addons/google_docs/res_config_user_view.xml174
2 files changed, 105 insertions, 105 deletions
diff --git a/addons/google_docs/google_docs_demo.xml b/addons/google_docs/google_docs_demo.xml
index d0f75e36ba6..fb452bf68e8 100644
--- a/addons/google_docs/google_docs_demo.xml
+++ b/addons/google_docs/google_docs_demo.xml
@@ -1,25 +1,25 @@
<?xml version="1.0"?>
<openerp>
- <data noupdate="1">
+ <data noupdate="1">
- <!-- filter demo -->
- <record id="filter_partner" model="ir.filters">
- <field name="name">Supplier</field>
- <field name="model_id">res.partner</field>
- <field name="domain">[['supplier', '=', 1]]</field>
- <field name="context">{'lang': 'en_US', 'tz': 'Europe/Brussels'}</field>
- <field name="user_id" eval="False" />
- </record>
+ <!-- filter demo -->
+ <record id="filter_partner" model="ir.filters">
+ <field name="name">Supplier</field>
+ <field name="model_id">res.partner</field>
+ <field name="domain">[['supplier', '=', 1]]</field>
+ <field name="context">{'lang': 'en_US', 'tz': 'Europe/Brussels'}</field>
+ <field name="user_id" eval="False" />
+ </record>
- <!-- template demo -->
- <record id="template_partner" model="google.docs.config">
- <field name="name">Supplier Docs</field>
- <field name="model_id">res.partner</field>
- <field name="filter_id" ref="filter_partner"/>
- <field name="gdocs_template_url">https://docs.google.com/spreadsheet/ccc?key=0Ah2qnrLAoZmUdGRvdVdmS1VoSDctWk1kd18taGZ4ckE#gid=0</field>
- <field name="name_template">%(name)s_%(model)s_%(filter)s_gdrive</field>
- </record>
+ <!-- template demo -->
+ <record id="template_partner" model="google.docs.config">
+ <field name="name">Supplier Docs</field>
+ <field name="model_id">res.partner</field>
+ <field name="filter_id" ref="filter_partner"/>
+ <field name="gdocs_template_url">https://docs.google.com/spreadsheet/ccc?key=0Ah2qnrLAoZmUdGRvdVdmS1VoSDctWk1kd18taGZ4ckE#gid=0</field>
+ <field name="name_template">%(name)s_%(model)s_%(filter)s_gdrive</field>
+ </record>
- </data>
+ </data>
</openerp>
diff --git a/addons/google_docs/res_config_user_view.xml b/addons/google_docs/res_config_user_view.xml
index abf394f052a..93f37ce8d09 100644
--- a/addons/google_docs/res_config_user_view.xml
+++ b/addons/google_docs/res_config_user_view.xml
@@ -1,100 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
- <data>
+ <data>
- <!-- add google docs config field in user form -->
+ <!-- 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 Drive Configuration">
- <field name="name" />
- <field name="model_id" />
- </tree>
- </field>
- </record>
+ <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 Drive Configuration">
+ <field name="name" />
+ <field name="model_id" />
+ </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 Drive Configuration" version="7.0">
- <group>
- <field name="name" />
- <field name="model_id" on_change="onchange_model_id(model_id)" />
- <label for='filter_id' />
- <div>
- <field name='filter_id' />
- <p class="oe_grey">
- <b>To create a new filter:</b><br/>
- - Go to the OpenERP document you want to filter. For instance, go to Opportunities and search on Sales Department.<br/>
- - In this "Search" view, select the option "Save Current Filter", enter the name (Ex: Sales Department)<br/>
- - If you select "Share with all users", link of google document in "More" options will appear for all users in opportunities of Sales Department.<br/>
- - If you don't select "Share with all users", link of google document in "More" options will not appear for other users in opportunities of Sales Department.<br/>
- - If filter is not specified, link of google document will appear in "More" option for all users for all opportunities.
+ <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 Drive Configuration" version="7.0">
+ <group>
+ <field name="name" />
+ <field name="model_id" on_change="onchange_model_id(model_id)" />
+ <label for='filter_id' />
+ <div>
+ <field name='filter_id' />
+ <p class="oe_grey">
+ <b>To create a new filter:</b><br/>
+ - Go to the OpenERP document you want to filter. For instance, go to Opportunities and search on Sales Department.<br/>
+ - In this "Search" view, select the option "Save Current Filter", enter the name (Ex: Sales Department)<br/>
+ - If you select "Share with all users", link of google document in "More" options will appear for all users in opportunities of Sales Department.<br/>
+ - If you don't select "Share with all users", link of google document in "More" options will not appear for other users in opportunities of Sales Department.<br/>
+ - If filter is not specified, link of google document will appear in "More" option for all users for all opportunities.
</p>
- </div>
- <field name='gdocs_template_url' placeholder="https://docs.google.com/document/d/1vOtpJK9scIQz6taD9tJRIETWbEw3fSiaQHArsJYcua4/edit" required="1" />
- <field name='gdocs_resource_id' invisible="1" />
- <label for='name_template' />
- <div>
- <field name='name_template' />
- <p class="oe_grey">
- The name of the attached document can use fixed or variable data. To distinguish between documents in
- Google Drive, use fixed words and fields. For instance, in the example above, if you wrote Agrolait_%%(name)s_Sales
- in the Google Drive name field, the document in your Google Drive and in OpenERP attachment will be named
- 'Agrolait_SO0001_Sales'.
+ </div>
+ <field name='gdocs_template_url' placeholder="https://docs.google.com/document/d/1vOtpJK9scIQz6taD9tJRIETWbEw3fSiaQHArsJYcua4/edit" required="1" />
+ <field name='gdocs_resource_id' invisible="1" />
+ <label for='name_template' />
+ <div>
+ <field name='name_template' />
+ <p class="oe_grey">
+ The name of the attached document can use fixed or variable data. To distinguish between documents in
+ Google Drive, use fixed words and fields. For instance, in the example above, if you wrote Agrolait_%%(name)s_Sales
+ in the Google Drive name field, the document in your Google Drive and in OpenERP attachment will be named
+ 'Agrolait_SO0001_Sales'.
</p>
- </div>
- </group>
- </form>
- </field>
- </record>
+ </div>
+ </group>
+ </form>
+ </field>
+ </record>
- <record model='ir.actions.act_window' id='action_google_docs_users_config'>
- <field name='name'>Google Drive Templates</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' />
- <field name="help" type="html">
- <p class="oe_view_nocontent_create">
- Click to add a new template.
- </p>
- <p>
+ <record model='ir.actions.act_window' id='action_google_docs_users_config'>
+ <field name='name'>Google Drive Templates</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' />
+ <field name="help" type="html">
+ <p class="oe_view_nocontent_create">
+ Click to add a new template.
+ </p>
+ <p>
Link your own google drive templates to any record of OpenERP. If you have really specific documents you want your collaborator fill in, e.g. Use a spreadsheet to control the quality of your product or review the delivery checklist for each order in a foreign country, ... Its very easy to manage them, link them to OpenERP and use them to collaborate with your employees.
</p>
- </field>
- </record>
+ </field>
+ </record>
- <record id="inherited_google_view_general_configuration" model="ir.ui.view">
- <field name="name">General Settings</field>
- <field name="model">base.config.settings</field>
- <field name="inherit_id" ref="base_setup.view_general_configuration" />
- <field name="arch" type="xml">
- <xpath expr="//div[@name='google_docs']" position="after">
- <div attrs="{'invisible': [('module_google_docs','=',False)]}">
- <button type="action" name="%(google_docs.action_google_docs_users_config)d" string="Configure Template" class="oe_link" />
- </div>
- </xpath>
- </field>
- </record>
+ <record id="inherited_google_view_general_configuration" model="ir.ui.view">
+ <field name="name">General Settings</field>
+ <field name="model">base.config.settings</field>
+ <field name="inherit_id" ref="base_setup.view_general_configuration" />
+ <field name="arch" type="xml">
+ <xpath expr="//div[@name='google_docs']" position="after">
+ <div attrs="{'invisible': [('module_google_docs','=',False)]}">
+ <button type="action" name="%(google_docs.action_google_docs_users_config)d" string="Configure Template" class="oe_link" />
+ </div>
+ </xpath>
+ </field>
+ </record>
- <record model="ir.ui.view" id="view_company_inherit_form2">
- <field name="name">res.company.form.inherit</field>
- <field name="inherit_id" ref="base.view_company_form" />
- <field name="model">res.company</field>
- <field name="arch" type="xml">
- <xpath expr="//group[@name='account_grp']" position="after">
- <group string="Google Configuration">
- <field name='google_client_id' />
- </group>
- </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>
+ <record model="ir.ui.view" id="view_company_inherit_form2">
+ <field name="name">res.company.form.inherit</field>
+ <field name="inherit_id" ref="base.view_company_form" />
+ <field name="model">res.company</field>
+ <field name="arch" type="xml">
+ <xpath expr="//group[@name='account_grp']" position="after">
+ <group string="Google Configuration">
+ <field name='google_client_id' />
+ </group>
+ </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>
</openerp>