Skip to content

Commit

Permalink
Merge 8993ba3 into e44f493
Browse files Browse the repository at this point in the history
  • Loading branch information
cubells committed Apr 12, 2015
2 parents e44f493 + 8993ba3 commit c6b397c
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions l10n_es_aeat_mod347/__openerp__.py
Expand Up @@ -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",
Expand Down
11 changes: 11 additions & 0 deletions l10n_es_aeat_mod347/i18n/ca.po
Expand Up @@ -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"

Expand Down
6 changes: 6 additions & 0 deletions l10n_es_aeat_mod347/i18n/es.po
Expand Up @@ -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."

6 changes: 6 additions & 0 deletions l10n_es_aeat_mod347/i18n/l10n_es_aeat_mod347.pot
Expand Up @@ -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 ""

4 changes: 4 additions & 0 deletions l10n_es_aeat_mod347/models/account_invoice.py
Expand Up @@ -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)
6 changes: 4 additions & 2 deletions l10n_es_aeat_mod347/models/mod347.py
Expand Up @@ -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)
Expand Down
28 changes: 28 additions & 0 deletions l10n_es_aeat_mod347/views/account_invoice_view.xml
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<record id="invoice_supplier_form_mod347" model="ir.ui.view">
<field name="name">account.invoice.supplier.form.mod347</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<field name="payment_term" options="{'no_create': True}" position="after">
<field name="not_in_mod347"/>
</field>
</field>
</record>

<record id="invoice_form_mod347" model="ir.ui.view">
<field name="name">account.invoice.form.mod347</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<field name="date_due" position="after">
<field name="not_in_mod347"/>
</field>
</field>
</record>

</data>
</openerp>

0 comments on commit c6b397c

Please sign in to comment.