Round the VAT to 5 cents in Swiss
SALE ORDER:
Change the file sale/sale.py:
def _amount_all(self, cr, uid, ids, field_name, arg, context=None):
res[order.id]['amount_tax'] = cur_obj.round(cr, uid, cur, val)
....
#hack by wysi1 to round prices
if order.pricelist_id.currency_id.name == 'CHF':
res[order.id]['amount_tax'] = round(res[order.id]['amount_tax']/0.05)*0.05
res[order.id]['amount_untaxed'] = cur_obj.round(cr, uid, cur, val1)
....
INVOICE:
Install the module "account_include_tax"
Change the file invoice_tax_incl.py:
def compute(self, cr, uid, invoice_id, context=None):
...
for t in tax_grouped.values():
t['amount'] = cur_obj.round(cr, uid, cur, t['amount'])
t['base_amount'] = cur_obj.round(cr, uid, cur, t['base_amount'])
t['tax_amount'] = cur_obj.round(cr, uid, cur, t['tax_amount'])
#hack by wysi1 to round the tax for swiss standard
if t['amount'] == t['tax_amount'] and inv.price_type == "tax_excluded":
t['amount'] = round(t['amount']/0.05)*0.05
t['tax_amount'] = round(t['tax_amount']/0.05)*0.05
...
return tax_grouped
account_invoice_tax()
