[FIX] travis
parent
15a8ff8fb0
commit
c830d8fff3
|
@ -72,30 +72,39 @@ class MassObject(orm.Model):
|
|||
for data in self.browse(cr, uid, ids, context=context):
|
||||
src_obj = data.model_id.model
|
||||
button_name = _('Mass Editing (%s)') % data.name
|
||||
vals['ref_ir_act_window'] = action_obj.create(cr, SUPERUSER_ID, {
|
||||
'name': button_name,
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'mass.editing.wizard',
|
||||
'src_model': src_obj,
|
||||
'view_type': 'form',
|
||||
'context': "{'mass_editing_object' : %d}" % (data.id),
|
||||
'view_mode': 'form,tree',
|
||||
'target': 'new',
|
||||
'auto_refresh': 1,
|
||||
}, context)
|
||||
vals['ref_ir_value'] = ir_values_obj.create(cr, SUPERUSER_ID, {
|
||||
'name': button_name,
|
||||
'model': src_obj,
|
||||
'key2': 'client_action_multi',
|
||||
'value': (
|
||||
"ir.actions.act_window,"
|
||||
+ str(vals['ref_ir_act_window'])),
|
||||
'object': True,
|
||||
}, context)
|
||||
self.write(cr, uid, ids, {
|
||||
'ref_ir_act_window': vals.get('ref_ir_act_window', False),
|
||||
'ref_ir_value': vals.get('ref_ir_value', False),
|
||||
}, context)
|
||||
vals['ref_ir_act_window'] = action_obj.create(
|
||||
cr, SUPERUSER_ID,
|
||||
{
|
||||
'name': button_name,
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'mass.editing.wizard',
|
||||
'src_model': src_obj,
|
||||
'view_type': 'form',
|
||||
'context': "{'mass_editing_object' : %d}" % (data.id),
|
||||
'view_mode': 'form,tree',
|
||||
'target': 'new',
|
||||
'auto_refresh': 1,
|
||||
},
|
||||
context)
|
||||
vals['ref_ir_value'] = ir_values_obj.create(
|
||||
cr, SUPERUSER_ID,
|
||||
{
|
||||
'name': button_name,
|
||||
'model': src_obj,
|
||||
'key2': 'client_action_multi',
|
||||
'value': (
|
||||
"ir.actions.act_window,"
|
||||
+ str(vals['ref_ir_act_window'])),
|
||||
'object': True,
|
||||
},
|
||||
context)
|
||||
self.write(
|
||||
cr, uid, ids,
|
||||
{
|
||||
'ref_ir_act_window': vals.get('ref_ir_act_window', False),
|
||||
'ref_ir_value': vals.get('ref_ir_value', False),
|
||||
},
|
||||
context)
|
||||
return True
|
||||
|
||||
def unlink_action(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -215,7 +215,7 @@ class ServerConfiguration(models.TransientModel):
|
|||
self._arch = etree.fromstring(arch)
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form',
|
||||
context=None, toolbar=False, submenu=False):
|
||||
context=None, toolbar=False, submenu=False):
|
||||
"""Overwrite the default method to render the custom view."""
|
||||
res = super(ServerConfiguration, self).fields_view_get(cr, uid,
|
||||
view_id,
|
||||
|
|
|
@ -35,11 +35,12 @@ class CompanyLDAP(orm.Model):
|
|||
'mail_attribute': fields.char(
|
||||
'E-mail attribute', size=64,
|
||||
help="LDAP attribute to use to retrieve em-mail address."),
|
||||
}
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'name_attribute': 'cn',
|
||||
'mail_attribute': 'mail',
|
||||
}
|
||||
}
|
||||
|
||||
def get_ldap_dicts(self, cr, ids=None):
|
||||
"""
|
||||
|
@ -65,7 +66,7 @@ class CompanyLDAP(orm.Model):
|
|||
mapping = [
|
||||
('name', 'name_attribute'),
|
||||
('email', 'mail_attribute'),
|
||||
]
|
||||
]
|
||||
for value_key, conf_name in mapping:
|
||||
try:
|
||||
if conf[conf_name]:
|
||||
|
|
|
@ -39,10 +39,10 @@ object you want to query.
|
|||
""",
|
||||
"depends": [
|
||||
'auth_ldap',
|
||||
],
|
||||
],
|
||||
"data": [
|
||||
'view/users_ldap.xml',
|
||||
'view/populate_wizard.xml',
|
||||
],
|
||||
],
|
||||
'installable': True,
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class CompanyLDAPPopulateWizard(orm.TransientModel):
|
|||
'res.company.ldap', 'LDAP Configuration'),
|
||||
'users_created': fields.integer(
|
||||
'Number of users created', readonly=True),
|
||||
}
|
||||
}
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
ldap_pool = self.pool.get('res.company.ldap')
|
||||
|
|
|
@ -93,4 +93,4 @@ class CompanyLDAP(orm.Model):
|
|||
'target': 'new',
|
||||
'res_id': res_id,
|
||||
'nodestroy': True,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue