Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Get rid of the difference in base and subtotal amounts in an invoice

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 247
    Comment on it

    It has been noticed that if we create an invoice in OpenERP, we see a difference between the subtotal of a line and the base amount for taxes, and this amount can vary hugely as the quantity of the product/item increases. For this, I have been searching a lot and finally the issue can be resolved. Just follow the following steps:

    1. Check if the account precision and currency precision are same:

    For this, go to the Accounting Module/Configuration/Miscellaneous/Currencies.

    Go to the required currency, in my case INR and change the Decimal Accuracy integer.

    My account precision is set to 2, so I decided to change my currency precision to 2 as well.

    2. Some patch work:

    Now in account_invoice.py, go to the compute function of the account_invoice_line model and do the changes.

    Replace the line

    val['base'] = tax['price_unit'] * line['quantity']
    with
    val['base'] = cur_obj.round(cr, uid, cur, tax['price_unit'] * line['quantity'])

    Also delete the line

    tax['price_unit'] = cur_obj.round(cr, uid, cur, tax['price_unit'])

    For reference use the link https://bugs.launchpad.net/openobject-addons/+bug/994445

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: