From f1f1afb60f6b618e8e6e68cf7daf77f640b5bc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 6 Jan 2015 23:30:09 +0100 Subject: [PATCH] Use price_digits issue4438 review6791002 --- invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 6b87ac7755..a7b838b74f 100644 --- a/invoice.py +++ b/invoice.py @@ -22,6 +22,7 @@ from trytond.pool import Pool from trytond.rpc import RPC from trytond.modules.account.tax import TaxableMixin +from trytond.modules.product import price_digits __all__ = ['Invoice', 'InvoicePaymentLine', 'InvoiceLine', 'InvoiceLineTax', 'InvoiceTax', @@ -1441,7 +1442,7 @@ class InvoiceLine(ModelSQL, ModelView, TaxableMixin): 'required': Eval('type') == 'line', }, depends=['type', 'invoice_type', 'company']) - unit_price = fields.Numeric('Unit Price', digits=(16, 4), + unit_price = fields.Numeric('Unit Price', digits=price_digits, states={ 'invisible': Eval('type') != 'line', 'required': Eval('type') == 'line',