decimal places price
parent
83657287c7
commit
90dc966fc9
|
|
@ -41,7 +41,7 @@ def main():
|
||||||
'install_module_sale',
|
'install_module_sale',
|
||||||
'setup_accounting',
|
'setup_accounting',
|
||||||
'setup_accounting2',
|
'setup_accounting2',
|
||||||
'set_admin_rights',
|
'set_admin_rights',
|
||||||
]
|
]
|
||||||
|
|
||||||
if cmd == 'setup':
|
if cmd == 'setup':
|
||||||
|
|
@ -55,61 +55,62 @@ def main():
|
||||||
'stock_config',
|
'stock_config',
|
||||||
'set_incoterms',
|
'set_incoterms',
|
||||||
'purchase_config',
|
'purchase_config',
|
||||||
'set_date_format',
|
'set_date_format',
|
||||||
'set_company',
|
'set_company',
|
||||||
'set_taxes',
|
'set_taxes',
|
||||||
'set_uom',
|
'set_uom',
|
||||||
'set_steuerzuordnung',
|
'set_steuerzuordnung',
|
||||||
'setup_journals',
|
'setup_journals',
|
||||||
'set_currencies',
|
'set_currencies',
|
||||||
|
'set_decimal_price',
|
||||||
]
|
]
|
||||||
|
|
||||||
if cmd == 'rollout':
|
if cmd == 'rollout':
|
||||||
methods = [
|
methods = [
|
||||||
'login',
|
'login',
|
||||||
'set_dokumentennummern',
|
'set_dokumentennummern',
|
||||||
'set_dmi_noupdate',
|
'set_dmi_noupdate',
|
||||||
'dmi_confirm_inventory',
|
'dmi_confirm_inventory',
|
||||||
]
|
]
|
||||||
|
|
||||||
if cmd == 'update':
|
if cmd == 'update':
|
||||||
instance.config.module_name = argv[2]
|
instance.config.module_name = argv[2]
|
||||||
methods = [
|
methods = [
|
||||||
'login',
|
'login',
|
||||||
'update_module',
|
'update_module',
|
||||||
]
|
]
|
||||||
|
|
||||||
if cmd == 'install':
|
if cmd == 'install':
|
||||||
instance.config.module_name = argv[2]
|
instance.config.module_name = argv[2]
|
||||||
methods = [
|
methods = [
|
||||||
'login',
|
'login',
|
||||||
'install_module',
|
'install_module',
|
||||||
]
|
]
|
||||||
|
|
||||||
if cmd == 'update_modules':
|
if cmd == 'update_modules':
|
||||||
methods = [
|
methods = [
|
||||||
'login',
|
'login',
|
||||||
'update_modules',
|
'update_modules',
|
||||||
]
|
]
|
||||||
|
|
||||||
if cmd == 'update_all':
|
if cmd == 'update_all':
|
||||||
methods = [
|
methods = [
|
||||||
'login',
|
'login',
|
||||||
'update_all',
|
'update_all',
|
||||||
]
|
]
|
||||||
|
|
||||||
if not methods:
|
if not methods:
|
||||||
_usage()
|
_usage()
|
||||||
|
|
||||||
print env
|
print env
|
||||||
|
|
||||||
for method in methods:
|
for method in methods:
|
||||||
res = getattr(instance, method)()
|
res = getattr(instance, method)()
|
||||||
print "%s: %s" % (res and "OK " or "ERROR ", getattr(instance, method).__doc__)
|
print "%s: %s" % (res and "OK " or "ERROR ", getattr(instance, method).__doc__)
|
||||||
if not res:
|
if not res:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
print "\nAbgeschlossen."
|
print "\nAbgeschlossen."
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,9 @@ class Config():
|
||||||
self.chart_of_accounts = 'l10n_at'
|
self.chart_of_accounts = 'l10n_at'
|
||||||
self.sales_tax = '20% MwSt'
|
self.sales_tax = '20% MwSt'
|
||||||
self.purchase_tax = '20% VSt'
|
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 = {
|
self.company_data = {
|
||||||
'name': 'Camadeus GmbH',
|
'name': 'Camadeus GmbH',
|
||||||
'street': 'Kriehubergasse 16',
|
'street': 'Kriehubergasse 16',
|
||||||
|
|
|
||||||
|
|
@ -483,4 +483,14 @@ class CamadeusFunctions():
|
||||||
if inventory.get('state','') == 'confirm':
|
if inventory.get('state','') == 'confirm':
|
||||||
return self._execute('stock.inventory', 'action_done', [inventory_id])
|
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
|
||||||
Loading…
Reference in New Issue