parent
2b774dddfb
commit
9afb5cfe64
|
@ -22,8 +22,8 @@ class google_docs_ir_attachment(osv.osv):
|
|||
|
||||
return client
|
||||
|
||||
def create_empty_google_doc(self, cr, uid, model, id, type_doc):
|
||||
#import pdb; pdb.set_trace()
|
||||
def create_empty_google_doc(self, cr, uid, model, ids, type_doc):
|
||||
import pdb; pdb.set_trace()
|
||||
'''Associate a copy of the gdoc identified by 'gdocs_res_id' to the current entity.
|
||||
@param cr: the current row from the database cursor.
|
||||
@param uid: the current user ID, for security checks.
|
||||
|
@ -49,16 +49,16 @@ class google_docs_ir_attachment(osv.osv):
|
|||
|
||||
# register into the db
|
||||
self.create(cr, uid, {
|
||||
'model': model,
|
||||
'res_model': model,
|
||||
'res_id': ids[0],
|
||||
'type': 'url',
|
||||
#'name': TODO pending from the working config
|
||||
'name': 'new_foo', # TODO pending from the working config
|
||||
'url': gdocs_resource.get_alternate_link().href
|
||||
})
|
||||
|
||||
return gdocs_resource
|
||||
|
||||
def copy_gdoc(self, cr, uid, model, id):
|
||||
def copy_gdoc(self, cr, uid, model, ids):
|
||||
if context is None:
|
||||
context={}
|
||||
|
||||
|
@ -72,10 +72,10 @@ class google_docs_ir_attachment(osv.osv):
|
|||
|
||||
# register into the db
|
||||
self.create(cr, uid, {
|
||||
'model': model,
|
||||
'res_id': id[0],
|
||||
'res_model': model,
|
||||
'res_id': ids[0],
|
||||
'type': 'url',
|
||||
#'name': TODO pending from the working config
|
||||
'name': 'copy_foo', # TODO pending from the working config
|
||||
'url': copy_resource.get_alternate_link().href
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue