From fbdb3a638b6495a2c1b423d86aea956df03025c3 Mon Sep 17 00:00:00 2001 From: Simone Rubino Date: Fri, 4 Jan 2019 14:45:29 +0100 Subject: [PATCH] [FIX] l10n_it_fatturapa_out_stamp: Bollo precision must be 2 (#774) --- l10n_it_fatturapa_out_stamp/__manifest__.py | 2 +- .../wizard/wizard_export_fatturapa.py | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/l10n_it_fatturapa_out_stamp/__manifest__.py b/l10n_it_fatturapa_out_stamp/__manifest__.py index 40641039c9ea..f238107b9fb3 100644 --- a/l10n_it_fatturapa_out_stamp/__manifest__.py +++ b/l10n_it_fatturapa_out_stamp/__manifest__.py @@ -5,7 +5,7 @@ "name": "Italian Localization - Fattura elettronica - Integrazione bollo", "summary": "Modulo ponte tra emissione fatture elettroniche e imposta di " "bollo", - "version": "12.0.1.0.0", + "version": "12.0.1.0.1", "development_status": "Beta", "category": "Hidden", "website": "https://github.com/OCA/l10n-italy", diff --git a/l10n_it_fatturapa_out_stamp/wizard/wizard_export_fatturapa.py b/l10n_it_fatturapa_out_stamp/wizard/wizard_export_fatturapa.py index 42dc7b5d01f9..bc69ea82a77d 100644 --- a/l10n_it_fatturapa_out_stamp/wizard/wizard_export_fatturapa.py +++ b/l10n_it_fatturapa_out_stamp/wizard/wizard_export_fatturapa.py @@ -16,18 +16,13 @@ def setDatiGeneraliDocumento(self, invoice, body): res = super(WizardExportFatturapa, self).setDatiGeneraliDocumento( invoice, body) if invoice.tax_stamp: - price_precision = self.env['decimal.precision'].precision_get( - 'Product Price') - if price_precision < 2: - price_precision = 2 if not invoice.company_id.tax_stamp_product_id: raise UserError(_( "Tax Stamp Product not set for company %s" ) % invoice.company_id.name) + stamp_price = invoice.company_id.tax_stamp_product_id.list_price body.DatiGenerali.DatiGeneraliDocumento.DatiBollo = DatiBolloType( BolloVirtuale="SI", - ImportoBollo=('%.' + str( - price_precision - ) + 'f') % invoice.company_id.tax_stamp_product_id.list_price, + ImportoBollo='%.2f' % stamp_price, ) return res