From 3da067914a9f2e3574213f2aba492c45bfb55d8d Mon Sep 17 00:00:00 2001 From: TTA <> Date: Fri, 19 Oct 2012 16:10:20 +0530 Subject: Fixed list view issue. bzr revid: vba@tinyerp.com-20121019104020-9tz7t6h7xwa4dali --- addons/google_docs/google_docs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addons/google_docs/google_docs.py') diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py index 6e839969998..f0f6f22a7c5 100644 --- a/addons/google_docs/google_docs.py +++ b/addons/google_docs/google_docs.py @@ -114,7 +114,8 @@ class google_docs_ir_attachment(osv.osv): a length of 1 element only (batch processing is not supported in the code, though nothing really prevent it) :return: the google document object created ''' - assert len(ids) == 1, 'Creating google docs may only be done by one at a time' + if len(ids) != 1: + raise osv.except_osv(_('Google Docs Error!'), _("Creating google docs may only be done by one at a time.")) res_id = ids[0] pool_ir_attachment = self.pool.get('ir.attachment') pool_gdoc_config = self.pool.get('google.docs.config') -- cgit v1.2.3