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

@ -62,6 +62,7 @@ def main():
'set_steuerzuordnung', 'set_steuerzuordnung',
'setup_journals', 'setup_journals',
'set_currencies', 'set_currencies',
'set_decimal_price',
] ]
if cmd == 'rollout': if cmd == 'rollout':

View File

@ -8,6 +8,7 @@ class Config():
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',

View File

@ -484,3 +484,13 @@ class CamadeusFunctions():
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