Skip to content

Commit c8cbdca

Browse files
committed
[FIX] intrastat_product: Convert fields to Float so as not to lose decimal places
Related to OCA/l10n-spain#4901 TT61473
1 parent a504eda commit c8cbdca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

intrastat_product/models/intrastat_product_declaration.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ def default_get(self, fields_list):
133133
store=True,
134134
tracking=True,
135135
)
136-
total_amount = fields.Integer(
136+
total_amount = fields.Float(
137137
compute="_compute_numbers",
138138
string="Total Fiscal Amount",
139+
digits="Account",
139140
store=True,
140141
help="Total fiscal amount in company currency of the declaration.",
141142
)
@@ -1314,12 +1315,13 @@ class IntrastatProductDeclarationLine(models.Model):
13141315
string="Suppl. Unit",
13151316
help="Intrastat Supplementary Unit",
13161317
)
1317-
weight = fields.Integer(help="Net weight in Kg")
1318+
weight = fields.Float(digits="Stock Weight", help="Net weight in Kg")
13181319
suppl_unit_qty = fields.Integer(
13191320
string="Suppl. Unit Qty", help="Supplementary Units Quantity"
13201321
)
1321-
amount_company_currency = fields.Integer(
1322+
amount_company_currency = fields.Float(
13221323
string="Fiscal Value",
1324+
digits="Account",
13231325
help="Amount in company currency to write in the declaration. "
13241326
"Amount in company currency = amount in invoice currency "
13251327
"converted to company currency with the rate of the invoice date.",

0 commit comments

Comments
 (0)