File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 33
44{
55 "name" : "Display Decimal Precision" ,
6- "version" : "15 .0.0.0.1" ,
7- "depends" : ["base " ],
6+ "version" : "14 .0.0.0.1" ,
7+ "depends" : ["web " ],
88 "author" : "Smile" ,
99 "license" : 'AGPL-3' ,
1010 "description" : """
Original file line number Diff line number Diff line change @@ -15,10 +15,11 @@ class ResCurrency(models.Model):
1515
1616 @api .depends ('rounding' , 'display_rounding' )
1717 def _get_display_decimal_places (self ):
18- if not self .display_rounding :
19- self .display_decimal_places = self .decimal_places
20- elif 0 < self .display_rounding < 1 :
21- self .display_decimal_places = \
22- int (math .ceil (math .log10 (1 / self .display_rounding )))
23- else :
24- self .display_decimal_places = 0
18+ for currency in self :
19+ if not currency .display_rounding :
20+ currency .display_decimal_places = currency .decimal_places
21+ elif 0 < currency .display_rounding < 1 :
22+ currency .display_decimal_places = \
23+ int (math .ceil (math .log10 (1 / currency .display_rounding )))
24+ else :
25+ currency .display_decimal_places = 0
You can’t perform that action at this time.
0 commit comments