diff --git a/.travis.yml b/.travis.yml index 66673b17802..63a10db72f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ install: - pip install requests - git clone https://github.com/OCA/partner-contact ${HOME}/partner-contact -b ${VERSION} - git clone https://github.com/OCA/account-financial-tools ${HOME}/account-financial-tools -b ${VERSION} - - git clone https://github.com/OCA/reporting-engines ${HOME}/reporting-engines -b ${VERSION} + - git clone https://github.com/OCA/reporting-engine ${HOME}/reporting-engine -b ${VERSION} - git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} - travis_install_nightly diff --git a/l10n_es_aeat_mod347/__openerp__.py b/l10n_es_aeat_mod347/__openerp__.py index 030571e685d..ad27a0e071a 100644 --- a/l10n_es_aeat_mod347/__openerp__.py +++ b/l10n_es_aeat_mod347/__openerp__.py @@ -48,6 +48,7 @@ "security/mod_347_security.xml", "wizard/export_mod347_to_boe.xml", "views/account_period_view.xml", + "views/account_invoice_view.xml", "views/res_partner_view.xml", "views/mod347_view.xml", "report/mod347_report.xml", diff --git a/l10n_es_aeat_mod347/i18n/ca.po b/l10n_es_aeat_mod347/i18n/ca.po index 778ece70428..46d84959e00 100644 --- a/l10n_es_aeat_mod347/i18n/ca.po +++ b/l10n_es_aeat_mod347/i18n/ca.po @@ -920,6 +920,17 @@ msgstr "" msgid "Journal" msgstr "Diari" +#. module: l10n_es_aeat_mod347 +#: field:account.invoice,not_in_mod347:0 +#: field:res.partner,not_in_mod347:0 +msgid "Not included in 347 report" +msgstr "No inclosa en el model 347" + +#. module: l10n_es_aeat_mod347 +#: help:account.invoice,not_in_mod347:0 +msgid "If you mark this field, this invoice will not be included in any AEAT 347 model report." +msgstr "Si marca aquest camp, aquesta factura no s'inclourà als informes del model AEAT 347." + #~ msgid "Calculation" #~ msgstr "Càlcul" diff --git a/l10n_es_aeat_mod347/i18n/es.po b/l10n_es_aeat_mod347/i18n/es.po index ecc639f7ea0..ce8bda80388 100644 --- a/l10n_es_aeat_mod347/i18n/es.po +++ b/l10n_es_aeat_mod347/i18n/es.po @@ -931,7 +931,13 @@ msgid "Journal" msgstr "Diario" #. module: l10n_es_aeat_mod347 +#: field:account.invoice,not_in_mod347:0 #: field:res.partner,not_in_mod347:0 msgid "Not included in 347 report" msgstr "No incluida en el modelo 347" +#. module: l10n_es_aeat_mod347 +#: help:account.invoice,not_in_mod347:0 +msgid "If you mark this field, this invoice will not be included in any AEAT 347 model report." +msgstr "Si marca este campo, esta factura no se incluirá en los informes del modelo AEAT 347." + diff --git a/l10n_es_aeat_mod347/i18n/l10n_es_aeat_mod347.pot b/l10n_es_aeat_mod347/i18n/l10n_es_aeat_mod347.pot index f335a604208..d47687df038 100644 --- a/l10n_es_aeat_mod347/i18n/l10n_es_aeat_mod347.pot +++ b/l10n_es_aeat_mod347/i18n/l10n_es_aeat_mod347.pot @@ -876,7 +876,13 @@ msgid "Journal" msgstr "" #. module: l10n_es_aeat_mod347 +#: field:account.invoice,not_in_mod347:0 #: field:res.partner,not_in_mod347:0 msgid "Not included in 347 report" msgstr "" +#. module: l10n_es_aeat_mod347 +#: help:account.invoice,not_in_mod347:0 +msgid "If you mark this field, this invoice will not be included in any AEAT 347 model report." +msgstr "" + diff --git a/l10n_es_aeat_mod347/models/account_invoice.py b/l10n_es_aeat_mod347/models/account_invoice.py index 7da79787d00..23c10fdf7da 100644 --- a/l10n_es_aeat_mod347/models/account_invoice.py +++ b/l10n_es_aeat_mod347/models/account_invoice.py @@ -32,3 +32,7 @@ def _get_amount_total_wo_irpf(self): amount_total_wo_irpf = fields.Float( compute="_get_amount_total_wo_irpf", string="Total amount without IRPF taxes") + not_in_mod347 = fields.Boolean( + "Not included in 347 report", + help="If you mark this field, this invoice will not be included in " + "any AEAT 347 model report.", default=False) diff --git a/l10n_es_aeat_mod347/models/mod347.py b/l10n_es_aeat_mod347/models/mod347.py index bec8a1fc9a4..f600c67860e 100644 --- a/l10n_es_aeat_mod347/models/mod347.py +++ b/l10n_es_aeat_mod347/models/mod347.py @@ -64,12 +64,14 @@ def _calculate_partner_records(self, partners, periods): [('partner_id', 'child_of', partners.ids), ('type', '=', invoice_type), ('period_id', 'in', periods.ids), - ('state', 'not in', ['draft', 'cancel'])]) + ('state', 'not in', ['draft', 'cancel']), + ('not_in_mod347', '=', False)]) refunds = invoice_obj.search( [('partner_id', 'child_of', partners.ids), ('type', '=', refund_type), ('period_id', 'in', periods.ids), - ('state', 'not in', ['draft', 'cancel'])]) + ('state', 'not in', ['draft', 'cancel']), + ('not_in_mod347', '=', False)]) # Calculate the invoiced amount # Remove IRPF tax for invoice amount invoice_amount = sum(x.amount_total_wo_irpf for x in invoices) diff --git a/l10n_es_aeat_mod347/views/account_invoice_view.xml b/l10n_es_aeat_mod347/views/account_invoice_view.xml new file mode 100644 index 00000000000..b4b67bd5c02 --- /dev/null +++ b/l10n_es_aeat_mod347/views/account_invoice_view.xml @@ -0,0 +1,28 @@ + + + + + + account.invoice.supplier.form.mod347 + account.invoice + + + + + + + + + + account.invoice.form.mod347 + account.invoice + + + + + + + + + +