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 Docres.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