Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][FIX] l10n_it_fatturapa_out_stamp: Bollo precision must be 2 (#774) #779

Merged
merged 1 commit into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_out_stamp/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 2 additions & 7 deletions l10n_it_fatturapa_out_stamp/wizard/wizard_export_fatturapa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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