multicompany dp_script functions fix
parent
549beeb41e
commit
757ac884ed
|
|
@ -31,7 +31,8 @@ ENVIRONMENTS = {
|
||||||
'br': Environment('http://localhost', '8080', 'tz-austria_1', 'tz-admin', 'x', 'admin', config=ConfigTZA()),
|
'br': Environment('http://localhost', '8080', 'tz-austria_1', 'tz-admin', 'x', 'admin', config=ConfigTZA()),
|
||||||
'br-glaser': Environment('http://localhost', '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config=ConfigGlaser()),
|
'br-glaser': Environment('http://localhost', '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config=ConfigGlaser()),
|
||||||
|
|
||||||
'aa': Environment('http://localhost', '8080', 'tz-austria_1', 'tz-admin', 'x', 'admin', config=ConfigTZA()),
|
'aa': Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin', config=ConfigTZA()),
|
||||||
|
'aa-tz': Environment('http://localhost', '8080', 'tz-austria_1', 'tz-admin', 'x', 'admin', config=ConfigTZA()),
|
||||||
'aa-glaser': Environment('http://localhost', '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config=ConfigGlaser()),
|
'aa-glaser': Environment('http://localhost', '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config=ConfigGlaser()),
|
||||||
'oa': Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin'),
|
'oa': Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin'),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,13 +97,19 @@ class DatenpolFunctions:
|
||||||
"""Setze beim portal_template_user die Company als zulässiges Unternehmen"""
|
"""Setze beim portal_template_user die Company als zulässiges Unternehmen"""
|
||||||
portal_template_user = self.odoo.env.ref('auth_signup.default_template_user')
|
portal_template_user = self.odoo.env.ref('auth_signup.default_template_user')
|
||||||
vals = {}
|
vals = {}
|
||||||
if self.odoo.env.ref(self.config.company_xmlid) not in portal_template_user.company_ids:
|
companies = self.odoo.env['res.company'].search([])
|
||||||
vals = {'company_ids': [(4, self.odoo.env.ref(self.config.company_xmlid).id)]}
|
vals_company = []
|
||||||
|
for company in companies:
|
||||||
|
if company not in portal_template_user.company_ids.ids:
|
||||||
|
vals_company.append((4, company))
|
||||||
|
|
||||||
|
vals = {'company_ids': vals_company}
|
||||||
|
|
||||||
return portal_template_user.write(vals)
|
return portal_template_user.write(vals)
|
||||||
|
|
||||||
def set_multicompany_data(self):
|
def set_multicompany_data(self):
|
||||||
"""Multicompany Systemeinstellungen konfigurieren"""
|
"""Multicompany Systemeinstellungen konfigurieren"""
|
||||||
|
if hasattr(self.config, 'multi_company_settings'):
|
||||||
res_settings = self.odoo.env['res.config.settings']
|
res_settings = self.odoo.env['res.config.settings']
|
||||||
vals = res_settings.default_get([])
|
vals = res_settings.default_get([])
|
||||||
newvals = {}
|
newvals = {}
|
||||||
|
|
@ -116,6 +122,7 @@ class DatenpolFunctions:
|
||||||
vals.update(newvals)
|
vals.update(newvals)
|
||||||
wizard_id = res_settings.create(vals)
|
wizard_id = res_settings.create(vals)
|
||||||
return res_settings.browse(wizard_id).execute()
|
return res_settings.browse(wizard_id).execute()
|
||||||
|
return True
|
||||||
|
|
||||||
def load_languages(self):
|
def load_languages(self):
|
||||||
"""Lade zusätzliche Sprachen"""
|
"""Lade zusätzliche Sprachen"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue