Module "decimal_precision" faulty by design

Bug #726690 reported by sraps (Alistek)
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP R&D Addons Team 3

Bug Description

There are several design faults with "decimal_precision" module.
Quote from module description:
-----------------------
This module allows to configure the price accuracy you need for different kind
of usage: accounting, sales, purchases, ...

The decimal precision is configured per company.
-----------------------
Fault #1:
Although it states that there is an option to set decimal precision per company, the model "decimal.precision" has no company field. It is the same when you observe the functionality in use by several other modules, like accounting, because it initializes the classes per database, not per company (IMHO it is impossible), evidently the functionality stated in the description is not being performed.

Fault #2:
When we see the float field definition there is such thing as 2 parameters - the number before decimal separator and the number after, still the model "decimal.precision" has only one field - digits.

Fault #3:
Normally you should not use language specific capitalized strings with spaces inside as codes for matching the particular setting, still there is "Sale Price", "Purchase Price", "Account", "Stock Weight", "Product UoM", "Shipping Delay". Which is amateurish coding style. This is not according to conventions in the other places with OpenERP, for example with properties, where you can observe completely opposite situation, for example - "property_account_receivable".

Revision history for this message
Azazahmed Saiyed (OpenERP) (saz-openerp) wrote :

Hello,

I am confirming the issue raised in Fault #1 as wishlist, because we do not have such functionality in current version.

In response to Fault #2 and #3, we have given the digits field for only precision that is number of digits after decimal separator. So it is working good and as per need. While you can give the string as per your need. In the end it will be evaluated in the query as %s.

Thanks for your participation.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

@Azazahmed the problem with Fault #3 can crash all system, if admin get an error and change the name for precision and fault #2 would be implemented for 6.1, in v5 we can defined the number of digits in both after/before decimal separator, now we are hand cut.

Regards,

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

hey

the decimal_precision addon works only for the company that was defined at installation date of openerp. all other additional companies doesn't have any decimal accuracy...
This addon need to be fixed soon, cause.. there a reprices like .27, .29, .43, ... and it's not really usable for our customers.

thanks
thomi

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.