Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3863 Zobrazení

I declared a new float:

some_weight = fields.Float('Some Weight', digits_compute=dp.get_precision('Stock Weight'), default=0.0,

                           help="The some weight in g.")

Import the dp:

import openerp.addons.decimal_precision as dp


In Odoo Decimal Accuracy menu I have change the digits from 2 -> 4. All standard Odoo Foat Field that use dp of 'Stock Weight' are showing 4 digits of decimal. But not my new declared fields. How to make my new declare fields follow the dp of 'Stock Weight' without forcing the digits value in xml. Thank you.

Avatar
Zrušit
Autor

Anybody know the answer?

Related Posts Odpovědi Zobrazení Aktivita
1
bře 15
3876
0
lis 24
994
1
čvc 21
11658
1
čvc 21
3127
0
led 21
2830