mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -06:00
Merge pull request #26 from oca-travis/7.0-autofix-script-01-dev-moylop260
[REF] auto-fix conventions
This commit is contained in:
commit
4d83c67ca3
@ -26,7 +26,7 @@ from openerp.osv import orm, fields
|
|||||||
class document_file(orm.Model):
|
class document_file(orm.Model):
|
||||||
_inherit = 'ir.attachment'
|
_inherit = 'ir.attachment'
|
||||||
|
|
||||||
def _name_get_resname(self, cr, uid, ids, object, method, context):
|
def _name_get_resname(self, cr, uid, ids, obj, method, context):
|
||||||
data = {}
|
data = {}
|
||||||
context = context or {}
|
context = context or {}
|
||||||
if isinstance(ids, (int, long)):
|
if isinstance(ids, (int, long)):
|
||||||
|
@ -19,4 +19,4 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
import document_page_approval
|
from . import document_page_approval
|
||||||
|
@ -89,12 +89,12 @@ class document_page_history_wkfl(orm.Model):
|
|||||||
|
|
||||||
def get_approvers_email(self, cr, uid, ids, name, args, context):
|
def get_approvers_email(self, cr, uid, ids, name, args, context):
|
||||||
res = {}
|
res = {}
|
||||||
for id in ids:
|
for rec_id in ids:
|
||||||
emails = ''
|
emails = ''
|
||||||
guids = self.get_approvers_guids(
|
guids = self.get_approvers_guids(
|
||||||
cr, uid, ids, name, args, context=context)
|
cr, uid, ids, name, args, context=context)
|
||||||
uids = self.pool.get('res.users').search(
|
uids = self.pool.get('res.users').search(
|
||||||
cr, uid, [('groups_id', 'in', guids[id])])
|
cr, uid, [('groups_id', 'in', guids[rec_id])])
|
||||||
users = self.pool.get('res.users').browse(
|
users = self.pool.get('res.users').browse(
|
||||||
cr, uid, uids, context=context)
|
cr, uid, uids, context=context)
|
||||||
|
|
||||||
@ -112,19 +112,19 @@ class document_page_history_wkfl(orm.Model):
|
|||||||
emails += ','
|
emails += ','
|
||||||
|
|
||||||
emails = emails[:-1]
|
emails = emails[:-1]
|
||||||
res[id] = emails
|
res[rec_id] = emails
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def get_page_url(self, cr, uid, ids, name, args, context):
|
def get_page_url(self, cr, uid, ids, name, args, context):
|
||||||
res = {}
|
res = {}
|
||||||
for id in ids:
|
for rec_id in ids:
|
||||||
base_url = self.pool.get('ir.config_parameter').get_param(
|
base_url = self.pool.get('ir.config_parameter').get_param(
|
||||||
cr, uid, 'web.base.url', default='http://localhost:8069',
|
cr, uid, 'web.base.url', default='http://localhost:8069',
|
||||||
context=context)
|
context=context)
|
||||||
|
|
||||||
res[id] = base_url + (
|
res[rec_id] = base_url + (
|
||||||
'/#db=%s&id=%s&view_type=form&model=document.page.history' %
|
'/#db=%s&id=%s&view_type=form&model=document.page.history' %
|
||||||
(cr.dbname, id))
|
(cr.dbname, rec_id))
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user