mrp - no precision specified for product_qty

Bug #884304 reported by Ferdinand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

IMHO a product precision should be defined for mrp

it's only done for
./wizard/mrp_product_produce.py:30:
all others have no specs.

or do I miss something ?

Revision history for this message
Bogdan Stanciu (bstanciu) wrote : Re: [Bug 884304] [NEW] mrp - no precision specified for product_qty

On 31. 10. 11 17:21, Ferdinand @ Camptocamp wrote:
> Public bug reported:
>
> IMHO a product precision should be defined for mrp
>
> it's only done for
> ./wizard/mrp_product_produce.py:30:
> all others have no specs.
>
> or do I miss something ?
>
> ** Affects: openobject-addons
> Importance: Undecided
> Status: New
>
are you talking about quantity?

If yes, I just proposed something similar in #884179... have a look and
support me :-)

b

Revision history for this message
Ferdinand (office-chricar) wrote :

+100%

Revision history for this message
xrg (xrg) wrote : Re: [Bug 884304] Re: mrp - no precision specified for product_qty

On Monday 31 October 2011, you wrote:
> +100%

Take 1% off, please.

Currently, in 6.0 design, /not/ specifying the precision means it is a float,
hence much faster. If you put the decimal precision, you make it a numeric.
We'd better, somehow, keep this option open, to use floats.

IMHO, floats are _not_ evil themselves. It's their poor usage that introduces
these rounding errors and makes them problematic.

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

On 31. 10. 11 19:20, xrg wrote:
> On Monday 31 October 2011, you wrote:
>> +100%
> Take 1% off, please.
>
> Currently, in 6.0 design, /not/ specifying the precision means it is a float,
> hence much faster. If you put the decimal precision, you make it a numeric.
> We'd better, somehow, keep this option open, to use floats.
>
> IMHO, floats are _not_ evil themselves. It's their poor usage that introduces
> these rounding errors and makes them problematic.
>
speed is a very important issue, so I agree with you. I actually ended
up with my proposal because I was unable to set decimals in some forms
(stock, mrp).

should it be another way to VIEW decimals in forms/reports, I would give
a try. Is there any? Actually for reports we can set dp in the rml file,
but for forms?

thank you,
b

Revision history for this message
xrg (xrg) wrote :

On Monday 31 October 2011, you wrote:
> speed is a very important issue, so I agree with you. I actually ended
> up with my proposal because I was unable to set decimals in some forms
> (stock, mrp).
>
> should it be another way to VIEW decimals in forms/reports, I would give
> a try. Is there any? Actually for reports we can set dp in the rml file,
> but for forms?

That's EXACTLY the point. That's why I said only "-1%" off your original
proposal. Which means, I agree 98.9999999999% with you :)

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

On 31. 10. 11 20:00, xrg wrote:
> On Monday 31 October 2011, you wrote:
>> speed is a very important issue, so I agree with you. I actually ended
>> up with my proposal because I was unable to set decimals in some forms
>> (stock, mrp).
>>
>> should it be another way to VIEW decimals in forms/reports, I would give
>> a try. Is there any? Actually for reports we can set dp in the rml file,
>> but for forms?
> That's EXACTLY the point. That's why I said only "-1%" off your original
> proposal. Which means, I agree 98.9999999999% with you :)
>
lol

I got it ;) thank you!
b

Revision history for this message
Ferdinand (office-chricar) wrote :

I just had to solve the problem in webkit report

<%import locale%>
<%locale.setlocale(locale.LC_ALL, "de_DE.UTF-8") %>

and

${locale.format("%0.0f", prod_line.product_qty,True)}

did the trick (I didn't want decimals, but thousand separators)
and de_DE could be replaced by a variable

may be I miss something easier

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Dr Ferdinand,

For webkit report problem you have to post a another bug report and for mrp related issue this is the same as lp:884179 as per Bogdan specified.

Thanks.

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.