← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 779193] [NEW] product - separate decimal precision for standard_price

 

On Saturday 07 May 2011, you wrote:
> Public bug reported:
> 
> especially when using average price and real time evaluation it is
> necessary to specify 4-6 digits for the field standard_price (which
> holds the average price)
>... 
> patch will not break anything but give more flexibility
> * defines "Standard Price" as precision for standard_price

Well, I have a slightly different opinion about that last sentence:
since this patch will /change/ the way precision is configured for that 
field, it is a change of functionality, so not a backwards-compatible patch. 

Imagine setting your "Account" precision to 4, and then applying this 
patch. It will introduce a change of configuration.

So, it would only be valid for new version+databases (would also 
require a 6.0->6.x migration script to copy the "Account" precision 
to "Standard Price").

OTOH, we are allowed to have this change in a separate module. Calling 
the module means you implicitly agree to change that configuration. 

Interestingly, the change in pg84-next API would just be a few lines
like:

_columns = {
	'standard_price': fields.inherit(digits_compute=dp.get_precision('Account')),
	}

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/779193

Title:
  product - separate decimal precision for standard_price

Status in OpenERP Modules (addons):
  New

Bug description:
  especially when using average price and real time evaluation it is
  necessary to specify 4-6 digits for the field standard_price (which
  holds the average price)

  this is especially true for high volume / low price products
  Example 
  gasoline
  price 1,1115€ ~ 111.15¢
  purchase qty= 10000 liter
  stock qty = 1500 for refill

  patch will not break anything but give more flexibility
  * defines "Standard Price" as precision for standard_price


References