[5.0] Cannot validate Invoice with price_accuracy=3

Bug #513278 reported by Numérigraphe on 2010-01-27
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Medium
OpenERP Core Team
Nominated for 5.0 by Numérigraphe

Bug Description

Using a fresh DB and the latest 5.0 branches from LP, I get an error "Integrity Error ! You can not validate a non-balanced entry !" when I try to enter an invoice with:
- --price_accuracy=3
- unit price=444,444
- qty=1
- 1 tax = 19.6% (VAT as defined in the French accounting l10n module)
Lionel.

Numérigraphe (numerigraphe) wrote :
Numérigraphe (numerigraphe) wrote :

Marking a not a duplicate, because a partial solution was found for bug #452854 that solves this issue.

Changed in openobject-addons:
status: New → Confirmed
assignee: nobody → OpenERP Core Team (openerp)
Changed in openobject-addons:
importance: Undecided → Medium
milestone: none → 5.0.9

Sorry but your in France for example your patch can't be used.
Indeed in our country you have to use a 2 decimal precision for accounting. But you can sold product with a price accuracy of 3, 4 or more.

So OpenERP needs two parameters
Price_accuracy : this accuracy is ONLY for the price of the product
Account_accuracy : this accuracy is ONLY for the chart of account and should not be harcoded

'Accounting precision should not be hardcoded to "2". IIRC, the yen precision is "0". Someone could probably recall other currencies that such thing happens." : Cloves Almeida
http://n3.nabble.com/Floating-point-precisions-balanced-entries-and-VAT-included-reflexions-td430873.html#a430873

Moreover as OpenERP create a account move for each line of product sold, tax amount and untaxed amount have to be rounded to the account accuracy for EACH line. And the total of the invoice will be the total of the rounded line.

I just remenber this patch which works with a test of 5000 invoice without any problems
http://launchpadlibrarian.net/42770860/price_accuracy_patch.diff

Numérigraphe (numerigraphe) wrote :

Latest patch proposed by Joël Grand-Guillaume @ CampToCamp for Bug #452854 : http://launchpadlibrarian.net/43249646/rounding_issue

Changed in openobject-addons:
milestone: 5.0.9 → 5.0.10

I'm marking this as the duplicate of https://bugs.launchpad.net/openobject-addons/+bug/452854 as the heart of the problem is the same.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments