decimal places price

develop
Andreas Brückl 2015-01-30 15:22:21 +01:00
parent 83657287c7
commit 90dc966fc9
3 changed files with 42 additions and 30 deletions

View File

@ -41,7 +41,7 @@ def main():
'install_module_sale',
'setup_accounting',
'setup_accounting2',
'set_admin_rights',
'set_admin_rights',
]
if cmd == 'setup':
@ -55,61 +55,62 @@ def main():
'stock_config',
'set_incoterms',
'purchase_config',
'set_date_format',
'set_company',
'set_taxes',
'set_uom',
'set_steuerzuordnung',
'setup_journals',
'set_currencies',
'set_date_format',
'set_company',
'set_taxes',
'set_uom',
'set_steuerzuordnung',
'setup_journals',
'set_currencies',
'set_decimal_price',
]
if cmd == 'rollout':
methods = [
'login',
'set_dokumentennummern',
'set_dmi_noupdate',
'dmi_confirm_inventory',
]
'set_dokumentennummern',
'set_dmi_noupdate',
'dmi_confirm_inventory',
]
if cmd == 'update':
instance.config.module_name = argv[2]
methods = [
'login',
'update_module',
]
'update_module',
]
if cmd == 'install':
instance.config.module_name = argv[2]
methods = [
'login',
'install_module',
]
'install_module',
]
if cmd == 'update_modules':
methods = [
'login',
'update_modules',
]
'update_modules',
]
if cmd == 'update_all':
methods = [
'login',
'update_all',
]
'update_all',
]
if not methods:
_usage()
print env
for method in methods:
for method in methods:
res = getattr(instance, method)()
print "%s: %s" % (res and "OK " or "ERROR ", getattr(instance, method).__doc__)
if not res:
return False
print "\nAbgeschlossen."
if __name__ == "__main__":
main()
main()

View File

@ -7,8 +7,9 @@ class Config():
self.chart_of_accounts = 'l10n_at'
self.sales_tax = '20% MwSt'
self.purchase_tax = '20% VSt'
self.chart_template_id = 2 # Austrian Chart of Account
self.chart_template_id = 2 # Austrian Chart of Account
self.digits = 2 #Nachkommastellen Preis
self.company_data = {
'name': 'Camadeus GmbH',
'street': 'Kriehubergasse 16',

View File

@ -483,4 +483,14 @@ class CamadeusFunctions():
if inventory.get('state','') == 'confirm':
return self._execute('stock.inventory', 'action_done', [inventory_id])
return True
return True
def set_decimal_price(self):
"""Dezimalstellen Preis setzen"""
# Set all currencies to active
ids = self._execute('decimal.precision', 'search', [('name','=','Product Price')])
res = self._execute('decimal.precision', 'write', ids, {'digits': self.config.digits})
if not res:
return False
return True