Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3871 Visualizzazioni

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
Abbandona
Autore

Anybody know the answer?

Post correlati Risposte Visualizzazioni Attività
1
mar 15
3878
0
nov 24
1007
1
lug 21
11661
1
lug 21
3139
0
gen 21
2831