Skip to Content
Menu
This question has been flagged
2 Replies
5621 Views

Field% = field 1÷ field 2

eg = 120 ÷ 70000 = 0.00171

In my case, currently, I set the decimal padding is equal to two. therefore field % will show as 0.00

Then the issue is that I have another field that is dependent on field % as below.

Field 3 = Amount * field % it will display as 0.00

Then the whole amount = 0.00

How can I solve the issue without changing the decimal padding in the whole accounting module?

please anyone help me to sort this issue. using odoo 8.0

thanks in advance.


Avatar
Discard
Best Answer

Try this one, I hope this code can help you. Digits will tell on how many numbers can be acquired ("12") and then number of decimal displays ("5").

field_name= fields.Float(string="String Name",  required=False, digits=(12, 5))
Avatar
Discard
Best Answer

Hi Remya,

You can create separate decimal precision and assign it to that field.

Thanks,

Avatar
Discard
Related Posts Replies Views Activity
0
Apr 24
399
4
Nov 23
4246
0
Oct 23
378
0
Dec 22
1334
2
Dec 23
17351