Skip to content

Commit

Permalink
l10n_it_ipa ADD is_pa bool field
Browse files Browse the repository at this point in the history
ADD PECDestinatario, CodiceDestinatario , FormatoTrasmissione handling
ADD Lotto di fatture verso soggetto privato
ADD gestione prodotti nelle fatture passive
ADD l10n_it_fatturapa_in_purchase
ADD einvoice.line model
IMP form fatture
ADD Livello di dettaglio Fatture elettroniche
ADD PDF preview dell'XML
ADD Link to existing supplier invoice
  • Loading branch information
eLBati committed Sep 14, 2018
1 parent cb063e9 commit 4dd9124
Show file tree
Hide file tree
Showing 53 changed files with 4,470 additions and 326 deletions.
2 changes: 1 addition & 1 deletion l10n_it_account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{
'name': 'Italian Localization - Account',
'version': '10.0.1.2.2',
'version': '10.0.1.2.3',
'category': 'Hidden',
'author': "Agile Business Group, Abstract, "
"Odoo Community Association (OCA)",
Expand Down
10 changes: 10 additions & 0 deletions l10n_it_account/models/account_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ class AccountTax(models.Model):
'account.tax', 'account_tax_filiation_rel', 'child_tax', 'parent_tax',
string='Parent Taxes')

def _get_tax_amount(self):
self.ensure_one()
res = 0.0
if self.amount_type == 'group':
for child in self.children_tax_ids:
res += child.amount
else:
res = self.amount
return res

def _get_tax_name(self):
self.ensure_one()
name = self.name
Expand Down
1 change: 1 addition & 0 deletions l10n_it_fatturapa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@

from . import models
from . import bindings
from . import controllers
2 changes: 1 addition & 1 deletion l10n_it_fatturapa/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'website': 'https://odoo-community.org',
'license': 'LGPL-3',
"depends": [
'account',
'l10n_it_account',
'l10n_it_fiscalcode',
'document',
'l10n_it_ipa',
Expand Down
3 changes: 3 additions & 0 deletions l10n_it_fatturapa/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-

from . import main
19 changes: 19 additions & 0 deletions l10n_it_fatturapa/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-

from odoo.http import Controller, route, request


class FatturaElettronicaController(Controller):

#------------------------------------------------------
# Report controllers
#------------------------------------------------------
@route([
'/fatturapa/preview/<attachment_id>',
], type='http', auth='user', website=True)
def pdf_preview(self, attachment_id, **data):
attach = request.env['ir.attachment'].browse(int(attachment_id))
html = attach.get_fattura_elettronica_preview()
pdf = request.env['report']._run_wkhtmltopdf([], [], [[False, html]], None, None)
pdfhttpheaders = [('Content-Type', 'application/pdf'), ('Content-Length', len(pdf))]
return request.make_response(pdf, headers=pdfhttpheaders)
Loading

0 comments on commit 4dd9124

Please sign in to comment.