diff options
| author | Dharti Ratani (Open ERP) <dhr@tinyerp.com> | 2013-02-28 12:58:22 +0530 |
|---|---|---|
| committer | Dharti Ratani (Open ERP) <dhr@tinyerp.com> | 2013-02-28 12:58:22 +0530 |
| commit | 5b68aa7d83c25e635f5c2c44be7334e9c6dd22b1 (patch) | |
| tree | dfaa0148952bf2b62b797b4df6feee853ee920fb /addons/google_docs | |
| parent | fba7d98e59823e76ff7da344ece85104407041ed (diff) | |
[IMP]Changed the model template
bzr revid: dhr@tinyerp.com-20130228072822-dxbuk1jjljcofp82
Diffstat (limited to 'addons/google_docs')
| -rw-r--r-- | addons/google_docs/google_docs.py | 10 | ||||
| -rw-r--r-- | addons/google_docs/res_config_user_view.xml | 27 |
2 files changed, 19 insertions, 18 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py index 82cd80635ee..e507ce33b16 100644 --- a/addons/google_docs/google_docs.py +++ b/addons/google_docs/google_docs.py @@ -177,14 +177,8 @@ class config(osv.osv): _columns = { 'model_id': fields.many2one('ir.model', 'Model', required=True), - 'gdocs_resource_id': fields.char('Google Resource ID to Use as Template', size=64, help=''' -This is the id of the template document, on google side. You can find it thanks to its URL: -*for a text document with url like `https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is `document:123456789` -*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` -*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` -*for a drawing document with url like `https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is `drawings:123456789` -... -''', required=True), + 'filter_id' : fields.many2one('ir.filters', 'Filter'), + 'template_url': fields.char('Template Url', required=True, size=1024), 'name_template': fields.char('Google Drive Name Pattern', size=64, help='Choose how the new google drive will be named, on google side. Eg. gdoc_%(field_name)s', required=True), } diff --git a/addons/google_docs/res_config_user_view.xml b/addons/google_docs/res_config_user_view.xml index ad6560cb465..8d023b4f6f5 100644 --- a/addons/google_docs/res_config_user_view.xml +++ b/addons/google_docs/res_config_user_view.xml @@ -22,20 +22,27 @@ <form string="Google Drive Configuration" version="7.0"> <group> <field name="model_id"/> - <label for='gdocs_resource_id'/> + <label for='filter_id'/> <div> - <field name='gdocs_resource_id'/> + <field name='filter_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> + 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 ti this view.The saved filter will be available in the filed above. + For instance,to attach a document to the sales orders of Agrolait,you go to sales orders list view, + filter on Agrolait and save the filter. </p> </div> - <field name='name_template'/> + <field name='template_url' placeholder="https://docs.google.com/document/d/1vOtpJK9scIQz6taD9tJRIETWbEw3fSiaQHArsJYcua4/edit"/> + <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> |
