Skip to content

Commit

Permalink
[IMP] l10n_it_invoices_data_communication_fatturapa: black, isort, pr…
Browse files Browse the repository at this point in the history
…ettier
  • Loading branch information
eLBati committed Jun 28, 2021
1 parent 6d09f11 commit a9827e2
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 29 deletions.
1 change: 0 additions & 1 deletion l10n_it_invoices_data_communication_fatturapa/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

from . import models
34 changes: 15 additions & 19 deletions l10n_it_invoices_data_communication_fatturapa/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
'name': 'ITA - Comunicazione dati fatture - '
'Integrazione e-fattura',
'summary': 'Integrazione fatturazione elettronica e comunicazione dati '
'fatture (c.d. "nuovo spesometro")',
'version': '12.0.1.0.2',
'category': 'Hidden',
'author': "Agile Business Group, "
"Odoo Community Association (OCA)",
'website': 'https://github.com/OCA/l10n-italy/',
'license': 'AGPL-3',
'depends': [
'l10n_it_invoices_data_communication',
'l10n_it_fatturapa_in',
'l10n_it_fatturapa_out',
"name": "ITA - Comunicazione dati fatture - " "Integrazione e-fattura",
"summary": "Integrazione fatturazione elettronica e comunicazione dati "
'fatture (c.d. "nuovo spesometro")',
"version": "12.0.1.0.2",
"category": "Hidden",
"author": "Agile Business Group, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy",
"license": "AGPL-3",
"depends": [
"l10n_it_invoices_data_communication",
"l10n_it_fatturapa_in",
"l10n_it_fatturapa_out",
],
'data': [
'views/communication_view.xml'
],
'installable': True,
'auto_install': True,
"data": ["views/communication_view.xml"],
"installable": True,
"auto_install": True,
}
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

from . import communication
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@

from odoo import models, fields
from odoo import fields, models


class Communication(models.Model):
_inherit = 'comunicazione.dati.iva'
_inherit = "comunicazione.dati.iva"
exclude_e_invoices = fields.Boolean("Exclude e-invoices", default=True)

def _get_fatture_emesse_domain(self):
domain = super(Communication, self)._get_fatture_emesse_domain()
if self.exclude_e_invoices:
domain.append(('fatturapa_attachment_out_id', '=', False))
domain.append(("fatturapa_attachment_out_id", "=", False))
return domain

def _get_fatture_ricevute_domain(self):
domain = super(Communication, self)._get_fatture_ricevute_domain()
if self.exclude_e_invoices:
domain.append(('fatturapa_attachment_in_id', '=', False))
domain.append(("fatturapa_attachment_in_id", "=", False))
return domain
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<record id="view_communication_form_exclude_e_inv" model="ir.ui.view">
<field name="name">view_communication_form_exclude_e_inv</field>
<field name="model">comunicazione.dati.iva</field>
<field name="inherit_id" ref="l10n_it_invoices_data_communication.view_comunicazione_dati_iva_form"/>
<field
name="inherit_id"
ref="l10n_it_invoices_data_communication.view_comunicazione_dati_iva_form"
/>
<field name="arch" type="xml">
<field name="id_comunicazione" position="after">
<field name="exclude_e_invoices"/>
<field name="exclude_e_invoices" />
</field>
</field>
</record>
Expand Down
6 changes: 6 additions & 0 deletions setup/l10n_it_invoices_data_communication_fatturapa/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit a9827e2

Please sign in to comment.