diff options
| author | Antonin Bourguignon <abo@openerp.com> | 2012-10-10 15:56:29 +0200 |
|---|---|---|
| committer | Antonin Bourguignon <abo@openerp.com> | 2012-10-10 15:56:29 +0200 |
| commit | cdc7ee2fba492df1369758102d387c35a4dea183 (patch) | |
| tree | b0f70dc9b69f31e78490c03323b2e0e79082441b /addons/google_docs | |
| parent | 79b29e17c4966f0be4f6bc42397c156e6e2d7e49 (diff) | |
| parent | 7796ecaccf787b1a2f6833ff8c68fa1cfeec2d55 (diff) | |
[MERGE] trunk
bzr revid: abo@openerp.com-20121010135629-ywtajjsopoo5jvv0
Diffstat (limited to 'addons/google_docs')
| -rw-r--r-- | addons/google_docs/__openerp__.py | 7 | ||||
| -rw-r--r-- | addons/google_docs/google_docs.py | 12 | ||||
| -rw-r--r-- | addons/google_docs/res_config_user_view.xml | 2 | ||||
| -rw-r--r-- | addons/google_docs/static/src/js/gdocs.js | 4 |
4 files changed, 13 insertions, 12 deletions
diff --git a/addons/google_docs/__openerp__.py b/addons/google_docs/__openerp__.py index 8cc5671e08a..b02f2e912fc 100644 --- a/addons/google_docs/__openerp__.py +++ b/addons/google_docs/__openerp__.py @@ -29,10 +29,13 @@ 'auto_install': False, 'web': True, 'js': ['static/src/js/gdocs.js'], - 'update_xml': [ + 'data': [ 'security/ir.model.access.csv', 'res_config_user_view.xml' ], 'depends': ['google_base_account'], - 'description': 'Module to attach a google document to any model.' + 'description': """ +Module to attach a google document to any model. +================================================ +""" } diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py index 659c86ad0d1..f1477f9c7f2 100644 --- a/addons/google_docs/google_docs.py +++ b/addons/google_docs/google_docs.py @@ -27,7 +27,7 @@ try: from gdata.docs.service import DOCUMENT_LABEL import gdata.auth except ImportError: - raise osv.except_osv(_('Google Docs Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list')) + raise osv.except_osv(_('Google Docs Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list.')) class google_docs_ir_attachment(osv.osv): _inherit = 'ir.attachment' @@ -46,7 +46,7 @@ class google_docs_ir_attachment(osv.osv): #login gmail account client = google_pool.google_login( user_config['user'], user_config['password'], type='docs_client', context=context) if not client: - raise osv.except_osv( _('Google Docs Error!'), _("Check your google configuration in users/synchronization")) + raise osv.except_osv( _('Google Docs Error!'), _("Check your google configuration in Users/Users/Synchronization tab.")) return client def create_empty_google_doc(self, cr, uid, res_model, res_id, context=None): @@ -88,7 +88,7 @@ class google_docs_ir_attachment(osv.osv): #copy the document you choose in the configuration copy_resource = client.copy_resource(original_resource, 'copy_%s' % original_resource.title.text) except: - raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL")) + raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL.")) # create an ir.attachment self.create(cr, uid, { 'res_model': res_model, @@ -134,8 +134,8 @@ class config(osv.osv): _description = "Google Docs templates config" _columns = { - 'model_id': fields.many2one('ir.model', 'Model'), - 'gdocs_resource_id': fields.char('Google resource ID', size=64,help=''' + '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` @@ -143,7 +143,7 @@ This is the id of the template document, on google side. You can find it thanks *for a drawing document with url like `https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is `drawings:123456789` ... '''), - 'name_template': fields.char('GDoc name template ', size=64, help='This is the name which appears on google side'), + 'name_template': fields.char('Google Doc Name Pattern', size=64, help='Choose how the new google docs will be named, on google side'), } _defaults = { diff --git a/addons/google_docs/res_config_user_view.xml b/addons/google_docs/res_config_user_view.xml index 46abe5b2d80..4aabba3ac5a 100644 --- a/addons/google_docs/res_config_user_view.xml +++ b/addons/google_docs/res_config_user_view.xml @@ -7,7 +7,6 @@ <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="type">tree</field> <field name="arch" type="xml"> <group name="default_filters" position="inside"> <field name="model_id"/> @@ -18,7 +17,6 @@ <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="type">form</field> <field name="arch" type="xml"> <group colspan='4'> <field name="model_id"/> diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_docs/static/src/js/gdocs.js index 8f41a9d7b21..bcfd24f8c0d 100644 --- a/addons/google_docs/static/src/js/gdocs.js +++ b/addons/google_docs/static/src/js/gdocs.js @@ -3,7 +3,7 @@ var _t = instance.web._t; instance.web.Sidebar = instance.web.Sidebar.extend({ on_attachments_loaded: function(attachments) { - self = this + var self = this; self._super(attachments); // if attachment contains a google doc url do nothing // else display a button to create a google doc @@ -13,7 +13,7 @@ var _t = instance.web._t; }); if (! flag) { this.add_items('files', [ - { label: _t('Google Doc'), callback: self.on_google_doc }, + { label: _t('Add Google Doc...'), callback: self.on_google_doc }, ]); } }, |
