Skip to content

Commit

Permalink
12.0 nuovi dati ritenuta fe (OCA#1876)
Browse files Browse the repository at this point in the history
* [IMP] extend wt_types selection with new code and add tax_id for daticassa

* [IMP] use causale_pagamento for all withholding tax type

* [IMP] improve wizard_export_fatturapa with new 1.6 xml tack specific
  • Loading branch information
CiroBoxHub authored and TonyMasciI committed Jan 27, 2023
1 parent bad98ec commit f320a8e
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 28 deletions.
2 changes: 1 addition & 1 deletion l10n_it_withholding_tax/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
'name': 'Italian Withholding Tax',
'version': '12.0.1.2.0',
'version': '12.0.2.0.0',
'category': 'Account',
'author': 'Openforce, Odoo Italia Network, '
'Odoo Community Association (OCA)',
Expand Down
51 changes: 38 additions & 13 deletions l10n_it_withholding_tax/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,15 @@ msgid "Date Stop"
msgstr "Data fine"

#. module: l10n_it_withholding_tax
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_withholding_tax__use_daticassaprev_for_enasarco
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_withholding_tax__use_daticassaprev
msgid "DatiCassa export"
msgstr "Esportazione DatiCassa"

#. module: l10n_it_withholding_tax
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_withholding_tax__daticassprev_tax_id
msgid "Daticassprev Tax"
msgstr ""

#. module: l10n_it_withholding_tax
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_account_invoice_withholding_tax__display_name
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_withholding_tax__display_name
Expand All @@ -191,13 +196,18 @@ msgid "Enasarco tax"
msgstr "Contributo Enasarco"

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:80
#: selection:withholding.tax,wt_types:0
msgid "Enpam Tax"
msgstr ""

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:84
#, python-format
msgid "Error! Rates are required"
msgstr "Errore! Le aliquote sono obbligatorie"

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:149
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:153
#, python-format
msgid "Error! You cannot have 2 rates that overlap!"
msgstr "Errore, due aliquote non possono sovrapporsi."
Expand Down Expand Up @@ -238,6 +248,11 @@ msgstr ""
msgid "In type"
msgstr ""

#. module: l10n_it_withholding_tax
#: selection:withholding.tax,wt_types:0
msgid "Inps Tax"
msgstr ""

#. module: l10n_it_withholding_tax
#: model:ir.model,name:l10n_it_withholding_tax.model_account_invoice
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_account_invoice_withholding_tax__invoice_id
Expand Down Expand Up @@ -311,7 +326,7 @@ msgid "MISC"
msgstr "VARIE"

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:413
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:417
#, python-format
msgid "Move %s is reconciled (%s). You must unreconcile it first"
msgstr ""
Expand Down Expand Up @@ -339,6 +354,11 @@ msgstr "Netto a pagare"
msgid "Net to pay"
msgstr "Netto a pagare"

#. module: l10n_it_withholding_tax
#: selection:withholding.tax,wt_types:0
msgid "Other Tax"
msgstr ""

#. module: l10n_it_withholding_tax
#: selection:withholding.tax.statement,wt_type:0
msgid "Out"
Expand Down Expand Up @@ -419,13 +439,11 @@ msgid "Set to Due"
msgstr "Imposta a dovuto"

#. module: l10n_it_withholding_tax
#: model:ir.model.fields,help:l10n_it_withholding_tax.field_withholding_tax__use_daticassaprev_for_enasarco
#: model:ir.model.fields,help:l10n_it_withholding_tax.field_withholding_tax__use_daticassaprev
msgid ""
"Setting this, while exporting e-invoice XML, Enasarco data will be also "
"added to DatiCassaPrevidenziale"
"Setting this, while exporting e-invoice XML, data will be also added to "
"DatiCassaPrevidenziale"
msgstr ""
"Se impostato, i dati Enasarco verranno aggiunti a DatiCassaPrevidenziale "
"durante l'esportazione XML della e-fattura"

#. module: l10n_it_withholding_tax
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_withholding_tax_move__statement_id
Expand Down Expand Up @@ -510,13 +528,13 @@ msgid "W.T. Reg. on"
msgstr "RdA registrata il"

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:317
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:321
#, python-format
msgid "WT %s - %s"
msgstr "RdA %s - %s"

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:327
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:331
#, python-format
msgid "WT %s - %s - %s"
msgstr "RdA %s - %s - %s"
Expand Down Expand Up @@ -558,7 +576,7 @@ msgstr "Riconciliazione RdA"

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/account.py:160
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:429
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:433
#, python-format
msgid ""
"Warning! Only Withholding Tax moves in Due status can be "
Expand All @@ -568,7 +586,7 @@ msgstr ""
"pagare»"

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:313
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:317
#, python-format
msgid "Warning! Wt account move already exists: %s"
msgstr "Attenzione, movimento contabile RdA già esistente: %s"
Expand Down Expand Up @@ -666,6 +684,13 @@ msgstr "Registro ritenuta d'acconto"
msgid "Withholding tax type"
msgstr "Tipologia ritenuta d'acconto"

#~ msgid ""
#~ "Setting this, while exporting e-invoice XML, Enasarco data will be also "
#~ "added to DatiCassaPrevidenziale"
#~ msgstr ""
#~ "Se impostato, i dati Enasarco verranno aggiunti a DatiCassaPrevidenziale "
#~ "durante l'esportazione XML della e-fattura"

#~ msgid "Payments"
#~ msgstr "Pagamenti"

Expand Down
40 changes: 30 additions & 10 deletions l10n_it_withholding_tax/i18n/l10n_it_withholding_tax.pot
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,15 @@ msgid "Date Stop"
msgstr ""

#. module: l10n_it_withholding_tax
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_withholding_tax__use_daticassaprev_for_enasarco
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_withholding_tax__use_daticassaprev
msgid "DatiCassa export"
msgstr ""

#. module: l10n_it_withholding_tax
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_withholding_tax__daticassprev_tax_id
msgid "Daticassprev Tax"
msgstr ""

#. module: l10n_it_withholding_tax
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_account_invoice_withholding_tax__display_name
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_withholding_tax__display_name
Expand All @@ -183,13 +188,18 @@ msgid "Enasarco tax"
msgstr ""

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:80
#: selection:withholding.tax,wt_types:0
msgid "Enpam Tax"
msgstr ""

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:84
#, python-format
msgid "Error! Rates are required"
msgstr ""

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:149
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:153
#, python-format
msgid "Error! You cannot have 2 rates that overlap!"
msgstr ""
Expand Down Expand Up @@ -230,6 +240,11 @@ msgstr ""
msgid "In type"
msgstr ""

#. module: l10n_it_withholding_tax
#: selection:withholding.tax,wt_types:0
msgid "Inps Tax"
msgstr ""

#. module: l10n_it_withholding_tax
#: model:ir.model,name:l10n_it_withholding_tax.model_account_invoice
#: model:ir.model.fields,field_description:l10n_it_withholding_tax.field_account_invoice_withholding_tax__invoice_id
Expand Down Expand Up @@ -301,7 +316,7 @@ msgid "MISC"
msgstr ""

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:413
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:417
#, python-format
msgid "Move %s is reconciled (%s). You must unreconcile it first"
msgstr ""
Expand All @@ -326,6 +341,11 @@ msgstr ""
msgid "Net to pay"
msgstr ""

#. module: l10n_it_withholding_tax
#: selection:withholding.tax,wt_types:0
msgid "Other Tax"
msgstr ""

#. module: l10n_it_withholding_tax
#: selection:withholding.tax.statement,wt_type:0
msgid "Out"
Expand Down Expand Up @@ -406,8 +426,8 @@ msgid "Set to Due"
msgstr ""

#. module: l10n_it_withholding_tax
#: model:ir.model.fields,help:l10n_it_withholding_tax.field_withholding_tax__use_daticassaprev_for_enasarco
msgid "Setting this, while exporting e-invoice XML, Enasarco data will be also added to DatiCassaPrevidenziale"
#: model:ir.model.fields,help:l10n_it_withholding_tax.field_withholding_tax__use_daticassaprev
msgid "Setting this, while exporting e-invoice XML, data will be also added to DatiCassaPrevidenziale"
msgstr ""

#. module: l10n_it_withholding_tax
Expand Down Expand Up @@ -493,13 +513,13 @@ msgid "W.T. Reg. on"
msgstr ""

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:317
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:321
#, python-format
msgid "WT %s - %s"
msgstr ""

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:327
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:331
#, python-format
msgid "WT %s - %s - %s"
msgstr ""
Expand Down Expand Up @@ -541,13 +561,13 @@ msgstr ""

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/account.py:160
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:429
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:433
#, python-format
msgid "Warning! Only Withholding Tax moves in Due status can be deleted"
msgstr ""

#. module: l10n_it_withholding_tax
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:313
#: code:addons/l10n_it_withholding_tax/models/withholding_tax.py:317
#, python-format
msgid "Warning! Wt account move already exists: %s"
msgstr ""
Expand Down
10 changes: 7 additions & 3 deletions l10n_it_withholding_tax/models/withholding_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@ def _default_wt_journal(self):
wt_types = fields.Selection([
('enasarco', 'Enasarco tax'),
('ritenuta', 'Withholding tax'),
('inps', 'Inps Tax'),
('enpam', 'Enpam Tax'),
('other', 'Other Tax')
], 'Withholding tax type', required=True, default='ritenuta')
use_daticassaprev_for_enasarco = fields.Boolean(
"DatiCassa export",
use_daticassaprev = fields.Boolean(
"DatiCassa export", oldname='use_daticassaprev_for_enasarco',
help="Setting this, while exporting e-invoice XML, "
"Enasarco data will be also added to DatiCassaPrevidenziale"
"data will be also added to DatiCassaPrevidenziale"
)
daticassprev_tax_id = fields.Many2one('account.tax')

@api.one
@api.constrains('rate_ids')
Expand Down
3 changes: 2 additions & 1 deletion l10n_it_withholding_tax/views/withholding_tax.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
<field name="account_payable_id"/>
<field name="journal_id"/>
<field name="payment_term"/>
<field name="use_daticassaprev_for_enasarco" attrs="{'invisible': [('wt_types', '!=', 'enasarco')]}"/>
<field name="use_daticassaprev" attrs="{'invisible': [('wt_types', 'in', ('ritenuta', 'other'))]}"/>
<field name="daticassprev_tax_id" domain="[('amount', '=', 0.0)]" attrs="{'invisible': [('use_daticassaprev', '=', False)]}"/>
<field name="wt_types" widget='radio'/>
</group>
<group>
Expand Down

0 comments on commit f320a8e

Please sign in to comment.