From 81f16bc2d57e87d7e58570196d276aded6312472 Mon Sep 17 00:00:00 2001 From: cubells Date: Sat, 11 Apr 2015 00:01:27 +0200 Subject: [PATCH 01/10] [IMP] Mejora para poder eliminar facturas selectivamente del modelo 347 --- l10n_es_aeat_mod347/__openerp__.py | 1 + l10n_es_aeat_mod347/i18n/ca.po | 11 ++++++++ l10n_es_aeat_mod347/i18n/es.po | 6 ++++ .../i18n/l10n_es_aeat_mod347.pot | 6 ++++ l10n_es_aeat_mod347/models/account_invoice.py | 4 +++ l10n_es_aeat_mod347/models/mod347.py | 6 ++-- .../views/account_invoice_view.xml | 28 +++++++++++++++++++ 7 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 l10n_es_aeat_mod347/views/account_invoice_view.xml 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..7cf49eea552 --- /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 + + + + + + + + + + \ No newline at end of file From 64740154eba64ab4d8928645b869aef041e6e2c6 Mon Sep 17 00:00:00 2001 From: cubells Date: Sat, 11 Apr 2015 07:26:22 +0200 Subject: [PATCH 02/10] [IMP] Mejora para poder eliminar facturas selectivamente del modelo 347 --- l10n_es_aeat_mod347/views/account_invoice_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n_es_aeat_mod347/views/account_invoice_view.xml b/l10n_es_aeat_mod347/views/account_invoice_view.xml index 7cf49eea552..b4b67bd5c02 100644 --- a/l10n_es_aeat_mod347/views/account_invoice_view.xml +++ b/l10n_es_aeat_mod347/views/account_invoice_view.xml @@ -25,4 +25,4 @@ - \ No newline at end of file + From 51f4d0ca209feb6b3a8b9ccc8d2e50a8ede1d8e5 Mon Sep 17 00:00:00 2001 From: cubells Date: Sat, 11 Apr 2015 09:48:26 +0200 Subject: [PATCH 03/10] [IMP] Mejora para poder eliminar facturas selectivamente del modelo 347 --- l10n_es_aeat_mod347/__openerp__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/l10n_es_aeat_mod347/__openerp__.py b/l10n_es_aeat_mod347/__openerp__.py index ad27a0e071a..5322779c967 100644 --- a/l10n_es_aeat_mod347/__openerp__.py +++ b/l10n_es_aeat_mod347/__openerp__.py @@ -42,6 +42,7 @@ "base_vat", "l10n_es_aeat", "account_invoice_currency", + "account", ], 'data': [ "security/ir.model.access.csv", From 14d22596b825b9f2ba0b9fab185ec2b1e4bba678 Mon Sep 17 00:00:00 2001 From: cubells Date: Sat, 11 Apr 2015 20:15:11 +0200 Subject: [PATCH 04/10] [IMP] Mejora para poder eliminar facturas selectivamente del modelo 347 --- l10n_es_aeat_mod347/views/account_invoice_view.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/l10n_es_aeat_mod347/views/account_invoice_view.xml b/l10n_es_aeat_mod347/views/account_invoice_view.xml index b4b67bd5c02..da44012e103 100644 --- a/l10n_es_aeat_mod347/views/account_invoice_view.xml +++ b/l10n_es_aeat_mod347/views/account_invoice_view.xml @@ -7,9 +7,9 @@ account.invoice - + - + @@ -18,9 +18,9 @@ account.invoice - + - + From 656b2728991020833b867a6684c0f176b29d3ce3 Mon Sep 17 00:00:00 2001 From: cubells Date: Sat, 11 Apr 2015 22:10:54 +0200 Subject: [PATCH 05/10] [FIX] Error al realizar los tests de travis (timeout error) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From d4a2fb5756107c7d080cfb2978de6b6fb7e791d0 Mon Sep 17 00:00:00 2001 From: cubells Date: Sat, 11 Apr 2015 22:29:47 +0200 Subject: [PATCH 06/10] [FIX] Error al realizar los tests de travis (timeout error) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 63a10db72f2..66673b17802 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-engine ${HOME}/reporting-engine -b ${VERSION} + - git clone https://github.com/OCA/reporting-engines ${HOME}/reporting-engines -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 From 678301541ea3e2e776e0bcd5944a7f9af64ae117 Mon Sep 17 00:00:00 2001 From: cubells Date: Sat, 11 Apr 2015 22:39:41 +0200 Subject: [PATCH 07/10] [IMP] Mejora para poder eliminar facturas selectivamente del modelo 347 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 66673b17802..9f2231d8839 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,6 @@ install: - pip install unicodecsv - 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/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} From 9235a6a2d5901f203d86c9d567a5988cf23df113 Mon Sep 17 00:00:00 2001 From: cubells Date: Sat, 11 Apr 2015 22:45:53 +0200 Subject: [PATCH 08/10] [IMP] Mejora para poder eliminar facturas selectivamente del modelo 347 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 9f2231d8839..66673b17802 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ install: - pip install unicodecsv - 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/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} From 16684ec278d3ba7518b32f79464278fd7170adb7 Mon Sep 17 00:00:00 2001 From: cubells Date: Sun, 12 Apr 2015 10:40:30 +0200 Subject: [PATCH 09/10] [IMP] Mejora para poder eliminar facturas selectivamente del modelo 347 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 66673b17802..3e9e69eae36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ install: - travis_install_nightly script: - - travis_run_tests + - travis_wait travis_run_tests after_success: coveralls From 56c5c088fd9eaf847f7b95ae60110180c0f93a57 Mon Sep 17 00:00:00 2001 From: cubells Date: Sun, 12 Apr 2015 10:50:53 +0200 Subject: [PATCH 10/10] [IMP] Mejora para poder eliminar facturas selectivamente del modelo 347 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3e9e69eae36..66673b17802 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ install: - travis_install_nightly script: - - travis_wait travis_run_tests + - travis_run_tests after_success: coveralls