From c74517990f1bec61e52e455be4ec12b6135015a6 Mon Sep 17 00:00:00 2001
From: Denis Ledoux
Date: Wed, 26 Jun 2013 11:30:19 +0200
Subject: [PATCH] [RENAME]google_docs => google_drive
bzr revid: dle@openerp.com-20130626093019-krwt5eamagmd5amu
---
addons/base_setup/res_config.py | 2 +-
addons/base_setup/res_config_view.xml | 4 +-
addons/google_docs/__init__.py | 1 -
addons/google_docs/google_docs_data.xml | 25 ------------
.../google_docs/security/ir.model.access.csv | 3 --
addons/google_drive/__init__.py | 1 +
.../__openerp__.py | 6 +--
.../google_drive.py} | 34 ++++++++--------
addons/google_drive/google_drive_data.xml | 25 ++++++++++++
.../google_drive_demo.xml} | 4 +-
.../{google_docs => google_drive}/i18n/ar.po | 0
.../{google_docs => google_drive}/i18n/cs.po | 0
.../{google_docs => google_drive}/i18n/de.po | 0
.../{google_docs => google_drive}/i18n/es.po | 0
.../{google_docs => google_drive}/i18n/fr.po | 0
.../i18n/google_docs.pot | 0
.../{google_docs => google_drive}/i18n/hr.po | 0
.../{google_docs => google_drive}/i18n/hu.po | 0
.../{google_docs => google_drive}/i18n/it.po | 0
.../{google_docs => google_drive}/i18n/ln.po | 0
.../{google_docs => google_drive}/i18n/mk.po | 0
.../{google_docs => google_drive}/i18n/mn.po | 0
.../{google_docs => google_drive}/i18n/nl.po | 0
.../{google_docs => google_drive}/i18n/pl.po | 0
.../{google_docs => google_drive}/i18n/pt.po | 0
.../i18n/pt_BR.po | 0
.../{google_docs => google_drive}/i18n/ro.po | 0
.../{google_docs => google_drive}/i18n/ru.po | 0
.../{google_docs => google_drive}/i18n/sl.po | 0
.../{google_docs => google_drive}/i18n/sv.po | 0
.../{google_docs => google_drive}/i18n/tr.po | 0
.../i18n/zh_CN.po | 0
.../res_config_user_view.xml | 38 +++++++++---------
.../google_drive/security/ir.model.access.csv | 3 ++
.../static/lib/gapi/client.js | 0
.../static/src/img/drive_icon.png | Bin
.../static/src/img/drive_icon_mono.png | Bin
.../static/src/img/icon.png | Bin
.../static/src/js/gdrive.js} | 14 +++----
39 files changed, 80 insertions(+), 80 deletions(-)
delete mode 100644 addons/google_docs/__init__.py
delete mode 100644 addons/google_docs/google_docs_data.xml
delete mode 100644 addons/google_docs/security/ir.model.access.csv
create mode 100644 addons/google_drive/__init__.py
rename addons/{google_docs => google_drive}/__openerp__.py (94%)
rename addons/{google_docs/google_docs.py => google_drive/google_drive.py} (87%)
create mode 100644 addons/google_drive/google_drive_data.xml
rename addons/{google_docs/google_docs_demo.xml => google_drive/google_drive_demo.xml} (76%)
rename addons/{google_docs => google_drive}/i18n/ar.po (100%)
rename addons/{google_docs => google_drive}/i18n/cs.po (100%)
rename addons/{google_docs => google_drive}/i18n/de.po (100%)
rename addons/{google_docs => google_drive}/i18n/es.po (100%)
rename addons/{google_docs => google_drive}/i18n/fr.po (100%)
rename addons/{google_docs => google_drive}/i18n/google_docs.pot (100%)
rename addons/{google_docs => google_drive}/i18n/hr.po (100%)
rename addons/{google_docs => google_drive}/i18n/hu.po (100%)
rename addons/{google_docs => google_drive}/i18n/it.po (100%)
rename addons/{google_docs => google_drive}/i18n/ln.po (100%)
rename addons/{google_docs => google_drive}/i18n/mk.po (100%)
rename addons/{google_docs => google_drive}/i18n/mn.po (100%)
rename addons/{google_docs => google_drive}/i18n/nl.po (100%)
rename addons/{google_docs => google_drive}/i18n/pl.po (100%)
rename addons/{google_docs => google_drive}/i18n/pt.po (100%)
rename addons/{google_docs => google_drive}/i18n/pt_BR.po (100%)
rename addons/{google_docs => google_drive}/i18n/ro.po (100%)
rename addons/{google_docs => google_drive}/i18n/ru.po (100%)
rename addons/{google_docs => google_drive}/i18n/sl.po (100%)
rename addons/{google_docs => google_drive}/i18n/sv.po (100%)
rename addons/{google_docs => google_drive}/i18n/tr.po (100%)
rename addons/{google_docs => google_drive}/i18n/zh_CN.po (100%)
rename addons/{google_docs => google_drive}/res_config_user_view.xml (73%)
create mode 100644 addons/google_drive/security/ir.model.access.csv
rename addons/{google_docs => google_drive}/static/lib/gapi/client.js (100%)
rename addons/{google_docs => google_drive}/static/src/img/drive_icon.png (100%)
rename addons/{google_docs => google_drive}/static/src/img/drive_icon_mono.png (100%)
rename addons/{google_docs => google_drive}/static/src/img/icon.png (100%)
rename addons/{google_docs/static/src/js/gdocs.js => google_drive/static/src/js/gdrive.js} (85%)
diff --git a/addons/base_setup/res_config.py b/addons/base_setup/res_config.py
index dd815f09426..96ce669216a 100644
--- a/addons/base_setup/res_config.py
+++ b/addons/base_setup/res_config.py
@@ -36,7 +36,7 @@ class base_config_settings(osv.osv_memory):
help="""Enable the public part of openerp, openerp becomes a public website."""),
'module_auth_oauth': fields.boolean('Use external authentication providers, sign in with google, facebook, ...'),
'module_base_import': fields.boolean("Allow users to import data from CSV files"),
- 'module_google_docs': fields.boolean('Attach a google document to any record',
+ 'module_google_drive': fields.boolean('Attach a google document to any record',
help="""This installs the module google_docs."""),
}
diff --git a/addons/base_setup/res_config_view.xml b/addons/base_setup/res_config_view.xml
index a018d9e1c5b..fcb67c9fdc6 100644
--- a/addons/base_setup/res_config_view.xml
+++ b/addons/base_setup/res_config_view.xml
@@ -85,8 +85,8 @@
diff --git a/addons/google_docs/__init__.py b/addons/google_docs/__init__.py
deleted file mode 100644
index dd6285502c0..00000000000
--- a/addons/google_docs/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-import google_docs
diff --git a/addons/google_docs/google_docs_data.xml b/addons/google_docs/google_docs_data.xml
deleted file mode 100644
index f674f0a8a31..00000000000
--- a/addons/google_docs/google_docs_data.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
- google_docs_client_id
- 39623646228-eg3ggo3mk6o40m7rguobi3rkl9frh4tb.apps.googleusercontent.com
-
-
-
- google_docs_client_secret
- Ul-PtmnSWs3euWs20fdono0e
-
-
-
- google_docs_refresh_token
- -
-
-
-
- google_docs_authorization_code
- -
-
-
-
\ No newline at end of file
diff --git a/addons/google_docs/security/ir.model.access.csv b/addons/google_docs/security/ir.model.access.csv
deleted file mode 100644
index 1a2040784f8..00000000000
--- a/addons/google_docs/security/ir.model.access.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_google_docs_all,google.docs.config,model_google_docs_config,,1,0,0,0
-access_google_docs,google.docs.config,model_google_docs_config,base.group_system,1,1,1,1
\ No newline at end of file
diff --git a/addons/google_drive/__init__.py b/addons/google_drive/__init__.py
new file mode 100644
index 00000000000..e1cf2d00f3c
--- /dev/null
+++ b/addons/google_drive/__init__.py
@@ -0,0 +1 @@
+import google_drive
diff --git a/addons/google_docs/__openerp__.py b/addons/google_drive/__openerp__.py
similarity index 94%
rename from addons/google_docs/__openerp__.py
rename to addons/google_drive/__openerp__.py
index 8e4b2fa612e..d12d442f27a 100644
--- a/addons/google_docs/__openerp__.py
+++ b/addons/google_drive/__openerp__.py
@@ -29,15 +29,15 @@
'auto_install': False,
'js': [
'static/lib/gapi/client.js',
- 'static/src/js/gdocs.js',
+ 'static/src/js/gdrive.js',
],
'data': [
'security/ir.model.access.csv',
'res_config_user_view.xml',
- 'google_docs_data.xml'
+ 'google_drive_data.xml'
],
'demo': [
- 'google_docs_demo.xml'
+ 'google_drive_demo.xml'
],
'depends': ['base_setup', 'google_base_account'],
'description': """
diff --git a/addons/google_docs/google_docs.py b/addons/google_drive/google_drive.py
similarity index 87%
rename from addons/google_docs/google_docs.py
rename to addons/google_drive/google_drive.py
index 8b0d8f53b2e..04834e6680b 100644
--- a/addons/google_docs/google_docs.py
+++ b/addons/google_drive/google_drive.py
@@ -33,7 +33,7 @@ import json
_logger = logging.getLogger(__name__)
class config(osv.osv):
- _name = 'google.docs.config'
+ _name = 'google.drive.config'
_description = "Google Drive templates config"
def get_google_doc_name(self, cr, uid, ids, res_id, tamplate_id, context=None):
@@ -67,17 +67,17 @@ class config(osv.osv):
return res
def copy_doc(self, cr, uid, ids, res_id, tamplate_id, name_gdocs, res_model, context=None):
- ir_config = self.pool[ 'ir.config_parameter' ]
- google_docs_client_id = ir_config.get_param(cr, SUPERUSER_ID, 'google_docs_client_id')
- google_docs_client_secret = ir_config.get_param(cr, SUPERUSER_ID, 'google_docs_client_secret')
- google_docs_refresh_token = ir_config.get_param(cr, SUPERUSER_ID, 'google_docs_refresh_token')
+ ir_config = self.pool[ 'ir.config_parameter']
+ google_drive_client_id = ir_config.get_param(cr, SUPERUSER_ID, 'google_drive_client_id')
+ google_drive_client_secret = ir_config.get_param(cr, SUPERUSER_ID, 'google_drive_client_secret')
+ google_drive_refresh_token = ir_config.get_param(cr, SUPERUSER_ID, 'google_drive_refresh_token')
google_web_base_url = ir_config.get_param(cr, SUPERUSER_ID, 'web.base.url')
#For Getting New Access Token With help of old Refresh Token
headers = {"Content-type": "application/x-www-form-urlencoded"}
- data = dict(client_id = google_docs_client_id,
- refresh_token = google_docs_refresh_token,
- client_secret = google_docs_client_secret,
+ data = dict(client_id = google_drive_client_id,
+ refresh_token = google_drive_refresh_token,
+ client_secret = google_drive_client_secret,
grant_type = "refresh_token")
data = urllib.urlencode(data)
resp, content = Http().request("https://accounts.google.com/o/oauth2/token", "POST", data, headers)
@@ -105,7 +105,7 @@ class config(osv.osv):
raise self.pool.get('res.config.settings').get_config_warning(cr, _("You haven't configured 'Authorization Code' generated from google, Please generate and configure it in %(menu:base_setup.menu_general_configuration)s."), context=context)
return res
- def get_google_docs_config(self, cr, uid, res_model, res_id, context=None):
+ def get_google_drive_config(self, cr, uid, res_model, res_id, context=None):
'''
Function called by the js, when no google doc are yet associated with a record, with the aim to create one. It
will first seek for a google.docs.config associated with the model `res_model` to find out what's the template
@@ -154,7 +154,7 @@ class config(osv.osv):
def _resource_get(self, cr, uid, ids, name, arg, context=None):
result = {}
for data in self.browse(cr, uid, ids, context):
- template_url = data.gdocs_template_url
+ template_url = data.google_drive_template_url
try:
url = urlparse(template_url)
res = url.path.split('/')
@@ -172,16 +172,16 @@ class config(osv.osv):
result = {}
for config_id in ids:
config = self.pool['ir.config_parameter']
- result[config_id] = config.get_param(cr, SUPERUSER_ID, 'google_docs_client_id')
+ result[config_id] = config.get_param(cr, SUPERUSER_ID, 'google_drive_client_id')
return result
_columns = {
'name' : fields.char('Template Name', required=True, size=1024),
'model_id': fields.selection(_list_all_models, 'Model', required=True),
'filter_id' : fields.many2one('ir.filters', 'Filter'),
- 'gdocs_template_url': fields.char('Template URL', required=True, size=1024),
- 'gdocs_resource_id' : fields.function(_resource_get, type="char" , string='Resource Id'),
- 'google_docs_client_id' : fields.function(_client_id_get, type="char" , string='Google Client '),
+ 'google_drive_template_url': fields.char('Template URL', required=True, size=1024),
+ 'google_drive_resource_id' : fields.function(_resource_get, type="char" , string='Resource Id'),
+ 'google_drive_client_id' : fields.function(_client_id_get, type="char" , string='Google Client '),
'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),
}
@@ -214,9 +214,9 @@ class base_config_settings(osv.osv):
_inherit = "base.config.settings"
_columns = {
- 'google_docs_authorization_code': fields.char('Paste Generated "Authorization Code" from google to here', size=124),
- 'google_docs_uri': fields.char('URI', readonly=True, help="The URL to generate the authorization code from Google"),
+ 'google_drive_authorization_code': fields.char('Paste Generated "Authorization Code" from google to here', size=124),
+ 'google_drive_uri': fields.char('URI', readonly=True, help="The URL to generate the authorization code from Google"),
}
_defaults = {
- 'google_docs_uri': lambda s, cr, uid, c: s._get_google_token_uri(cr, uid, 'docs', context=c),
+ 'google_drive_uri': lambda s, cr, uid, c: s._get_google_token_uri(cr, uid, 'drive', context=c),
}
diff --git a/addons/google_drive/google_drive_data.xml b/addons/google_drive/google_drive_data.xml
new file mode 100644
index 00000000000..9bb81e2744a
--- /dev/null
+++ b/addons/google_drive/google_drive_data.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ google_drive_client_id
+ 39623646228-eg3ggo3mk6o40m7rguobi3rkl9frh4tb.apps.googleusercontent.com
+
+
+
+ google_drive_client_secret
+ Ul-PtmnSWs3euWs20fdono0e
+
+
+
+ google_drive_refresh_token
+ -
+
+
+
+ google_drive_authorization_code
+ -
+
+
+
\ No newline at end of file
diff --git a/addons/google_docs/google_docs_demo.xml b/addons/google_drive/google_drive_demo.xml
similarity index 76%
rename from addons/google_docs/google_docs_demo.xml
rename to addons/google_drive/google_drive_demo.xml
index 8dcafe0ea45..936257b99f2 100644
--- a/addons/google_docs/google_docs_demo.xml
+++ b/addons/google_drive/google_drive_demo.xml
@@ -11,11 +11,11 @@
-
+
Customer Doc
res.partner
- https://docs.google.com/spreadsheet/ccc?key=0Ah2qnrLAoZmUdGRvdVdmS1VoSDctWk1kd18taGZ4ckE#gid=0
+ https://docs.google.com/spreadsheet/ccc?key=0Ah2qnrLAoZmUdGRvdVdmS1VoSDctWk1kd18taGZ4ckE#gid=0
%(name)s_%(model)s_%(filter)s_gdrive
diff --git a/addons/google_docs/i18n/ar.po b/addons/google_drive/i18n/ar.po
similarity index 100%
rename from addons/google_docs/i18n/ar.po
rename to addons/google_drive/i18n/ar.po
diff --git a/addons/google_docs/i18n/cs.po b/addons/google_drive/i18n/cs.po
similarity index 100%
rename from addons/google_docs/i18n/cs.po
rename to addons/google_drive/i18n/cs.po
diff --git a/addons/google_docs/i18n/de.po b/addons/google_drive/i18n/de.po
similarity index 100%
rename from addons/google_docs/i18n/de.po
rename to addons/google_drive/i18n/de.po
diff --git a/addons/google_docs/i18n/es.po b/addons/google_drive/i18n/es.po
similarity index 100%
rename from addons/google_docs/i18n/es.po
rename to addons/google_drive/i18n/es.po
diff --git a/addons/google_docs/i18n/fr.po b/addons/google_drive/i18n/fr.po
similarity index 100%
rename from addons/google_docs/i18n/fr.po
rename to addons/google_drive/i18n/fr.po
diff --git a/addons/google_docs/i18n/google_docs.pot b/addons/google_drive/i18n/google_docs.pot
similarity index 100%
rename from addons/google_docs/i18n/google_docs.pot
rename to addons/google_drive/i18n/google_docs.pot
diff --git a/addons/google_docs/i18n/hr.po b/addons/google_drive/i18n/hr.po
similarity index 100%
rename from addons/google_docs/i18n/hr.po
rename to addons/google_drive/i18n/hr.po
diff --git a/addons/google_docs/i18n/hu.po b/addons/google_drive/i18n/hu.po
similarity index 100%
rename from addons/google_docs/i18n/hu.po
rename to addons/google_drive/i18n/hu.po
diff --git a/addons/google_docs/i18n/it.po b/addons/google_drive/i18n/it.po
similarity index 100%
rename from addons/google_docs/i18n/it.po
rename to addons/google_drive/i18n/it.po
diff --git a/addons/google_docs/i18n/ln.po b/addons/google_drive/i18n/ln.po
similarity index 100%
rename from addons/google_docs/i18n/ln.po
rename to addons/google_drive/i18n/ln.po
diff --git a/addons/google_docs/i18n/mk.po b/addons/google_drive/i18n/mk.po
similarity index 100%
rename from addons/google_docs/i18n/mk.po
rename to addons/google_drive/i18n/mk.po
diff --git a/addons/google_docs/i18n/mn.po b/addons/google_drive/i18n/mn.po
similarity index 100%
rename from addons/google_docs/i18n/mn.po
rename to addons/google_drive/i18n/mn.po
diff --git a/addons/google_docs/i18n/nl.po b/addons/google_drive/i18n/nl.po
similarity index 100%
rename from addons/google_docs/i18n/nl.po
rename to addons/google_drive/i18n/nl.po
diff --git a/addons/google_docs/i18n/pl.po b/addons/google_drive/i18n/pl.po
similarity index 100%
rename from addons/google_docs/i18n/pl.po
rename to addons/google_drive/i18n/pl.po
diff --git a/addons/google_docs/i18n/pt.po b/addons/google_drive/i18n/pt.po
similarity index 100%
rename from addons/google_docs/i18n/pt.po
rename to addons/google_drive/i18n/pt.po
diff --git a/addons/google_docs/i18n/pt_BR.po b/addons/google_drive/i18n/pt_BR.po
similarity index 100%
rename from addons/google_docs/i18n/pt_BR.po
rename to addons/google_drive/i18n/pt_BR.po
diff --git a/addons/google_docs/i18n/ro.po b/addons/google_drive/i18n/ro.po
similarity index 100%
rename from addons/google_docs/i18n/ro.po
rename to addons/google_drive/i18n/ro.po
diff --git a/addons/google_docs/i18n/ru.po b/addons/google_drive/i18n/ru.po
similarity index 100%
rename from addons/google_docs/i18n/ru.po
rename to addons/google_drive/i18n/ru.po
diff --git a/addons/google_docs/i18n/sl.po b/addons/google_drive/i18n/sl.po
similarity index 100%
rename from addons/google_docs/i18n/sl.po
rename to addons/google_drive/i18n/sl.po
diff --git a/addons/google_docs/i18n/sv.po b/addons/google_drive/i18n/sv.po
similarity index 100%
rename from addons/google_docs/i18n/sv.po
rename to addons/google_drive/i18n/sv.po
diff --git a/addons/google_docs/i18n/tr.po b/addons/google_drive/i18n/tr.po
similarity index 100%
rename from addons/google_docs/i18n/tr.po
rename to addons/google_drive/i18n/tr.po
diff --git a/addons/google_docs/i18n/zh_CN.po b/addons/google_drive/i18n/zh_CN.po
similarity index 100%
rename from addons/google_docs/i18n/zh_CN.po
rename to addons/google_drive/i18n/zh_CN.po
diff --git a/addons/google_docs/res_config_user_view.xml b/addons/google_drive/res_config_user_view.xml
similarity index 73%
rename from addons/google_docs/res_config_user_view.xml
rename to addons/google_drive/res_config_user_view.xml
index 560c36cc99c..cbcbb46bc44 100644
--- a/addons/google_docs/res_config_user_view.xml
+++ b/addons/google_drive/res_config_user_view.xml
@@ -2,11 +2,11 @@
-
+
-
- google_docs.config.tree
- google.docs.config
+
+ google_drive.config.tree
+ google.drive.config
@@ -15,9 +15,9 @@
-
- google_docs.config.form
- google.docs.config
+
+ google_drive.config.form
+ google.drive.config
-
-
+
+
@@ -52,12 +52,12 @@
-
+
Google Drive Templates
- google.docs.config
+ google.drive.config
ir.actions.act_window
form
-
+
Click to add a new template.
@@ -73,23 +73,23 @@
base.config.settings
-
-
+
+
- Click here to
+ Click here to
- ''
+ ''
- Configure your templates and link your google document to OpenERP records
+ Configure your templates and link your google document to OpenERP records
-
-
+
+
diff --git a/addons/google_drive/security/ir.model.access.csv b/addons/google_drive/security/ir.model.access.csv
new file mode 100644
index 00000000000..ae98cb36976
--- /dev/null
+++ b/addons/google_drive/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_google_drive_all,google.drive.config,model_google_drive_config,,1,0,0,0
+access_google_drive,google.drive.config,model_google_drive_config,base.group_system,1,1,1,1
\ No newline at end of file
diff --git a/addons/google_docs/static/lib/gapi/client.js b/addons/google_drive/static/lib/gapi/client.js
similarity index 100%
rename from addons/google_docs/static/lib/gapi/client.js
rename to addons/google_drive/static/lib/gapi/client.js
diff --git a/addons/google_docs/static/src/img/drive_icon.png b/addons/google_drive/static/src/img/drive_icon.png
similarity index 100%
rename from addons/google_docs/static/src/img/drive_icon.png
rename to addons/google_drive/static/src/img/drive_icon.png
diff --git a/addons/google_docs/static/src/img/drive_icon_mono.png b/addons/google_drive/static/src/img/drive_icon_mono.png
similarity index 100%
rename from addons/google_docs/static/src/img/drive_icon_mono.png
rename to addons/google_drive/static/src/img/drive_icon_mono.png
diff --git a/addons/google_docs/static/src/img/icon.png b/addons/google_drive/static/src/img/icon.png
similarity index 100%
rename from addons/google_docs/static/src/img/icon.png
rename to addons/google_drive/static/src/img/icon.png
diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_drive/static/src/js/gdrive.js
similarity index 85%
rename from addons/google_docs/static/src/js/gdocs.js
rename to addons/google_drive/static/src/js/gdrive.js
index 24385b3b85e..1bfcc603d51 100644
--- a/addons/google_docs/static/src/js/gdocs.js
+++ b/addons/google_drive/static/src/js/gdrive.js
@@ -1,4 +1,4 @@
-openerp.google_docs = function (instance, m) {
+openerp.google_drive = function (instance, m) {
var _t = instance.web._t,
QWeb = instance.web.qweb;
@@ -25,8 +25,8 @@ openerp.google_docs = function (instance, m) {
}
if (res_id) {
view.sidebar_eval_context().done(function (context) {
- var ds = new instance.web.DataSet(this, 'google.docs.config', context);
- ds.call('get_google_docs_config', [view.dataset.model, res_id, context]).done(function (r) {
+ var ds = new instance.web.DataSet(this, 'google.drive.config', context);
+ ds.call('get_google_drive_config', [view.dataset.model, res_id, context]).done(function (r) {
if (!_.isEmpty(r)) {
_.each(r, function (res) {
var g_item = _.indexOf(_.pluck(self.items.other, 'label'), res.name);
@@ -34,7 +34,7 @@ openerp.google_docs = function (instance, m) {
self.items.other.splice(g_item, 1);
}
self.add_items('other', [{
- label: res.name+ '
',
+ label: res.name+ '
',
config_id: res.id,
res_id: res_id,
res_model: view.dataset.model,
@@ -56,10 +56,10 @@ openerp.google_docs = function (instance, m) {
on_google_doc: function (doc_item) {
var self = this;
self.config = doc_item;
- var loaded = self.fetch('google.docs.config', ['gdocs_resource_id', 'google_docs_client_id'], [['id', '=', doc_item.config_id]])
+ var loaded = self.fetch('google.drive.config', ['google_drive_resource_id', 'google_drive_client_id'], [['id', '=', doc_item.config_id]])
.then(function (configs) {
- var ds = new instance.web.DataSet(self, 'google.docs.config');
- ds.call('get_google_doc_name', [[doc_item.config_id], doc_item.res_id,configs[0].gdocs_resource_id]).done(function (r) {
+ var ds = new instance.web.DataSet(self, 'google.drive.config');
+ ds.call('get_google_doc_name', [[doc_item.config_id], doc_item.res_id,configs[0].google_drive_resource_id]).done(function (r) {
if (!_.isEmpty(r)) {
_.each(r, function (res) {
if(res.url)