Feedback 1099: Account_Setup für Glaser
parent
bcd14fa6fb
commit
99a7b88ee2
|
|
@ -31,7 +31,8 @@
|
||||||
(4,ref('sales_team.group_sale_manager')),
|
(4,ref('sales_team.group_sale_manager')),
|
||||||
(4,ref('stock.group_stock_manager')),
|
(4,ref('stock.group_stock_manager')),
|
||||||
(4,ref('base.group_system')),
|
(4,ref('base.group_system')),
|
||||||
(4,ref('base.group_partner_manager'))]"/>
|
(4,ref('base.group_partner_manager')),
|
||||||
|
(4,ref('account.group_account_user'))]"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!--<function-->
|
<!--<function-->
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
(4,ref('sales_team.group_sale_manager')),
|
(4,ref('sales_team.group_sale_manager')),
|
||||||
(4,ref('stock.group_stock_manager')),
|
(4,ref('stock.group_stock_manager')),
|
||||||
(4,ref('base.group_system')),
|
(4,ref('base.group_system')),
|
||||||
(4,ref('base.group_partner_manager'))]"/>
|
(4,ref('base.group_partner_manager')),
|
||||||
|
(4,ref('account.group_account_user'))]"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,8 @@ def main():
|
||||||
#'stock_set_cost_method',
|
#'stock_set_cost_method',
|
||||||
#'set_incoterms',
|
#'set_incoterms',
|
||||||
'set_company',
|
'set_company',
|
||||||
|
'enable_res_config_for_company', # muss bei multicompany ausgefuehrt werden
|
||||||
|
'set_multicompany_data', # set_multicompany_data
|
||||||
'set_uom',
|
'set_uom',
|
||||||
'set_taxes',
|
'set_taxes',
|
||||||
'set_fiscal_position',
|
'set_fiscal_position',
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,7 @@ class Config():
|
||||||
'web_environment_ribbon',
|
'web_environment_ribbon',
|
||||||
'web_no_bubble',
|
'web_no_bubble',
|
||||||
'report_intrastat',
|
'report_intrastat',
|
||||||
|
'dp_sale_hide_discount'
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,3 +79,7 @@ class ConfigGlaser(Config):
|
||||||
# },
|
# },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.multi_company_settings = {
|
||||||
|
'chart_template_id': ('xmlid', 'l10n_at.austria_chart_template')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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', 'admin', 'x', 'admin'),
|
'aa': 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()),
|
||||||
'oa': Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin'),
|
'oa': Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin'),
|
||||||
|
|
||||||
# Remote environments are always listed without passwords!
|
# Remote environments are always listed without passwords!
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,30 @@ class DatenpolFunctions:
|
||||||
vals['country_id'] = country_id
|
vals['country_id'] = country_id
|
||||||
return self.odoo.env.ref(self.config.company_xmlid).write(vals)
|
return self.odoo.env.ref(self.config.company_xmlid).write(vals)
|
||||||
|
|
||||||
|
def enable_res_config_for_company(self):
|
||||||
|
"""Setze beim portal_template_user die Company als zulässiges Unternehmen"""
|
||||||
|
portal_template_user = self.odoo.env.ref('auth_signup.default_template_user')
|
||||||
|
vals = {}
|
||||||
|
if self.odoo.env.ref(self.config.company_xmlid) not in portal_template_user.company_ids:
|
||||||
|
vals = {'company_ids': [(4, self.odoo.env.ref(self.config.company_xmlid).id)]}
|
||||||
|
|
||||||
|
return portal_template_user.write(vals)
|
||||||
|
|
||||||
|
def set_multicompany_data(self):
|
||||||
|
"""Multicompany Systemeinstellungen konfigurieren"""
|
||||||
|
res_settings = self.odoo.env['res.config.settings']
|
||||||
|
vals = res_settings.default_get([])
|
||||||
|
newvals = {}
|
||||||
|
for key, value in self.config.multi_company_settings.items():
|
||||||
|
if isinstance(value, tuple):
|
||||||
|
if value[0] == 'xmlid':
|
||||||
|
newvals.update({key: self.odoo.env.ref(value[1]).id})
|
||||||
|
else:
|
||||||
|
newvals.update({key: value})
|
||||||
|
vals.update(newvals)
|
||||||
|
wizard_id = res_settings.create(vals)
|
||||||
|
return res_settings.browse(wizard_id).execute()
|
||||||
|
|
||||||
def load_languages(self):
|
def load_languages(self):
|
||||||
"""Lade zusätzliche Sprachen"""
|
"""Lade zusätzliche Sprachen"""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue