[FIX] Signature on overriden fields_get method
This commit is contained in:
parent
c3f4ec856c
commit
714fe9135d
|
@ -397,8 +397,8 @@ class payment_line(osv.osv):
|
|||
break
|
||||
return {'value': data}
|
||||
|
||||
def fields_get(self, cr, uid, fields=None, context=None):
|
||||
res = super(payment_line, self).fields_get(cr, uid, fields, context)
|
||||
def fields_get(self, cr, uid, fields=None, context=None, write_access=True, attributes=None):
|
||||
res = super(payment_line, self).fields_get(cr, uid, fields, context, write_access, attributes)
|
||||
if 'communication2' in res:
|
||||
res['communication2'].setdefault('states', {})
|
||||
res['communication2']['states']['structured'] = [('readonly', True)]
|
||||
|
|
|
@ -151,8 +151,8 @@ class res_partner_bank(osv.osv):
|
|||
'name': '/'
|
||||
}
|
||||
|
||||
def fields_get(self, cr, uid, allfields=None, context=None):
|
||||
res = super(res_partner_bank, self).fields_get(cr, uid, allfields=allfields, context=context)
|
||||
def fields_get(self, cr, uid, allfields=None, context=None, write_access=True, attributes=None):
|
||||
res = super(res_partner_bank, self).fields_get(cr, uid, allfields=allfields, context=context, write_access=write_access, attributes=attributes)
|
||||
bank_type_obj = self.pool.get('res.partner.bank.type')
|
||||
type_ids = bank_type_obj.search(cr, uid, [])
|
||||
types = bank_type_obj.browse(cr, uid, type_ids)
|
||||
|
|
|
@ -362,13 +362,13 @@ class res_config_installer(osv.osv_memory, res_config_module_installation_mixin)
|
|||
self.already_installed(cr, uid, context=context),
|
||||
True))
|
||||
|
||||
def fields_get(self, cr, uid, fields=None, context=None, write_access=True):
|
||||
def fields_get(self, cr, uid, fields=None, context=None, write_access=True, attributes=None):
|
||||
""" If an addon is already installed, set it to readonly as
|
||||
res.config.installer doesn't handle uninstallations of already
|
||||
installed addons
|
||||
"""
|
||||
fields = super(res_config_installer, self).fields_get(
|
||||
cr, uid, fields, context, write_access)
|
||||
cr, uid, fields, context, write_access, attributes)
|
||||
|
||||
for name in self.already_installed(cr, uid, context=context):
|
||||
if name not in fields:
|
||||
|
|
|
@ -890,8 +890,8 @@ class users_view(osv.osv):
|
|||
selected = [gid for gid in get_selection_groups(f) if gid in gids]
|
||||
values[f] = selected and selected[-1] or False
|
||||
|
||||
def fields_get(self, cr, uid, allfields=None, context=None, write_access=True):
|
||||
res = super(users_view, self).fields_get(cr, uid, allfields, context, write_access)
|
||||
def fields_get(self, cr, uid, allfields=None, context=None, write_access=True, attributes=None):
|
||||
res = super(users_view, self).fields_get(cr, uid, allfields, context, write_access, attributes)
|
||||
# add reified groups fields
|
||||
for app, kind, gs in self.pool['res.groups'].get_groups_by_application(cr, uid, context):
|
||||
if kind == 'selection':
|
||||
|
|
Loading…
Reference in New Issue