währungen
parent
ffdfaa4dc5
commit
2e816077d1
|
|
@ -58,6 +58,7 @@ def main():
|
||||||
'set_uom',
|
'set_uom',
|
||||||
'set_steuerzuordnung',
|
'set_steuerzuordnung',
|
||||||
'setup_journals',
|
'setup_journals',
|
||||||
|
'set_currencies',
|
||||||
]
|
]
|
||||||
|
|
||||||
if cmd == 'rollout':
|
if cmd == 'rollout':
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,11 @@ class Config():
|
||||||
'Kunde EU Unternehmen (mit USt-ID)',
|
'Kunde EU Unternehmen (mit USt-ID)',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Aktive Währungen
|
||||||
|
self.valid_currencies = [
|
||||||
|
'EUR',
|
||||||
|
]
|
||||||
|
|
||||||
# Allgemeine Einstellungen
|
# Allgemeine Einstellungen
|
||||||
self.base_config = {
|
self.base_config = {
|
||||||
'module_portal': False, # Kundenportal
|
'module_portal': False, # Kundenportal
|
||||||
|
|
|
||||||
|
|
@ -265,6 +265,25 @@ class CamadeusFunctions():
|
||||||
res = self._execute('wizard.multi.charts.accounts', 'action_next', [wizard_id])
|
res = self._execute('wizard.multi.charts.accounts', 'action_next', [wizard_id])
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def set_currencies(self):
|
||||||
|
"""Währungen setzen"""
|
||||||
|
|
||||||
|
c = self.config
|
||||||
|
|
||||||
|
# Set all currencies to active
|
||||||
|
ids = self._execute('res.currency', 'search', ['|',('active','=',True),('active','=',False)])
|
||||||
|
res = self._execute('res.currency', 'write', ids, {'active': True})
|
||||||
|
if not res:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Set all other UOMs to inactive
|
||||||
|
inactive_ids = self._execute('res.currency', 'search', [('name','not in',c.valid_currencies)])
|
||||||
|
res = self._execute('res.currency', 'write', inactive_ids, {'active': False})
|
||||||
|
if not res:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
def uninstall_chat(self):
|
def uninstall_chat(self):
|
||||||
"""Chat-Modul deinstallieren """
|
"""Chat-Modul deinstallieren """
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue