跳至內容
選單
此問題已被標幟
3876 瀏覽次數

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.

頭像
捨棄
作者

Anybody know the answer?

相關帖文 回覆 瀏覽次數 活動
1
3月 15
3887
0
11月 24
1018
1
7月 21
11662
1
7月 21
3145
0
1月 21
2835