openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #08252
Re: [Bug 942647] Re: How to extend an osv.osv_memory class?
*** This bug is a duplicate of bug 917931 ***
https://bugs.launchpad.net/bugs/917931
I posted this bug a long long time ago. Honestly thought it was fixed, but
the workaround I used was easy enough. Just use digits(16,5) or whatever
instead of the decimal precision function. If you want to get especially
anal about it, use get precision outside the field definition to return the
precision and set the digits tuple as a constant and use digits=PRECISION
for example. I can confirm that this workaround works absolutely fine.
On Wed, Feb 29, 2012 at 2:51 PM, hbto [Vauxoo] http://www.vauxoo.com <
humbertoarocha@xxxxxxxxx> wrote:
> *** This bug is a duplicate of bug 917931 ***
> https://bugs.launchpad.net/bugs/917931
>
> There is even patch for that same issue posted by some of our allies,
>
> And it was marked with won't Fix,
>
> I hope not to be pointing to the wrong target
>
> Regards.
>
>
> Hbto
>
> --
> You received this bug notification because you are subscribed to OpenERP
> Server.
> https://bugs.launchpad.net/bugs/942647
>
> Title:
> How to extend an osv.osv_memory class?
>
> Status in OpenERP Server:
> Invalid
>
> Bug description:
> We are usign OpenERP Version 6.0.3.
>
> The Problem:
> We tried to extend from the class 'stock.move.memory.out' to set the
> decimal precision on the field "cost". This field appears in the wizard
> when you accept the delivery.
>
> How to get to this wizard:
> - create purchase order and proceed to the end of it
> - then open "Receptions" for this purchase order
> - open the reception
> - in the receptions press "Process"
> - now you get a wizard where you can see the field "cost"
>
> Here we would like to have a decimal precision of 4 digits. So we
> tried to overwrite the class as follow:
>
> class stock_partial_move_memory_in_extended(osv.osv_memory):
> _inherit = 'stock.move.memory.in'
> _columns = {
> 'cost' : fields.float("Cost", help="Unit Cost for this product
> line", digits_compute=dp.get_precision('Purchase Price')),
> }
>
> stock_partial_move_memory_in_extended()
>
> But this does not work, we still have a float with decimal precision
> of 2.
>
> Could you please fix this bug and tell us what the changes are? How can
> you overwrite a field in an osv.osv_memory class?
> Thanks.
>
> Best regards,
> Olivier Jossen
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-server/+bug/942647/+subscriptions
>
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/942647
Title:
How to extend an osv.osv_memory class?
Status in OpenERP Server:
Invalid
Bug description:
We are usign OpenERP Version 6.0.3.
The Problem:
We tried to extend from the class 'stock.move.memory.out' to set the decimal precision on the field "cost". This field appears in the wizard when you accept the delivery.
How to get to this wizard:
- create purchase order and proceed to the end of it
- then open "Receptions" for this purchase order
- open the reception
- in the receptions press "Process"
- now you get a wizard where you can see the field "cost"
Here we would like to have a decimal precision of 4 digits. So we
tried to overwrite the class as follow:
class stock_partial_move_memory_in_extended(osv.osv_memory):
_inherit = 'stock.move.memory.in'
_columns = {
'cost' : fields.float("Cost", help="Unit Cost for this product line", digits_compute=dp.get_precision('Purchase Price')),
}
stock_partial_move_memory_in_extended()
But this does not work, we still have a float with decimal precision
of 2.
Could you please fix this bug and tell us what the changes are? How can you overwrite a field in an osv.osv_memory class?
Thanks.
Best regards,
Olivier Jossen
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/942647/+subscriptions
Follow ups
References