From af67aa03feb02274391226daccc685d04f47b4a5 Mon Sep 17 00:00:00 2001 From: alessandrocamilli Date: Wed, 14 Dec 2016 19:39:00 +0100 Subject: [PATCH 01/20] WT move and account move creation from reconcile [FIX] 10.0 api compat First beta Travis check Ref name [FIX] Compute WT only if the invoice has wt lines Added feature to unreconcile the wt move created by payment, and after it possible to re-reconcile --- l10n_it_withholding_tax_payment/__init__.py | 5 + .../__manifest__.py | 23 ++ .../data/sequence.xml | 14 + l10n_it_withholding_tax_payment/i18n/it.po | 249 ++++++++++++++++++ .../models/__init__.py | 6 + .../models/withholding_tax.py | 159 +++++++++++ .../security/ir.model.access.csv | 4 + .../views/withholding_tax.xml | 102 +++++++ .../wizard/__init__.py | 6 + .../wizard/create_move_payment.py | 30 +++ .../wizard/create_move_payment_view.xml | 40 +++ l10n_it_withholding_tax_payment/workflow.xml | 48 ++++ 12 files changed, 686 insertions(+) create mode 100644 l10n_it_withholding_tax_payment/__init__.py create mode 100644 l10n_it_withholding_tax_payment/__manifest__.py create mode 100644 l10n_it_withholding_tax_payment/data/sequence.xml create mode 100644 l10n_it_withholding_tax_payment/i18n/it.po create mode 100644 l10n_it_withholding_tax_payment/models/__init__.py create mode 100644 l10n_it_withholding_tax_payment/models/withholding_tax.py create mode 100644 l10n_it_withholding_tax_payment/security/ir.model.access.csv create mode 100644 l10n_it_withholding_tax_payment/views/withholding_tax.xml create mode 100644 l10n_it_withholding_tax_payment/wizard/__init__.py create mode 100644 l10n_it_withholding_tax_payment/wizard/create_move_payment.py create mode 100644 l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml create mode 100644 l10n_it_withholding_tax_payment/workflow.xml diff --git a/l10n_it_withholding_tax_payment/__init__.py b/l10n_it_withholding_tax_payment/__init__.py new file mode 100644 index 000000000000..eea7f1a56c73 --- /dev/null +++ b/l10n_it_withholding_tax_payment/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Copyright © 2015 Alessandro Camilli () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models, wizard diff --git a/l10n_it_withholding_tax_payment/__manifest__.py b/l10n_it_withholding_tax_payment/__manifest__.py new file mode 100644 index 000000000000..49c57e65ffaa --- /dev/null +++ b/l10n_it_withholding_tax_payment/__manifest__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Copyright © 2015 Alessandro Camilli () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + 'name': 'Italian Withholding Tax Payment', + 'version': '10.0.1.0.0', + 'category': 'Account', + 'author': 'Openforce, Odoo Italia Network, ' + 'Odoo Community Association (OCA)', + 'website': 'https://odoo-community.org/', + 'license': 'AGPL-3', + "depends": ['account'], + "data": [ + 'views/withholding_tax.xml', + 'workflow.xml', + 'security/ir.model.access.csv', + 'data/sequence.xml', + 'wizard/create_move_payment_view.xml', + ], + "active": False, + "installable": True +} diff --git a/l10n_it_withholding_tax_payment/data/sequence.xml b/l10n_it_withholding_tax_payment/data/sequence.xml new file mode 100644 index 000000000000..2f0c8c10c8c0 --- /dev/null +++ b/l10n_it_withholding_tax_payment/data/sequence.xml @@ -0,0 +1,14 @@ + + + + + + Withholding Tax Move Payment Number + withholding.tax.move.payment + + WTMP/ + + + + + \ No newline at end of file diff --git a/l10n_it_withholding_tax_payment/i18n/it.po b/l10n_it_withholding_tax_payment/i18n/it.po new file mode 100644 index 000000000000..a5fe7ca267fa --- /dev/null +++ b/l10n_it_withholding_tax_payment/i18n/it.po @@ -0,0 +1,249 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_it_withholding_tax_payment +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-15 10:35+0000\n" +"PO-Revision-Date: 2016-12-15 10:35+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_account_id +#. module: l10n_it_withholding_tax_payment +msgid "Account" +msgstr "Conto" + +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.view_withholding_move_payment_form +#. module: l10n_it_withholding_tax_payment +msgid "Account Setting" +msgstr "Impostazioni Contabili" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_move_id +#. module: l10n_it_withholding_tax_payment +msgid "Account move" +msgstr "Registrazione Contabile" + +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.wizard_wt_move_payment_create_view +#. module: l10n_it_withholding_tax_payment +msgid "Cancel" +msgstr "Annulla" + +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.view_withholding_move_payment_form +#. module: l10n_it_withholding_tax_payment +msgid "Confirm" +msgstr "Conferma" + +#: selection:withholding.tax.move.payment,state:0 +#. module: l10n_it_withholding_tax_payment +msgid "Confirmed" +msgstr "Confermata" + +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.view_withholding_move_payment_form +#. module: l10n_it_withholding_tax_payment +msgid "Create Account Move" +msgstr "Crea Registrazione" + +#: model:ir.actions.act_window,name:l10n_it_withholding_tax_payment.wizard_wt_move_payment_create_action +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.wizard_wt_move_payment_create_view +#. module: l10n_it_withholding_tax_payment +msgid "Create Move Payment" +msgstr "Crea Versamento" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_create_uid +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_wizard_wt_move_payment_create_create_uid +#. module: l10n_it_withholding_tax_payment +msgid "Created by" +msgstr "Creato da" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_create_date +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_wizard_wt_move_payment_create_create_date +#. module: l10n_it_withholding_tax_payment +msgid "Created on" +msgstr "Creato il" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_date +#. module: l10n_it_withholding_tax_payment +msgid "Date" +msgstr "Data" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_date_payment +#. module: l10n_it_withholding_tax_payment +msgid "Date Payment" +msgstr "Data Versamento" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_date_start +#. module: l10n_it_withholding_tax_payment +msgid "Date Start" +msgstr "Data inizio" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_date_stop +#. module: l10n_it_withholding_tax_payment +msgid "Date Stop" +msgstr "Data fine" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_display_name +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_wizard_wt_move_payment_create_display_name +#. module: l10n_it_withholding_tax_payment +msgid "Display Name" +msgstr "Nome Visualizzato" + +#: selection:withholding.tax.move.payment,state:0 +#. module: l10n_it_withholding_tax_payment +msgid "Draft" +msgstr "Bozza" + +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.wizard_wt_move_payment_create_view +#. module: l10n_it_withholding_tax_payment +msgid "Generate" +msgstr "Genera" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_id +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_wizard_wt_move_payment_create_id +#. module: l10n_it_withholding_tax_payment +msgid "ID" +msgstr "ID" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_journal_id +#. module: l10n_it_withholding_tax_payment +msgid "Journal" +msgstr "Sezionale" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment___last_update +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_wizard_wt_move_payment_create___last_update +#. module: l10n_it_withholding_tax_payment +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_write_uid +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_wizard_wt_move_payment_create_write_uid +#. module: l10n_it_withholding_tax_payment +msgid "Last Updated by" +msgstr "Ultima modifica di" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_write_date +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_wizard_wt_move_payment_create_write_date +#. module: l10n_it_withholding_tax_payment +msgid "Last Updated on" +msgstr "Ultima modifica il" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_line_ids +#. module: l10n_it_withholding_tax_payment +msgid "Lines" +msgstr "Righe" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_wt_move_payment_id +#. module: l10n_it_withholding_tax_payment +msgid "Move Payment" +msgstr "Versamento Ritenuta" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_name +#. module: l10n_it_withholding_tax_payment +msgid "Name" +msgstr "Nome" + +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.view_withholding_move_payment_form +#. module: l10n_it_withholding_tax_payment +msgid "Period" +msgstr "Periodo" + +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.view_withholding_move_payment_form +#. module: l10n_it_withholding_tax_payment +msgid "Set to Draft" +msgstr "Imposta a Bozza" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_state +#. module: l10n_it_withholding_tax_payment +msgid "Status" +msgstr "Stato" + +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.view_withholding_move_payment_form +#. module: l10n_it_withholding_tax_payment +msgid "Tot" +msgstr "Tot" + +#: model:ir.ui.menu,name:l10n_it_withholding_tax_payment.menu_withholding_tax_move_payment +#. module: l10n_it_withholding_tax_payment +msgid "WT Move Payments" +msgstr "Versamenti Ritenuta" + +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.wizard_wt_move_payment_create_view +#. module: l10n_it_withholding_tax_payment +msgid "WT Moves" +msgstr "Voci Ritenuta" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment_amount +#. module: l10n_it_withholding_tax_payment +msgid "WT amount" +msgstr "Importo Ritenuta" + +#: model:ir.model,name:l10n_it_withholding_tax_payment.model_wizard_wt_move_payment_create +#. module: l10n_it_withholding_tax_payment +msgid "WT wizard create move payment" +msgstr "WT wizard create move payment" + +#: code:addons/l10n_it_withholding_tax_payment/models/withholding_tax.py:55 +#. module: l10n_it_withholding_tax_payment +#, python-format +msgid "Warning! Datas required for account move creation: Date payment, journal, account" +msgstr "Attenzione! Per la creazione della registrazione sono richiesti:" +"Data pagamento, sezionale, conto" + +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.view_withholding_move_payment_form +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.view_withholding_move_payment_tree +#. module: l10n_it_withholding_tax_payment +msgid "Withholding Move Payment" +msgstr "Versamento Ritenuta" + +#: model:ir.model,name:l10n_it_withholding_tax_payment.model_withholding_tax_move +#. module: l10n_it_withholding_tax_payment +msgid "Withholding Tax Move" +msgstr "Voci ritenuta" + +#: model:ir.model,name:l10n_it_withholding_tax_payment.model_withholding_tax_move_payment +#: model:ir.ui.view,arch_db:l10n_it_withholding_tax_payment.view_withholding_move_payment_form +#. module: l10n_it_withholding_tax_payment +msgid "Withholding Tax Move Payment" +msgstr "Versamenti Ritenuta" + +#: code:addons/l10n_it_withholding_tax_payment/models/withholding_tax.py:87 +#: code:addons/l10n_it_withholding_tax_payment/models/withholding_tax.py:95 +#. module: l10n_it_withholding_tax_payment +#, python-format +msgid "Withholding Tax Payment" +msgstr "Versamenti Ritenuta" + +#: code:addons/l10n_it_withholding_tax_payment/models/withholding_tax.py:68 +#. module: l10n_it_withholding_tax_payment +#, python-format +msgid "Withholding Tax Payment %s" +msgstr "Versamento Ritenuta %s" + +#: model:ir.actions.act_window,name:l10n_it_withholding_tax_payment.action_withholding_tax_move_payment +#. module: l10n_it_withholding_tax_payment +msgid "Withhoulding Tax Move Payment" +msgstr "Withhoulding Tax Move Payment" + +#: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_wizard_wt_move_payment_create_wt_move_ids +#. module: l10n_it_withholding_tax_payment +msgid "Wt Moves" +msgstr "Wt Moves" + +#: code:addons/l10n_it_withholding_tax_payment/models/withholding_tax.py:115 +#. module: l10n_it_withholding_tax_payment +#, python-format +msgid "Wt move already in a move payment! Move paym. %s -Ref WT: %s - %s - %s" +msgstr "Wt move already in a move payment! Move paym. %s -Ref WT: %s - %s - %s" + +#: code:addons/l10n_it_withholding_tax_payment/models/withholding_tax.py:109 +#. module: l10n_it_withholding_tax_payment +#, python-format +msgid "Wt move already paid! - %s - %s - %s" +msgstr "Wt move already paid! - %s - %s - %s" + diff --git a/l10n_it_withholding_tax_payment/models/__init__.py b/l10n_it_withholding_tax_payment/models/__init__.py new file mode 100644 index 000000000000..f1eb1a813a88 --- /dev/null +++ b/l10n_it_withholding_tax_payment/models/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# Copyright © 2015 Alessandro Camilli () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +from . import withholding_tax diff --git a/l10n_it_withholding_tax_payment/models/withholding_tax.py b/l10n_it_withholding_tax_payment/models/withholding_tax.py new file mode 100644 index 000000000000..ee16a15365da --- /dev/null +++ b/l10n_it_withholding_tax_payment/models/withholding_tax.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +# Copyright © 2015 Alessandro Camilli () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +from openerp import models, fields, api, _ +from openerp.exceptions import ValidationError +from openerp import netsvc + + +class WithholdingTaxMove(models.Model): + _inherit = 'withholding.tax.move' + + wt_move_payment_id = fields.Many2one( + 'withholding.tax.move.payment', 'Move Payment', readonly=True) + + +class WithholdingTaxMovePayment(models.Model): + _name = 'withholding.tax.move.payment' + _description = 'Withholding Tax Move Payment' + + @api.depends('line_ids.amount', 'line_ids.wt_move_payment_id') + def _compute_total(self): + for mp in self: + tot_wt_amount = 0 + for wt_move in mp.line_ids: + tot_wt_amount += wt_move.amount + mp.amount = tot_wt_amount + + state = fields.Selection([ + ('draft', 'Draft'), + ('confirmed', 'Confirmed'), + ], 'Status', readonly=True, copy=False, select=True, default='draft') + name = fields.Char('Name') + date = fields.Char('Date') + date_payment = fields.Date('Date Payment') + date_start = fields.Date('Date Start', readonly=True) + date_stop = fields.Date('Date Stop', readonly=True) + move_id = fields.Many2one('account.move', string='Account move') + account_id = fields.Many2one('account.account', string='Account') + journal_id = fields.Many2one('account.journal', string='Journal') + line_ids = fields.One2many( + 'withholding.tax.move', 'wt_move_payment_id', string='Lines') + amount = fields.Float('WT amount', compute='_compute_total') + + def create_account_move(self): + account_move_obj = self.env['account.move'] + for mp in self: + if not mp.date_payment \ + or not mp.journal_id\ + or not mp.account_id: + raise ValidationError( + _('Warning! Datas required for account move creation: \ + Date payment, journal, account')) + # WT Moves + wt_move_balance = 0 + move_lines = [] + for wt_move in mp.line_ids: + debit = 0 + credit = 0 + if wt_move.amount > 0: + debit = wt_move.amount + else: + credit = wt_move.amount + vals = { + 'name': _('Withholding Tax Payment %s') + % wt_move.partner_id.name, + 'account_id': + wt_move.withholding_tax_id.account_payable_id.id, + 'credit': credit, + 'debit': debit, + } + move_lines.append((0, 0, vals)) + # Balance + wt_move_balance += wt_move.amount + # WT payment + if wt_move_balance: + debit = 0 + credit = 0 + if wt_move_balance > 0: + credit = wt_move_balance + else: + debit = wt_move_balance * -1 + vals = { + 'name': _('Withholding Tax Payment'), + 'account_id': mp.account_id.id, + 'credit': credit, + 'debit': debit, + } + move_lines.append((0, 0, vals)) + # Move create + move = account_move_obj.create({ + 'ref': _('Withholding Tax Payment'), + 'journal_id': mp.journal_id.id, + 'date': mp.date_payment, + 'line_ids': move_lines, + }) + move.post() + # Ref on payement + mp.move_id = move.id + + def generate_from_moves(self, wt_moves): + sequence_obj = self.env['ir.sequence'] + for wt_move in wt_moves: + if wt_move.state == 'paid': + raise ValidationError( + _("Wt move already paid! - %s - %s - %s") + % (wt_move.partner_id.name, + wt_move.date, + str(wt_move.amount))) + if wt_move.wt_move_payment_id: + raise ValidationError( + _("Wt move already in a move payment! \ + Move paym. %s -Ref WT: %s - %s - %s") + % (str(wt_move.wt_move_payment_id.id), + wt_move.partner_id.name, + wt_move.date, + str(wt_move.amount))) + # Create Move payment + wt_payment = False + if wt_moves: + val = { + 'name': sequence_obj.get('withholding.tax.move.payment'), + 'date': fields.Date.today(), + 'line_ids': [(6, 0, wt_moves.ids)] + } + wt_payment = self.create(val) + # Update ref on moves + for wt_move in wt_moves: + wt_move.wt_move_payment_id = wt_payment.id + return wt_payment + + def action_confirmed(self): + for pt in self: + wf_service = netsvc.LocalService("workflow") + wf_service.trg_validate( + self.env.uid, self._name, pt.id, 'confirmed', self.env.cr) + + def action_set_to_draft(self): + for pt in self: + wf_service = netsvc.LocalService("workflow") + wf_service.trg_validate( + self.env.uid, self._name, pt.id, 'cancel', self.env.cr) + + def move_payment_to_draft(self): + for move in self: + if move.state in ['confirmed']: + move.state = 'draft' + # Wt move set to due + for wt_move in move.line_ids: + wt_move.action_set_to_draft() + + def move_payment_confirmed(self): + for move in self: + if move.state in ['draft']: + move.state = 'confirmed' + # Wt move set to due + for wt_move in move.line_ids: + wt_move.action_paid() diff --git a/l10n_it_withholding_tax_payment/security/ir.model.access.csv b/l10n_it_withholding_tax_payment/security/ir.model.access.csv new file mode 100644 index 000000000000..334cc4889e0c --- /dev/null +++ b/l10n_it_withholding_tax_payment/security/ir.model.access.csv @@ -0,0 +1,4 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" + +withholding_tax_move_payment_user,withholding_tax_move_payment user,model_withholding_tax_move_payment,account.group_account_user,1,0,0,0 +withholding_tax_move_payment_manager,withholding_tax_move_payment manager,model_withholding_tax_move_payment,account.group_account_manager,1,1,1,1 diff --git a/l10n_it_withholding_tax_payment/views/withholding_tax.xml b/l10n_it_withholding_tax_payment/views/withholding_tax.xml new file mode 100644 index 000000000000..3a634c1ef833 --- /dev/null +++ b/l10n_it_withholding_tax_payment/views/withholding_tax.xml @@ -0,0 +1,102 @@ + + + + + withholding.move.payment.move.view.tree + withholding.tax.move + + + + + + + + + + withholding.move.payment.move.view.form + withholding.tax.move + + + + + + + + + + + withholding.tax.move.payment.view.tree + withholding.tax.move.payment + + + + + + + + + + + + + + withholding.tax.move.payment.view.form + withholding.tax.move.payment + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + Withhoulding Tax Move Payment + withholding.tax.move.payment + + + + + +
+
diff --git a/l10n_it_withholding_tax_payment/wizard/__init__.py b/l10n_it_withholding_tax_payment/wizard/__init__.py new file mode 100644 index 000000000000..742aa3ce5989 --- /dev/null +++ b/l10n_it_withholding_tax_payment/wizard/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# Copyright © 2015 Alessandro Camilli () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +from . import create_move_payment diff --git a/l10n_it_withholding_tax_payment/wizard/create_move_payment.py b/l10n_it_withholding_tax_payment/wizard/create_move_payment.py new file mode 100644 index 000000000000..650c489b386c --- /dev/null +++ b/l10n_it_withholding_tax_payment/wizard/create_move_payment.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Copyright © 2015 Alessandro Camilli () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +from openerp import models, fields, api + + +class WizardWtMovePaymentCreate(models.TransientModel): + _name = 'wizard.wt.move.payment.create' + _description = 'WT wizard create move payment' + + @api.model + def default_get(self, fields): + res = super(WizardWtMovePaymentCreate, self).default_get(fields) + active_ids = self._context.get('active_ids', []) + res = { + 'wt_move_ids': active_ids + } + return res + + wt_move_ids = fields.Many2many( + 'withholding.tax.move', 'wiz_wt_move_payment_create_rel', + 'wizard_id', 'wt_move_id', 'Wt Moves', readonly=True) + + def generate(self): + wt_move_payment_obj = self.env['withholding.tax.move.payment'] + wt_move_payment_obj.generate_from_moves(self.wt_move_ids) + + return {'type': 'ir.actions.act_window_close'} diff --git a/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml b/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml new file mode 100644 index 000000000000..d426f831c733 --- /dev/null +++ b/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml @@ -0,0 +1,40 @@ + + + + + + + wizard.wt.move.payment.create.view + wizard.wt.move.payment.create + +
+ + + + +
+
+
+
+
+ + + + +
+
diff --git a/l10n_it_withholding_tax_payment/workflow.xml b/l10n_it_withholding_tax_payment/workflow.xml new file mode 100644 index 000000000000..bb3a78dc51e0 --- /dev/null +++ b/l10n_it_withholding_tax_payment/workflow.xml @@ -0,0 +1,48 @@ + + + + + + + + withholding.tax.move.payment.wkf + withholding.tax.move.payment + True + + + + + draft + function + + move_payment_to_draft() + + True + + + + + confirmed + function + + move_payment_confirmed() + + + + + + + + + confirmed + + + + + + + cancel + + + + From b2b1102a60ce307ad85b14d7a7825679ac78a9da Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 10 May 2017 10:24:21 +0200 Subject: [PATCH 02/20] [FIX] add depends to l10n_it_withholding_tax [FIX] add display_name on class withholding.tax.move withholding.tax.statement [FIX] add display_name on class withholding.tax.move withholding.tax.statement [FIX] removed select on class l10n_it_withholding_tax l10n_it_withholding_tax_payment [FIX] add README --- l10n_it_withholding_tax_payment/README.rst | 67 +++++++++++++++++++ .../__manifest__.py | 3 +- .../models/withholding_tax.py | 2 +- 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 l10n_it_withholding_tax_payment/README.rst diff --git a/l10n_it_withholding_tax_payment/README.rst b/l10n_it_withholding_tax_payment/README.rst new file mode 100644 index 000000000000..5363bcf89caf --- /dev/null +++ b/l10n_it_withholding_tax_payment/README.rst @@ -0,0 +1,67 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======================= +Italian Withholding Tax +======================= + +Module for Italian Withholding Tax: Ritenute d'acconto + +Gestisce le ritenute sulle fatture e sui pagamenti + +Installation +============ + +To install this module, you need to have l10n_it_withholding_tax + +Usage +===== + +* Go to ... + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/122/8.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed `feedback +`_. + +Credits +======= + +Contributors +------------ + +* Alessandro Camilli +* Lorenzo Battistini + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. + +Sponsor +------- + +'Odoo Italia Network '_ + diff --git a/l10n_it_withholding_tax_payment/__manifest__.py b/l10n_it_withholding_tax_payment/__manifest__.py index 49c57e65ffaa..ec696ed133d7 100644 --- a/l10n_it_withholding_tax_payment/__manifest__.py +++ b/l10n_it_withholding_tax_payment/__manifest__.py @@ -10,7 +10,8 @@ 'Odoo Community Association (OCA)', 'website': 'https://odoo-community.org/', 'license': 'AGPL-3', - "depends": ['account'], + "depends": ['account', + 'l10n_it_withholding_tax'], "data": [ 'views/withholding_tax.xml', 'workflow.xml', diff --git a/l10n_it_withholding_tax_payment/models/withholding_tax.py b/l10n_it_withholding_tax_payment/models/withholding_tax.py index ee16a15365da..0c678afbf7f2 100644 --- a/l10n_it_withholding_tax_payment/models/withholding_tax.py +++ b/l10n_it_withholding_tax_payment/models/withholding_tax.py @@ -30,7 +30,7 @@ def _compute_total(self): state = fields.Selection([ ('draft', 'Draft'), ('confirmed', 'Confirmed'), - ], 'Status', readonly=True, copy=False, select=True, default='draft') + ], 'Status', readonly=True, copy=False, default='draft') name = fields.Char('Name') date = fields.Char('Date') date_payment = fields.Date('Date Payment') From b4c87579667dc3bb11044dde574b9ac03fd06409 Mon Sep 17 00:00:00 2001 From: Alessandro Camilli Date: Mon, 24 Jul 2017 18:29:29 +0200 Subject: [PATCH 03/20] Rates required Disabled delete from tree view of wt statements and wt moves Rates required Disabled delete from tree view of wt statements and wt moves Fix conflicts and changed code with new standards --- l10n_it_withholding_tax_payment/data/sequence.xml | 4 ++-- .../models/withholding_tax.py | 6 +++--- .../views/withholding_tax.xml | 10 ++++------ .../wizard/create_move_payment.py | 2 +- .../wizard/create_move_payment_view.xml | 8 +++----- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/l10n_it_withholding_tax_payment/data/sequence.xml b/l10n_it_withholding_tax_payment/data/sequence.xml index 2f0c8c10c8c0..d24fed743a4a 100644 --- a/l10n_it_withholding_tax_payment/data/sequence.xml +++ b/l10n_it_withholding_tax_payment/data/sequence.xml @@ -1,5 +1,5 @@ - + @@ -11,4 +11,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/l10n_it_withholding_tax_payment/models/withholding_tax.py b/l10n_it_withholding_tax_payment/models/withholding_tax.py index 0c678afbf7f2..6ce7186d1e43 100644 --- a/l10n_it_withholding_tax_payment/models/withholding_tax.py +++ b/l10n_it_withholding_tax_payment/models/withholding_tax.py @@ -3,9 +3,9 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields, api, _ -from openerp.exceptions import ValidationError -from openerp import netsvc +from odoo import models, fields, api, _ +from odoo.exceptions import ValidationError +from odoo import netsvc class WithholdingTaxMove(models.Model): diff --git a/l10n_it_withholding_tax_payment/views/withholding_tax.xml b/l10n_it_withholding_tax_payment/views/withholding_tax.xml index 3a634c1ef833..8d3b3271038a 100644 --- a/l10n_it_withholding_tax_payment/views/withholding_tax.xml +++ b/l10n_it_withholding_tax_payment/views/withholding_tax.xml @@ -1,5 +1,4 @@ - - + @@ -32,7 +31,7 @@ withholding.tax.move.payment.view.tree withholding.tax.move.payment - + @@ -47,7 +46,7 @@ withholding.tax.move.payment.view.form withholding.tax.move.payment -
+
- + @@ -91,12 +91,12 @@ - Withhoulding Tax Move Payment + Withholding Tax Payment Move withholding.tax.move.payment - diff --git a/l10n_it_withholding_tax_payment/wizard/__init__.py b/l10n_it_withholding_tax_payment/wizard/__init__.py index 45591af4c9dc..752c33a8ab30 100644 --- a/l10n_it_withholding_tax_payment/wizard/__init__.py +++ b/l10n_it_withholding_tax_payment/wizard/__init__.py @@ -1,5 +1,3 @@ -# Copyright 2015 Alessandro Camilli () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - from . import create_move_payment diff --git a/l10n_it_withholding_tax_payment/wizard/create_move_payment.py b/l10n_it_withholding_tax_payment/wizard/create_move_payment.py index c1bf716138a7..497d473cf1dc 100644 --- a/l10n_it_withholding_tax_payment/wizard/create_move_payment.py +++ b/l10n_it_withholding_tax_payment/wizard/create_move_payment.py @@ -1,26 +1,21 @@ # Copyright 2015 Alessandro Camilli () +# Copyright 2019 Matteo Bilotta # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from odoo import models, fields, api, _ +from odoo import _, fields, models class WizardWtMovePaymentCreate(models.TransientModel): _name = 'wizard.wt.move.payment.create' - _description = 'WT wizard create move payment' + _description = "Create WT Payment Move Wizard" - @api.model - def default_get(self, fields): - res = super(WizardWtMovePaymentCreate, self).default_get(fields) - active_ids = self._context.get('active_ids', []) - res = { - 'wt_move_ids': active_ids - } - return res + def _default_wt_moves(self): + return self._context.get('active_ids', []) wt_move_ids = fields.Many2many( 'withholding.tax.move', 'wiz_wt_move_payment_create_rel', - 'wizard_id', 'wt_move_id', 'Wt Moves', readonly=True) + 'wizard_id', 'wt_move_id', 'WT Moves', readonly=True, + default=_default_wt_moves) def generate(self): wt_move_payment_obj = self.env['withholding.tax.move.payment'] @@ -29,6 +24,7 @@ def generate(self): 'l10n_it_withholding_tax_payment', 'view_withholding_move_payment_form') view_id = view[1] or False + return { 'name': _('Withholding Tax Payment'), 'view_type': 'form', @@ -36,5 +32,5 @@ def generate(self): 'res_model': 'withholding.tax.move.payment', 'res_id': wt_payment.id, 'type': 'ir.actions.act_window', - 'view_id': [view_id], + 'view_id': [view_id] } diff --git a/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml b/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml index 1d843fca9f9c..a381a45c9aa3 100644 --- a/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml +++ b/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml @@ -1,38 +1,41 @@ + - + Copyright 2010-2013 Akretion (http://www.akretion.com) + @author: Alexis de Lattre + The licence is in the file __manifest__.py - - wizard.wt.move.payment.create.view - wizard.wt.move.payment.create - - - - - - -
-
- -
-
+ Copyright 2010-2013 Alessandro Camilli (http://www.openforce.it) + Copyright 2019 Matteo Bilotta + --> + + - + + wizard.wt.move.payment.create.view + wizard.wt.move.payment.create + +
+ + + + + +
+
+
+
+
+
From 4d74fd213b78c52433172e533fa782c49c84d523 Mon Sep 17 00:00:00 2001 From: Lara Baggio Date: Wed, 13 May 2020 18:03:37 +0200 Subject: [PATCH 12/20] merge PR 1264 1717 1728 1737 1739 --- l10n_it_withholding_tax_payment/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n_it_withholding_tax_payment/__manifest__.py b/l10n_it_withholding_tax_payment/__manifest__.py index 29594121cd54..f5f57cdda2dd 100644 --- a/l10n_it_withholding_tax_payment/__manifest__.py +++ b/l10n_it_withholding_tax_payment/__manifest__.py @@ -5,7 +5,7 @@ { 'name': "ITA - Ritenuta d'acconto - Pagamenti", 'summary': "Gestisce le ritenute sulle fatture e sui pagamenti", - 'version': '12.0.1.0.0', + 'version': '12.0.1.0.1', 'development_status': "Beta", 'category': "Invoicing & Payments", 'website': 'https://github.com/OCA/l10n-italy', From f37fdf912b198f27b8c491fe420d5da683d243b4 Mon Sep 17 00:00:00 2001 From: SimoRubi Date: Mon, 26 Apr 2021 11:06:13 +0200 Subject: [PATCH 13/20] [IMP] l10n_it_withholding_tax_payment: black, isort, prettier --- .../__manifest__.py | 39 ++--- .../data/sequence.xml | 8 +- .../migrations/12.0.1.0.0/pre-migrate.py | 34 ++-- .../models/withholding_tax.py | 161 ++++++++++-------- .../security/security.xml | 12 +- .../views/withholding_tax.xml | 103 +++++++---- .../wizard/create_move_payment.py | 37 ++-- .../wizard/create_move_payment_view.xml | 29 ++-- 8 files changed, 246 insertions(+), 177 deletions(-) diff --git a/l10n_it_withholding_tax_payment/__manifest__.py b/l10n_it_withholding_tax_payment/__manifest__.py index f5f57cdda2dd..10fa2bb352e7 100644 --- a/l10n_it_withholding_tax_payment/__manifest__.py +++ b/l10n_it_withholding_tax_payment/__manifest__.py @@ -3,27 +3,22 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { - 'name': "ITA - Ritenuta d'acconto - Pagamenti", - 'summary': "Gestisce le ritenute sulle fatture e sui pagamenti", - 'version': '12.0.1.0.1', - 'development_status': "Beta", - 'category': "Invoicing & Payments", - 'website': 'https://github.com/OCA/l10n-italy', - 'author': "Openforce, " - "Odoo Italia Network, " - "Odoo Community Association (OCA)", - 'license': 'AGPL-3', - 'application': False, - 'installable': True, - 'depends': [ - 'account', - 'l10n_it_withholding_tax' + "name": "ITA - Ritenuta d'acconto - Pagamenti", + "summary": "Gestisce le ritenute sulle fatture e sui pagamenti", + "version": "12.0.1.0.1", + "development_status": "Beta", + "category": "Invoicing & Payments", + "website": "https://github.com/OCA/l10n-italy", + "author": "Openforce, " "Odoo Italia Network, " "Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": ["account", "l10n_it_withholding_tax"], + "data": [ + "data/sequence.xml", + "security/ir.model.access.csv", + "security/security.xml", + "views/withholding_tax.xml", + "wizard/create_move_payment_view.xml", ], - 'data': [ - 'data/sequence.xml', - 'security/ir.model.access.csv', - 'security/security.xml', - 'views/withholding_tax.xml', - 'wizard/create_move_payment_view.xml', - ] } diff --git a/l10n_it_withholding_tax_payment/data/sequence.xml b/l10n_it_withholding_tax_payment/data/sequence.xml index 0ae498857f41..376cf1b3cbb6 100644 --- a/l10n_it_withholding_tax_payment/data/sequence.xml +++ b/l10n_it_withholding_tax_payment/data/sequence.xml @@ -1,12 +1,12 @@ - + Withholding Tax Payment Move Number withholding.tax.move.payment - + WTMP/ - + - + diff --git a/l10n_it_withholding_tax_payment/migrations/12.0.1.0.0/pre-migrate.py b/l10n_it_withholding_tax_payment/migrations/12.0.1.0.0/pre-migrate.py index 94d3b1f570e6..917c0c1ad82f 100644 --- a/l10n_it_withholding_tax_payment/migrations/12.0.1.0.0/pre-migrate.py +++ b/l10n_it_withholding_tax_payment/migrations/12.0.1.0.0/pre-migrate.py @@ -2,16 +2,17 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging - from datetime import datetime + from odoo.tools.misc import DEFAULT_SERVER_DATE_FORMAT _logger = logging.getLogger(__name__) def _fix_date_field(cr): - cr.execute("SELECT id, date FROM withholding_tax_move_payment" - " WHERE date IS NOT NULL;") + cr.execute( + "SELECT id, date FROM withholding_tax_move_payment" " WHERE date IS NOT NULL;" + ) records = cr.fetchall() for record in records: @@ -22,22 +23,29 @@ def _fix_date_field(cr): datetime.strptime(record_value, DEFAULT_SERVER_DATE_FORMAT) except (TypeError, ValueError): - _logger.error("The row in table 'withholding_tax_move_payment'" - " with ID #{} and 'date' field valued" - " as '{}' will be set as NULL..." - .format(record_id, record_value)) + _logger.error( + "The row in table 'withholding_tax_move_payment'" + " with ID #{} and 'date' field valued" + " as '{}' will be set as NULL...".format(record_id, record_value) + ) - cr.execute("UPDATE withholding_tax_move_payment" - " SET date = NULL WHERE id = %s;", (record_id, )) + cr.execute( + "UPDATE withholding_tax_move_payment" " SET date = NULL WHERE id = %s;", + (record_id,), + ) - cr.execute("ALTER TABLE withholding_tax_move_payment" - " ALTER COLUMN date TYPE DATE USING date::DATE;") + cr.execute( + "ALTER TABLE withholding_tax_move_payment" + " ALTER COLUMN date TYPE DATE USING date::DATE;" + ) def migrate(cr, version): if not version: - _logger.warning("Does not exist any previous version for this module. " - "Skipping the migration...") + _logger.warning( + "Does not exist any previous version for this module. " + "Skipping the migration..." + ) return diff --git a/l10n_it_withholding_tax_payment/models/withholding_tax.py b/l10n_it_withholding_tax_payment/models/withholding_tax.py index 64b58e4f66b9..f9f14fbf6b42 100644 --- a/l10n_it_withholding_tax_payment/models/withholding_tax.py +++ b/l10n_it_withholding_tax_payment/models/withholding_tax.py @@ -2,23 +2,26 @@ # Copyright 2019 Matteo Bilotta # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import models, fields, api, _ +from odoo import _, api, fields, models from odoo.exceptions import ValidationError class WithholdingTaxMove(models.Model): - _inherit = 'withholding.tax.move' + _inherit = "withholding.tax.move" wt_move_payment_id = fields.Many2one( - 'withholding.tax.move.payment', "WT Payment Move", readonly=True) + "withholding.tax.move.payment", "WT Payment Move", readonly=True + ) def unlink(self): for rec in self: if rec.wt_move_payment_id: raise ValidationError( - _("Warning! Withholding tax move in a payment {}:" - " you can not delete it") - .format(rec.wt_move_payment_id.name)) + _( + "Warning! Withholding tax move in a payment {}:" + " you can not delete it" + ).format(rec.wt_move_payment_id.name) + ) return super().unlink() @@ -31,18 +34,19 @@ def check_unlink(self): if wt_moves_not_eresable: raise ValidationError( - _("Warning! Withholding tax moves in a payment: {}") - .format(wt_moves_not_eresable[0].sudo() - .wt_move_payment_id.name)) + _("Warning! Withholding tax moves in a payment: {}").format( + wt_moves_not_eresable[0].sudo().wt_move_payment_id.name + ) + ) super().check_unlink() class WithholdingTaxMovePayment(models.Model): - _name = 'withholding.tax.move.payment' + _name = "withholding.tax.move.payment" _description = "Withholding Tax Payment Move" - @api.depends('line_ids.amount', 'line_ids.wt_move_payment_id') + @api.depends("line_ids.amount", "line_ids.wt_move_payment_id") def _compute_total(self): for mp in self: tot_wt_amount = 0 @@ -50,35 +54,47 @@ def _compute_total(self): tot_wt_amount += wt_move.amount mp.amount = tot_wt_amount - state = fields.Selection([ - ('draft', 'Draft'), - ('confirmed', 'Confirmed'), - ], 'Status', readonly=True, copy=False, default='draft') + state = fields.Selection( + [ + ("draft", "Draft"), + ("confirmed", "Confirmed"), + ], + "Status", + readonly=True, + copy=False, + default="draft", + ) company_id = fields.Many2one( - 'res.company', string='Company', required=True, - default=lambda self: - self.env['res.company']._company_default_get('account.account')) - name = fields.Char('Name') + "res.company", + string="Company", + required=True, + default=lambda self: self.env["res.company"]._company_default_get( + "account.account" + ), + ) + name = fields.Char("Name") date = fields.Date(string="Date") date_payment = fields.Date("Payment Date") date_start = fields.Date("Start Date", readonly=True) date_stop = fields.Date("Stop Date", readonly=True) - move_id = fields.Many2one('account.move', string="Account Move") - account_id = fields.Many2one('account.account', string='Account') - journal_id = fields.Many2one('account.journal', string='Journal') + move_id = fields.Many2one("account.move", string="Account Move") + account_id = fields.Many2one("account.account", string="Account") + journal_id = fields.Many2one("account.journal", string="Journal") line_ids = fields.One2many( - 'withholding.tax.move', 'wt_move_payment_id', string='Lines') - amount = fields.Float("WT Amount", compute='_compute_total') + "withholding.tax.move", "wt_move_payment_id", string="Lines" + ) + amount = fields.Float("WT Amount", compute="_compute_total") def create_account_move(self): - account_move_obj = self.env['account.move'] + account_move_obj = self.env["account.move"] for mp in self: - if not mp.date_payment \ - or not mp.journal_id\ - or not mp.account_id: + if not mp.date_payment or not mp.journal_id or not mp.account_id: raise ValidationError( - _("Warning! Data required for account move creation:" - " payment date, journal, account")) + _( + "Warning! Data required for account move creation:" + " payment date, journal, account" + ) + ) # WT Moves wt_move_balance = 0 @@ -91,12 +107,12 @@ def create_account_move(self): else: credit = wt_move.amount vals = { - 'name': _("Withholding tax payment {}") - .format(wt_move.partner_id.name), - 'account_id': - wt_move.withholding_tax_id.account_payable_id.id, - 'credit': credit, - 'debit': debit, + "name": _("Withholding tax payment {}").format( + wt_move.partner_id.name + ), + "account_id": wt_move.withholding_tax_id.account_payable_id.id, + "credit": credit, + "debit": debit, } move_lines.append((0, 0, vals)) # Balance @@ -110,54 +126,61 @@ def create_account_move(self): else: debit = wt_move_balance * -1 vals = { - 'name': _('Withholding Tax Payment'), - 'account_id': mp.account_id.id, - 'credit': credit, - 'debit': debit, + "name": _("Withholding Tax Payment"), + "account_id": mp.account_id.id, + "credit": credit, + "debit": debit, } move_lines.append((0, 0, vals)) # Move create - move = account_move_obj.create([{ - 'ref': _('Withholding Tax Payment'), - 'journal_id': mp.journal_id.id, - 'date': mp.date_payment, - 'line_ids': move_lines, - }]) + move = account_move_obj.create( + [ + { + "ref": _("Withholding Tax Payment"), + "journal_id": mp.journal_id.id, + "date": mp.date_payment, + "line_ids": move_lines, + } + ] + ) move.post() # Ref on payement mp.move_id = move.id def generate_from_moves(self, wt_moves): # Moves must have the same company - if wt_moves and len(wt_moves.mapped('company_id')) > 1: - raise ValidationError( - _("The selected moves must have the same company!")) + if wt_moves and len(wt_moves.mapped("company_id")) > 1: + raise ValidationError(_("The selected moves must have the same company!")) - sequence_obj = self.env['ir.sequence'] + sequence_obj = self.env["ir.sequence"] for wt_move in wt_moves: - if wt_move.state == 'paid': + if wt_move.state == "paid": raise ValidationError( - _("WT move already paid! - {} - {} - {}") - .format(wt_move.partner_id.name, - wt_move.date, - str(wt_move.amount))) + _("WT move already paid! - {} - {} - {}").format( + wt_move.partner_id.name, wt_move.date, str(wt_move.amount) + ) + ) if wt_move.wt_move_payment_id: raise ValidationError( - _("WT move already in a payment move! " - "Paym. move {} - Ref WT: {} - {} - {}") - .format(str(wt_move.wt_move_payment_id.id), - wt_move.partner_id.name, - wt_move.date, - str(wt_move.amount))) + _( + "WT move already in a payment move! " + "Paym. move {} - Ref WT: {} - {} - {}" + ).format( + str(wt_move.wt_move_payment_id.id), + wt_move.partner_id.name, + wt_move.date, + str(wt_move.amount), + ) + ) # Create Payment Move wt_payment = False if wt_moves: val = { - 'name': sequence_obj.get('withholding.tax.move.payment'), - 'date': fields.Date.today(), - 'line_ids': [(6, 0, wt_moves.ids)] + "name": sequence_obj.get("withholding.tax.move.payment"), + "date": fields.Date.today(), + "line_ids": [(6, 0, wt_moves.ids)], } wt_payment = self.create([val]) # Update ref on moves @@ -167,16 +190,16 @@ def generate_from_moves(self, wt_moves): def action_confirmed(self): for move in self: - if move.state in ['draft']: - move.state = 'confirmed' + if move.state in ["draft"]: + move.state = "confirmed" # WT move set to due for wt_move in move.line_ids: wt_move.action_paid() def action_set_to_draft(self): for move in self: - if move.state in ['confirmed']: - move.state = 'draft' + if move.state in ["confirmed"]: + move.state = "draft" # WT move set to due for wt_move in move.line_ids: wt_move.action_set_to_draft() @@ -184,7 +207,7 @@ def action_set_to_draft(self): @api.multi def unlink(self): for payment in self: - if payment.state != 'draft': + if payment.state != "draft": raise ValidationError(_("You can only delete draft payments")) return super().unlink() diff --git a/l10n_it_withholding_tax_payment/security/security.xml b/l10n_it_withholding_tax_payment/security/security.xml index 35ed5efe4fc1..2c54c8bceb63 100644 --- a/l10n_it_withholding_tax_payment/security/security.xml +++ b/l10n_it_withholding_tax_payment/security/security.xml @@ -1,17 +1,17 @@ - - + - Withholding Tax Payment Move - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] diff --git a/l10n_it_withholding_tax_payment/views/withholding_tax.xml b/l10n_it_withholding_tax_payment/views/withholding_tax.xml index d0c11e925472..b708896e084c 100644 --- a/l10n_it_withholding_tax_payment/views/withholding_tax.xml +++ b/l10n_it_withholding_tax_payment/views/withholding_tax.xml @@ -5,10 +5,13 @@ withholding.move.payment.move.view.tree withholding.tax.move - + - + @@ -16,10 +19,13 @@ withholding.move.payment.move.view.form withholding.tax.move - + - + @@ -32,13 +38,13 @@ withholding.tax.move.payment - - - - - - - + + + + + + + @@ -49,41 +55,63 @@
-
- - - + + + - + - - + + - - - - + + + + - + - - - - + + + + - +
@@ -93,10 +121,15 @@ Withholding Tax Payment Move withholding.tax.move.payment - + - +
diff --git a/l10n_it_withholding_tax_payment/wizard/create_move_payment.py b/l10n_it_withholding_tax_payment/wizard/create_move_payment.py index 497d473cf1dc..40bb19c4d387 100644 --- a/l10n_it_withholding_tax_payment/wizard/create_move_payment.py +++ b/l10n_it_withholding_tax_payment/wizard/create_move_payment.py @@ -6,31 +6,36 @@ class WizardWtMovePaymentCreate(models.TransientModel): - _name = 'wizard.wt.move.payment.create' + _name = "wizard.wt.move.payment.create" _description = "Create WT Payment Move Wizard" def _default_wt_moves(self): - return self._context.get('active_ids', []) + return self._context.get("active_ids", []) wt_move_ids = fields.Many2many( - 'withholding.tax.move', 'wiz_wt_move_payment_create_rel', - 'wizard_id', 'wt_move_id', 'WT Moves', readonly=True, - default=_default_wt_moves) + "withholding.tax.move", + "wiz_wt_move_payment_create_rel", + "wizard_id", + "wt_move_id", + "WT Moves", + readonly=True, + default=_default_wt_moves, + ) def generate(self): - wt_move_payment_obj = self.env['withholding.tax.move.payment'] + wt_move_payment_obj = self.env["withholding.tax.move.payment"] wt_payment = wt_move_payment_obj.generate_from_moves(self.wt_move_ids) - view = self.env['ir.model.data'].get_object_reference( - 'l10n_it_withholding_tax_payment', - 'view_withholding_move_payment_form') + view = self.env["ir.model.data"].get_object_reference( + "l10n_it_withholding_tax_payment", "view_withholding_move_payment_form" + ) view_id = view[1] or False return { - 'name': _('Withholding Tax Payment'), - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'withholding.tax.move.payment', - 'res_id': wt_payment.id, - 'type': 'ir.actions.act_window', - 'view_id': [view_id] + "name": _("Withholding Tax Payment"), + "view_type": "form", + "view_mode": "form", + "res_model": "withholding.tax.move.payment", + "res_id": wt_payment.id, + "type": "ir.actions.act_window", + "view_id": [view_id], } diff --git a/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml b/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml index a381a45c9aa3..f5bc7a560847 100644 --- a/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml +++ b/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml @@ -1,5 +1,4 @@ - - + - @@ -22,20 +20,27 @@
-
- +
From 156de257c882a6765a4144364aec96d822fa9d8c Mon Sep 17 00:00:00 2001 From: SimoRubi Date: Mon, 26 Apr 2021 11:03:20 +0200 Subject: [PATCH 14/20] [MIG] l10n_it_withholding_tax_payment: Migration to 14.0 Fix manifest ir_sequence.get() and ir_sequence.get_id() are deprecated. Please use ir_sequence.next_by_code() or ir_sequence.next_by_id(). The model wizard.wt.move.payment.create has no access rules, consider adding one. RedirectWarning method 'post()' is a deprecated alias to 'action_post()' or _post() The method '_company_default_get' on res.company is deprecated and shouldn't be used anymore ValueError: invalid literal for int() with base 10: 'wizard_wt_move_payment_create_view' --- .../__manifest__.py | 6 +-- .../migrations/12.0.1.0.0/pre-migrate.py | 54 ------------------- .../models/withholding_tax.py | 10 ++-- .../security/ir.model.access.csv | 1 + .../wizard/create_move_payment_view.xml | 17 +++--- 5 files changed, 14 insertions(+), 74 deletions(-) delete mode 100644 l10n_it_withholding_tax_payment/migrations/12.0.1.0.0/pre-migrate.py diff --git a/l10n_it_withholding_tax_payment/__manifest__.py b/l10n_it_withholding_tax_payment/__manifest__.py index 10fa2bb352e7..3f68c10b80b2 100644 --- a/l10n_it_withholding_tax_payment/__manifest__.py +++ b/l10n_it_withholding_tax_payment/__manifest__.py @@ -5,11 +5,11 @@ { "name": "ITA - Ritenuta d'acconto - Pagamenti", "summary": "Gestisce le ritenute sulle fatture e sui pagamenti", - "version": "12.0.1.0.1", + "version": "14.0.1.0.0", "development_status": "Beta", - "category": "Invoicing & Payments", + "category": "Localization/Italy", "website": "https://github.com/OCA/l10n-italy", - "author": "Openforce, " "Odoo Italia Network, " "Odoo Community Association (OCA)", + "author": "Openforce, Odoo Italia Network, Odoo Community Association (OCA)", "license": "AGPL-3", "application": False, "installable": True, diff --git a/l10n_it_withholding_tax_payment/migrations/12.0.1.0.0/pre-migrate.py b/l10n_it_withholding_tax_payment/migrations/12.0.1.0.0/pre-migrate.py deleted file mode 100644 index 917c0c1ad82f..000000000000 --- a/l10n_it_withholding_tax_payment/migrations/12.0.1.0.0/pre-migrate.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 2019 Matteo Bilotta -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -import logging -from datetime import datetime - -from odoo.tools.misc import DEFAULT_SERVER_DATE_FORMAT - -_logger = logging.getLogger(__name__) - - -def _fix_date_field(cr): - cr.execute( - "SELECT id, date FROM withholding_tax_move_payment" " WHERE date IS NOT NULL;" - ) - - records = cr.fetchall() - for record in records: - record_id = record[0] - record_value = record[1] - - try: - datetime.strptime(record_value, DEFAULT_SERVER_DATE_FORMAT) - - except (TypeError, ValueError): - _logger.error( - "The row in table 'withholding_tax_move_payment'" - " with ID #{} and 'date' field valued" - " as '{}' will be set as NULL...".format(record_id, record_value) - ) - - cr.execute( - "UPDATE withholding_tax_move_payment" " SET date = NULL WHERE id = %s;", - (record_id,), - ) - - cr.execute( - "ALTER TABLE withholding_tax_move_payment" - " ALTER COLUMN date TYPE DATE USING date::DATE;" - ) - - -def migrate(cr, version): - if not version: - _logger.warning( - "Does not exist any previous version for this module. " - "Skipping the migration..." - ) - - return - - _fix_date_field(cr) - - _logger.info("Migration executed successfully. Exiting...") diff --git a/l10n_it_withholding_tax_payment/models/withholding_tax.py b/l10n_it_withholding_tax_payment/models/withholding_tax.py index f9f14fbf6b42..f63069d8efcb 100644 --- a/l10n_it_withholding_tax_payment/models/withholding_tax.py +++ b/l10n_it_withholding_tax_payment/models/withholding_tax.py @@ -25,7 +25,6 @@ def unlink(self): return super().unlink() - @api.multi def check_unlink(self): wt_moves_not_eresable = [] for move in self: @@ -68,9 +67,7 @@ def _compute_total(self): "res.company", string="Company", required=True, - default=lambda self: self.env["res.company"]._company_default_get( - "account.account" - ), + default=lambda self: self.env.company, ) name = fields.Char("Name") date = fields.Date(string="Date") @@ -143,7 +140,7 @@ def create_account_move(self): } ] ) - move.post() + move.action_post() # Ref on payement mp.move_id = move.id @@ -178,7 +175,7 @@ def generate_from_moves(self, wt_moves): wt_payment = False if wt_moves: val = { - "name": sequence_obj.get("withholding.tax.move.payment"), + "name": sequence_obj.next_by_code("withholding.tax.move.payment"), "date": fields.Date.today(), "line_ids": [(6, 0, wt_moves.ids)], } @@ -204,7 +201,6 @@ def action_set_to_draft(self): for wt_move in move.line_ids: wt_move.action_set_to_draft() - @api.multi def unlink(self): for payment in self: if payment.state != "draft": diff --git a/l10n_it_withholding_tax_payment/security/ir.model.access.csv b/l10n_it_withholding_tax_payment/security/ir.model.access.csv index ccc333181188..b81afde5b755 100644 --- a/l10n_it_withholding_tax_payment/security/ir.model.access.csv +++ b/l10n_it_withholding_tax_payment/security/ir.model.access.csv @@ -3,3 +3,4 @@ withholding_tax_move_payment_user,withholding_tax_move_payment user,model_withholding_tax_move_payment,account.group_account_user,1,0,0,0 withholding_tax_move_payment_invoice,withholding_tax_move_payment invoice,model_withholding_tax_move_payment,account.group_account_invoice,1,0,0,0 withholding_tax_move_payment_manager,withholding_tax_move_payment manager,model_withholding_tax_move_payment,account.group_account_manager,1,1,1,1 +access_wizard_wt_move_payment_create,access_wizard_wt_move_payment_create,model_wizard_wt_move_payment_create,base.group_user,1,1,1,1 diff --git a/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml b/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml index f5bc7a560847..b462b3b9808f 100644 --- a/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml +++ b/l10n_it_withholding_tax_payment/wizard/create_move_payment_view.xml @@ -32,15 +32,12 @@ - + + Create Payment Move + + wizard.wt.move.payment.create + form + new + From 74d17d4e75a9279a15abc0bcc99fd4e6ae3b878c Mon Sep 17 00:00:00 2001 From: SimoRubi Date: Fri, 13 Aug 2021 16:26:40 +0200 Subject: [PATCH 15/20] [MIG] l10n_it_withholding_tax_payment: Fix security rule for multi-company --- .../security/security.xml | 2 +- .../tests/__init__.py | 3 + .../tests/test_withholding_tax_payment.py | 116 ++++++++++++++++++ 3 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 l10n_it_withholding_tax_payment/tests/__init__.py create mode 100644 l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py diff --git a/l10n_it_withholding_tax_payment/security/security.xml b/l10n_it_withholding_tax_payment/security/security.xml index 2c54c8bceb63..1fdc258a4250 100644 --- a/l10n_it_withholding_tax_payment/security/security.xml +++ b/l10n_it_withholding_tax_payment/security/security.xml @@ -11,7 +11,7 @@ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + >['|',('company_id','=',False),('company_id','in',company_ids)]
diff --git a/l10n_it_withholding_tax_payment/tests/__init__.py b/l10n_it_withholding_tax_payment/tests/__init__.py new file mode 100644 index 000000000000..bc8077d45e94 --- /dev/null +++ b/l10n_it_withholding_tax_payment/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import test_withholding_tax_payment diff --git a/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py b/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py new file mode 100644 index 000000000000..09c9252bd75a --- /dev/null +++ b/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py @@ -0,0 +1,116 @@ +# Copyright 2021 Simone Rubino - Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo.tests import Form + +from odoo.addons.account.tests.common import AccountTestInvoicingCommon + + +class TestWithholdingTaxPayment(AccountTestInvoicingCommon): + @classmethod + def setup_withholding_tax(cls, company_data): + return cls.env["withholding.tax"].create( + { + "name": "Test withholding tax", + "code": "TWHT", + "company_id": company_data["company"].id, + "account_receivable_id": company_data["default_account_receivable"].id, + "account_payable_id": company_data["default_account_payable"].id, + "journal_id": company_data["default_journal_misc"].id, + "payment_term": cls.pay_terms_a.id, + "rate_ids": [ + ( + 0, + 0, + { + "tax": 20, + "base": 1, + }, + ) + ], + } + ) + + @classmethod + def setup_withholding_data(cls, company_data): + """ + Create an invoice with a withholding tax for current company. + """ + cls.set_allowed_companies(company_data["company"]) + wh_tax = cls.setup_withholding_tax(company_data) + invoice = cls.init_invoice("in_invoice", amounts=[100]) + invoice_form = Form(invoice) + with invoice_form.invoice_line_ids.edit(0) as line_form: + line_form.invoice_line_tax_wt_ids.clear() + line_form.invoice_line_tax_wt_ids.add(wh_tax) + invoice = invoice_form.save() + return invoice + + @classmethod + def set_allowed_companies(cls, company): + """ + Set company for current user. + Note that user.company_id would not be the current company + but only the default company for the user. + """ + context = {"allowed_company_ids": company.ids} + if "allowed_company_ids" in cls.env.context: + cls.env.context.pop("allowed_company_ids") + cls.env.context = dict(**cls.env.context, **context) + + @classmethod + def setUpClass(cls, chart_template_ref=None): + super().setUpClass(chart_template_ref=chart_template_ref) + cls.invoice_1 = cls.setup_withholding_data(cls.company_data) + cls.invoice_2 = cls.setup_withholding_data(cls.company_data_2) + + def generate_withholding_tax_payment(self, invoice): + """ + Generate payment for withholding tax included in `invoice`. + """ + self.set_allowed_companies(invoice.company_id) + + # Pay invoice + invoice.action_post() + payment_wizard = ( + self.env["account.payment.register"] + .with_context( + active_model=invoice._name, + active_ids=invoice.ids, + ) + .create({}) + ) + action_payment = payment_wizard.action_create_payments() + self.assertTrue(invoice.payment_state, "partial") + + # Pay withholding tax + payment = self.env[action_payment["res_model"]].browse(action_payment["res_id"]) + wh_tax_move = self.env["withholding.tax.move"].search( + [("account_move_id", "=", payment.move_id.id)] + ) + wh_tax_payment_wizard = ( + self.env["wizard.wt.move.payment.create"] + .with_context(active_model=wh_tax_move._name, active_ids=wh_tax_move.ids) + .create({}) + ) + wh_tax_payment_action = wh_tax_payment_wizard.generate() + withholding_tax_payment = self.env[wh_tax_payment_action["res_model"]].browse( + wh_tax_payment_action["res_id"] + ) + return withholding_tax_payment + + def test_withholding_tax_payment_multi_company_security(self): + """ + Check that withholding tax payments can be generated + in multi-company environment. + """ + withholding_tax_payment_1 = self.generate_withholding_tax_payment( + self.invoice_1 + ) + self.assertTrue(withholding_tax_payment_1) + + # Generate payment in second company + withholding_tax_payment_2 = self.generate_withholding_tax_payment( + self.invoice_2 + ) + self.assertTrue(withholding_tax_payment_2) From 61e67b25fce80690a2c4f255adc495f2e42144a3 Mon Sep 17 00:00:00 2001 From: SimoRubi Date: Fri, 27 Aug 2021 15:48:47 +0200 Subject: [PATCH 16/20] [IMP] l10n_it_withholding_tax_payment: Readme --- l10n_it_withholding_tax_payment/README.rst | 70 ++++++++++++++-- .../__manifest__.py | 2 +- .../readme/DESCRIPTION.rst | 8 +- .../readme/USAGE.rst | 48 +++++++++++ .../static/description/index.html | 76 ++++++++++++++---- ...holding_tax_move_payment_configuration.png | Bin 0 -> 11918 bytes ...ding_tax_move_payment_configuration_it.png | Bin 0 -> 12402 bytes 7 files changed, 177 insertions(+), 27 deletions(-) create mode 100644 l10n_it_withholding_tax_payment/readme/USAGE.rst create mode 100644 l10n_it_withholding_tax_payment/static/img/withholding_tax_move_payment_configuration.png create mode 100644 l10n_it_withholding_tax_payment/static/img/withholding_tax_move_payment_configuration_it.png diff --git a/l10n_it_withholding_tax_payment/README.rst b/l10n_it_withholding_tax_payment/README.rst index 2fd3f6444b53..5924f6a9362c 100644 --- a/l10n_it_withholding_tax_payment/README.rst +++ b/l10n_it_withholding_tax_payment/README.rst @@ -14,37 +14,93 @@ ITA - Ritenuta d'acconto - Pagamenti :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github - :target: https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_withholding_tax_payment + :target: https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_withholding_tax_payment :alt: OCA/l10n-italy .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_withholding_tax_payment + :target: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_withholding_tax_payment :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/122/12.0 + :target: https://runbot.odoo-community.org/runbot/122/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| **Italiano** -Gestisce le ritenute sulle fatture e sui pagamenti. +Per quanto riguarda la configurazione o l'utilizzo delle ritenute seguire le istruzioni indicate nel modulo `l10n_it_withholding_tax`. + +Questo modulo permette di tenere traccia del pagamento della ritenuta d'acconto. **English** -Manages the Italian withholding taxes on invoices and payments. +Regarding the configuration or use of withholding taxes, follow the instructions in the module `l10n_it_withholding_tax`. + +This module allows to keep track of the withholding tax payment. **Table of contents** .. contents:: :local: +Usage +===== + +**Italiano** + +Per generare il pagamento di una ritenuta d'acconto: + +1. Aprire Fatturazione > Contabilità > Ritenuta d'acconto > Movimenti RdA. +2. Selezionare i movimenti di cui si vuole fare il pagamento +3. Cliccare su Azione > Crea movimento di pagamento +4. Nel popup, cliccare su Genera + +Verrà quindi visualizzato un 'Movimento di pagamento RdA' che rappresenta il pagamento delle ritenute selezionate al punto 2. + +Confermare il Movimento di pagamento RdA e compilare i campi in Impostazioni conto: + +* Data pagamento: la data in cui è stato effettuato il pagamento. +* Registro: il registro in cui verrà salvata la registrazione contabile. +* Conto: il conto della banca tramite il quale si farà il pagamento. + +Ad esempio: + +.. image:: https://raw.githubusercontent.com/OCA/l10n-italy/14.0/l10n_it_withholding_tax_payment/static/img/withholding_tax_move_payment_configuration_it.png + :alt: Configurazione movimento di pagamento RdA + +Creare la registrazione contabile cliccando su 'Crea movimento contabile': la registrazione creata sarà accessibile tramite il campo "Movimento contabile". + +**English** + +In order to generate a withholding tax payment: + +1. Open Accounting > Accounting > Withholding tax > WT Moves. +2. Select the transactions you want to pay for +3. Click Action > Create Payment Move +4. In the pop-up, click Generate + +A 'WT Payment Move' will then be displayed representing the payment of the withholding taxes selected in step 2. + +Confirm the RdA Payment Movement and fill in the fields in Account Setting: + +* Payment Date: The date the payment was made. +* Register: the journal where the journal entry will be saved. +* Account: the bank account through which the payment will be made. + +Eg: + +.. image:: https://raw.githubusercontent.com/OCA/l10n-italy/14.0/l10n_it_withholding_tax_payment/static/img/withholding_tax_move_payment_configuration.png + :alt: WT Payment Move configuration + + +Create the journal entry by clicking on 'Create Account Move': the created journal entry will be accessible through the "Account Move" field. + Bug Tracker =========== Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -84,6 +140,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/l10n-italy `_ project on GitHub. +This module is part of the `OCA/l10n-italy `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_it_withholding_tax_payment/__manifest__.py b/l10n_it_withholding_tax_payment/__manifest__.py index 3f68c10b80b2..aa3384c9ee26 100644 --- a/l10n_it_withholding_tax_payment/__manifest__.py +++ b/l10n_it_withholding_tax_payment/__manifest__.py @@ -5,7 +5,7 @@ { "name": "ITA - Ritenuta d'acconto - Pagamenti", "summary": "Gestisce le ritenute sulle fatture e sui pagamenti", - "version": "14.0.1.0.0", + "version": "14.0.1.0.1", "development_status": "Beta", "category": "Localization/Italy", "website": "https://github.com/OCA/l10n-italy", diff --git a/l10n_it_withholding_tax_payment/readme/DESCRIPTION.rst b/l10n_it_withholding_tax_payment/readme/DESCRIPTION.rst index fbf761f9fbbf..bdf6cebb8d36 100644 --- a/l10n_it_withholding_tax_payment/readme/DESCRIPTION.rst +++ b/l10n_it_withholding_tax_payment/readme/DESCRIPTION.rst @@ -1,7 +1,11 @@ **Italiano** -Gestisce le ritenute sulle fatture e sui pagamenti. +Per quanto riguarda la configurazione o l'utilizzo delle ritenute seguire le istruzioni indicate nel modulo `l10n_it_withholding_tax`. + +Questo modulo permette di tenere traccia del pagamento della ritenuta d'acconto. **English** -Manages the Italian withholding taxes on invoices and payments. +Regarding the configuration or use of withholding taxes, follow the instructions in the module `l10n_it_withholding_tax`. + +This module allows to keep track of the withholding tax payment. diff --git a/l10n_it_withholding_tax_payment/readme/USAGE.rst b/l10n_it_withholding_tax_payment/readme/USAGE.rst new file mode 100644 index 000000000000..42fa2bbbb268 --- /dev/null +++ b/l10n_it_withholding_tax_payment/readme/USAGE.rst @@ -0,0 +1,48 @@ +**Italiano** + +Per generare il pagamento di una ritenuta d'acconto: + +1. Aprire Fatturazione > Contabilità > Ritenuta d'acconto > Movimenti RdA. +2. Selezionare i movimenti di cui si vuole fare il pagamento +3. Cliccare su Azione > Crea movimento di pagamento +4. Nel popup, cliccare su Genera + +Verrà quindi visualizzato un 'Movimento di pagamento RdA' che rappresenta il pagamento delle ritenute selezionate al punto 2. + +Confermare il Movimento di pagamento RdA e compilare i campi in Impostazioni conto: + +* Data pagamento: la data in cui è stato effettuato il pagamento. +* Registro: il registro in cui verrà salvata la registrazione contabile. +* Conto: il conto della banca tramite il quale si farà il pagamento. + +Ad esempio: + +.. image:: ../static/img/withholding_tax_move_payment_configuration_it.png + :alt: Configurazione movimento di pagamento RdA + +Creare la registrazione contabile cliccando su 'Crea movimento contabile': la registrazione creata sarà accessibile tramite il campo "Movimento contabile". + +**English** + +In order to generate a withholding tax payment: + +1. Open Accounting > Accounting > Withholding tax > WT Moves. +2. Select the transactions you want to pay for +3. Click Action > Create Payment Move +4. In the pop-up, click Generate + +A 'WT Payment Move' will then be displayed representing the payment of the withholding taxes selected in step 2. + +Confirm the RdA Payment Movement and fill in the fields in Account Setting: + +* Payment Date: The date the payment was made. +* Register: the journal where the journal entry will be saved. +* Account: the bank account through which the payment will be made. + +Eg: + +.. image:: ../static/img/withholding_tax_move_payment_configuration.png + :alt: WT Payment Move configuration + + +Create the journal entry by clicking on 'Create Account Move': the created journal entry will be accessible through the "Account Move" field. diff --git a/l10n_it_withholding_tax_payment/static/description/index.html b/l10n_it_withholding_tax_payment/static/description/index.html index 9b6835b14283..4df7d0a76251 100644 --- a/l10n_it_withholding_tax_payment/static/description/index.html +++ b/l10n_it_withholding_tax_payment/static/description/index.html @@ -367,43 +367,85 @@

ITA - Ritenuta d’acconto - Pagamenti

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/l10n-italy Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/l10n-italy Translate me on Weblate Try me on Runbot

Italiano

-

Gestisce le ritenute sulle fatture e sui pagamenti.

+

Per quanto riguarda la configurazione o l’utilizzo delle ritenute seguire le istruzioni indicate nel modulo l10n_it_withholding_tax.

+

Questo modulo permette di tenere traccia del pagamento della ritenuta d’acconto.

English

-

Manages the Italian withholding taxes on invoices and payments.

+

Regarding the configuration or use of withholding taxes, follow the instructions in the module l10n_it_withholding_tax.

+

This module allows to keep track of the withholding tax payment.

Table of contents

+
+

Usage

+

Italiano

+

Per generare il pagamento di una ritenuta d’acconto:

+
    +
  1. Aprire Fatturazione > Contabilità > Ritenuta d’acconto > Movimenti RdA.
  2. +
  3. Selezionare i movimenti di cui si vuole fare il pagamento
  4. +
  5. Cliccare su Azione > Crea movimento di pagamento
  6. +
  7. Nel popup, cliccare su Genera
  8. +
+

Verrà quindi visualizzato un ‘Movimento di pagamento RdA’ che rappresenta il pagamento delle ritenute selezionate al punto 2.

+

Confermare il Movimento di pagamento RdA e compilare i campi in Impostazioni conto:

+
    +
  • Data pagamento: la data in cui è stato effettuato il pagamento.
  • +
  • Registro: il registro in cui verrà salvata la registrazione contabile.
  • +
  • Conto: il conto della banca tramite il quale si farà il pagamento.
  • +
+

Ad esempio:

+Configurazione movimento di pagamento RdA +

Creare la registrazione contabile cliccando su ‘Crea movimento contabile’: la registrazione creata sarà accessibile tramite il campo “Movimento contabile”.

+

English

+

In order to generate a withholding tax payment:

+
    +
  1. Open Accounting > Accounting > Withholding tax > WT Moves.
  2. +
  3. Select the transactions you want to pay for
  4. +
  5. Click Action > Create Payment Move
  6. +
  7. In the pop-up, click Generate
  8. +
+

A ‘WT Payment Move’ will then be displayed representing the payment of the withholding taxes selected in step 2.

+

Confirm the RdA Payment Movement and fill in the fields in Account Setting:

+
    +
  • Payment Date: The date the payment was made.
  • +
  • Register: the journal where the journal entry will be saved.
  • +
  • Account: the bank account through which the payment will be made.
  • +
+

Eg:

+WT Payment Move configuration +

Create the journal entry by clicking on ‘Create Account Move’: the created journal entry will be accessible through the “Account Move” field.

+
-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • Openforce
  • Odoo Italia Network
-

Contributors

+

Contributors

-

Other credits

+

Other credits

The development of this module has been financially supported by:

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/l10n-italy project on GitHub.

+

This module is part of the OCA/l10n-italy project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/l10n_it_withholding_tax_payment/static/img/withholding_tax_move_payment_configuration.png b/l10n_it_withholding_tax_payment/static/img/withholding_tax_move_payment_configuration.png new file mode 100644 index 0000000000000000000000000000000000000000..67a8ba448508b8dbf23d86b886fa615c79b47a0c GIT binary patch literal 11918 zcmcJVwDs}g6faJ(ASqT{i#q{|1a~jR-K{`zcXubaL(xKz;#%CbxWk+0j`z#` z1MZiTGtSvrdySDjGJbQe8KI&qgN06t4hIK^B_}JX1_uXE1iQCIMS)%Ge^l?lKH#0z zWW?cWCdd!r;Hcr`B*oM{3{JCs)z!6{H~dw9CI#U;z=^6cFy(|71#UhRCl^pvyy*E_d=Dfami%GN`zpMXM#B}@8&0c*9} zH&ceL4l|Lb*y6uO@42Z1rMz(e=dBx-i<_G~CA7{~!$xJg7il2?DFy8nLAF1YiyeaMSduYu@oJ!WR21{*aEnGB&;75wE68ZaisBH@~t=Ee@*{93ZBX8{+_gclp7xI`9mAWj;}D! z^aX3QyHoy35!tUs6Y+f+ezcC#)B{V|TYj-rWofWn+Q{zWSVjy~96%%@jI{)()4oru zq@|Mlci{5Svvrb#*RzPib;R6erL>{fl4pKM5D)yL!s^hygw%t*j!P>c!zY5ZrdOS) z<__R6F`#i-Z9jSS8gJVu=<%;dJhv0)y+GULpdp{SOX97F22Vu#TF?G?YE>9qs`4xV zbTJj0tBTY;@F+zj+|@WA-?ne>V_!mTRtdoV>n_mdTKV-kb&25W<2Apd9b0s#3?dFv zimf3*oMus|HP4uDV>)!)sHrz|9QqAV7UQZ;@ft*{;q?I(%$3R?=M?{lElJ_U<~n3I zufEgh+;xjrdUe#su==@yf%?dk$hD0SajvF2VpUj5?~fBPxRKtl9-t)=_N-io+30x4 zFNf%By8+)jEpBkBJ;57X{6wRvtG6Qo&zS=HH?+5&-}Q$Z>Bmkzcr9>7jKV=JjD4 z(;#MR?&Rrsid;1)F|mw^(@hIGJ}T~fyf$ln#X9%@M?tz#zTt1tbSnD$?U_?!!M~vY z8#6ip5EPU%p!wmr7|)Heq6d1_+K_8d!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rBRTk4^BGzFrwPrf#Ckb1|bDI6?=~#`E!$WH^VSt5$3haqt zRAa+eLPUgzO3sXUkkrB~OOp`}K5R6g=^raZ0&N5+93j0h&+~ubfoB1VPoLzCNIs>c z1vtU72R+iTSfHPs;E@bNp!sa3)o%pY%le}tDv`4PoYOKCne%fP5*w^Ud5^$g(-8m7 aAN^XHYwzd&5-ea2Cnu#WStD)~^#1_Uz2&d~ literal 0 HcmV?d00001 diff --git a/l10n_it_withholding_tax_payment/static/img/withholding_tax_move_payment_configuration_it.png b/l10n_it_withholding_tax_payment/static/img/withholding_tax_move_payment_configuration_it.png new file mode 100644 index 0000000000000000000000000000000000000000..f4ad1ae7a45d41d1cb1a1134cb5902d6bb4d3244 GIT binary patch literal 12402 zcmbumV{j#3{O+4f>Q>!Tb>2MP z)xCOkSM}=d=kr}pM<~ciAi?9pgMon|NdiTcz`(%KzSiwwp}&;)T|WG40q(3MAq-YC zg@5|B2~1K{NX0|%BF9%nMZIOmUorA`va|!7U(vbCO&}0=6pXF_S%x$eETaz+E~4!l zJ*vQOm~_zzAlYfcf9h4sbYZ^$B|MSaqsRr5=j7c;~PLqBehR{OX~4@mGe1w}3E0mEmLo|*$Txl+$2+-{_DXMQkj+XQV3LhN%|>Rq zW4ZJTGO={^RcV_XDLUz^QFIb%u^9k~cM>;V@Rn6u|6gZOfaBa(BS)o!^eoGA60!?i zcd*K0hP#im#^H^FYa~|X`*mh|OYosu5BnsDr9T3IO%lr;a3o#|U`N?skot!LLlX!3 z=aa7nyQakNOG4FS`&nl7fZC|VBs^g>pm^!}QC3;SC7Hh?i5*qAxA zCy3&MrG?Gv6o%eOudo@x>A8J(vFmfgW@YauPdUx3T~17VO@0m&qQpH(K%dh&eE9m- zWZ`N+A;Ry@9!nV8wP!ZOYV7O2QMl(qm-g>!cCMmu-3H#NQj=;E^S0ti$2WIJ3##)D z7j=-aXCj+#_2bcJmgTfYshf?Ai;NnG+YhH;>wL&o8IYUFr*0WY8mg3`+A8 z24+Zie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hnPsFN#vq0M`T7|pSK*-yOFN?r{ow3B$2nc33!^yS zNC(acj}l-HiDD1gjnI!IuB)`>{Fmp_dcXU>y>sW#Geni{3j8J0Y#a*7gP)FHE-(>k zQ_uksmZFrGx!;fs>@mO5Pp~E<{79`}aNN7+OEv_DWWfI!pDN%O$O%(HrUcG~OgpJ>6CUPur zpYfIJw7PWk9cv45QtCLwK;6&TM)e5&wUcaB*Dgw*rch#OSNT8GM9&Fek^O|K?o0V! z$io;u8G*XW8W>A?wI?9QYksu!z>q~5{BHe$ZILp^dAW-*0cDl-fRL1sHlxM?@yYr< z_T&J)wx!S0{QODW{McH<#iQ&Q_Y%hS*@&IKN5ICO;fb3mEDZp}2~Di^Y+vzqqxIwRc)4#8r&*d`vOaU*{gnebkfj1$ z>CbcIpFVvVuhVsfTcFH#D8)7e9Du@Jc#Mq67d_Jt<*RJkgG3%TcyDWQ%lBmhZz&Ew aA?WDT1w*~gg}#0w0FxAx6Ri<82>f3gvg1<# literal 0 HcmV?d00001 From e5ef40d56f06fcbcb0c85cca56ad4b8d60bdb7b0 Mon Sep 17 00:00:00 2001 From: Marco Colombo Date: Fri, 15 Apr 2022 11:12:29 +0200 Subject: [PATCH 17/20] [FIX] l10n_it_withholding_tax_payment: fix test tags --- l10n_it_withholding_tax_payment/__manifest__.py | 2 +- .../tests/test_withholding_tax_payment.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/l10n_it_withholding_tax_payment/__manifest__.py b/l10n_it_withholding_tax_payment/__manifest__.py index aa3384c9ee26..42bbe84284cd 100644 --- a/l10n_it_withholding_tax_payment/__manifest__.py +++ b/l10n_it_withholding_tax_payment/__manifest__.py @@ -5,7 +5,7 @@ { "name": "ITA - Ritenuta d'acconto - Pagamenti", "summary": "Gestisce le ritenute sulle fatture e sui pagamenti", - "version": "14.0.1.0.1", + "version": "14.0.1.0.2", "development_status": "Beta", "category": "Localization/Italy", "website": "https://github.com/OCA/l10n-italy", diff --git a/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py b/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py index 09c9252bd75a..23a79266bf12 100644 --- a/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py +++ b/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py @@ -1,11 +1,12 @@ # Copyright 2021 Simone Rubino - Agile Business Group # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo.tests import Form +from odoo.tests import Form, tagged from odoo.addons.account.tests.common import AccountTestInvoicingCommon +@tagged("post_install", "-at_install") class TestWithholdingTaxPayment(AccountTestInvoicingCommon): @classmethod def setup_withholding_tax(cls, company_data): From 94e36c2c9c1fe82987162ec5f1af82e3cec1d8ef Mon Sep 17 00:00:00 2001 From: Matjaz Mozetic Date: Fri, 31 Mar 2023 18:55:01 +0000 Subject: [PATCH 18/20] Translated using Weblate (Slovenian) Currently translated at 34.7% (16 of 46 strings) Translation: l10n-italy-14.0/l10n-italy-14.0-l10n_it_withholding_tax_payment Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_withholding_tax_payment/sl/ --- l10n_it_withholding_tax_payment/i18n/sl.po | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/l10n_it_withholding_tax_payment/i18n/sl.po b/l10n_it_withholding_tax_payment/i18n/sl.po index 2c45755e019e..7b952520a40d 100644 --- a/l10n_it_withholding_tax_payment/i18n/sl.po +++ b/l10n_it_withholding_tax_payment/i18n/sl.po @@ -9,15 +9,16 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-03-02 01:46+0000\n" -"PO-Revision-Date: 2018-03-02 01:46+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"PO-Revision-Date: 2023-03-31 21:24+0000\n" +"Last-Translator: Matjaz Mozetic \n" "Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" "Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" -"%100==4 ? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 4.14.1\n" #. module: l10n_it_withholding_tax_payment #: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment__account_id @@ -92,7 +93,7 @@ msgstr "Datum" #: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_withholding_tax_move_payment__display_name #: model:ir.model.fields,field_description:l10n_it_withholding_tax_payment.field_wizard_wt_move_payment_create__display_name msgid "Display Name" -msgstr "Prikazni naziv" +msgstr "Prikazani naziv" #. module: l10n_it_withholding_tax_payment #: selection:withholding.tax.move.payment,state:0 From c2f34b3bd8aaaff6bde7f07eded70613833e9db7 Mon Sep 17 00:00:00 2001 From: "matteo.tognini" Date: Mon, 25 Sep 2023 12:15:26 +0200 Subject: [PATCH 19/20] [IMP] l10n_it_withholding_tax_payment: pre-commit stuff --- l10n_it_withholding_tax_payment/i18n/it.po | 6 ------ .../odoo/addons/l10n_it_withholding_tax_payment | 1 + setup/l10n_it_withholding_tax_payment/setup.py | 6 ++++++ 3 files changed, 7 insertions(+), 6 deletions(-) create mode 120000 setup/l10n_it_withholding_tax_payment/odoo/addons/l10n_it_withholding_tax_payment create mode 100644 setup/l10n_it_withholding_tax_payment/setup.py diff --git a/l10n_it_withholding_tax_payment/i18n/it.po b/l10n_it_withholding_tax_payment/i18n/it.po index c90c5e9746a0..138d72e0ab02 100644 --- a/l10n_it_withholding_tax_payment/i18n/it.po +++ b/l10n_it_withholding_tax_payment/i18n/it.po @@ -223,12 +223,6 @@ msgstr "" msgid "WT move already paid! - {} - {} - {}" msgstr "Movimento RdA già pagato - {} - {} - {}" -#. module: l10n_it_withholding_tax_payment -#: code:addons/l10n_it_withholding_tax_payment/models/withholding_tax.py:140 -#, python-format -msgid "WT move already paid! - {} - {} - {}" -msgstr "" - #. module: l10n_it_withholding_tax_payment #: code:addons/l10n_it_withholding_tax_payment/models/withholding_tax.py:80 #, python-format diff --git a/setup/l10n_it_withholding_tax_payment/odoo/addons/l10n_it_withholding_tax_payment b/setup/l10n_it_withholding_tax_payment/odoo/addons/l10n_it_withholding_tax_payment new file mode 120000 index 000000000000..1d4468bc8368 --- /dev/null +++ b/setup/l10n_it_withholding_tax_payment/odoo/addons/l10n_it_withholding_tax_payment @@ -0,0 +1 @@ +../../../../l10n_it_withholding_tax_payment \ No newline at end of file diff --git a/setup/l10n_it_withholding_tax_payment/setup.py b/setup/l10n_it_withholding_tax_payment/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/l10n_it_withholding_tax_payment/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From 7d53ca313a73d18721ae75973520b3476a1428c2 Mon Sep 17 00:00:00 2001 From: "matteo.tognini" Date: Mon, 25 Sep 2023 12:15:47 +0200 Subject: [PATCH 20/20] [MIG] l10n_it_withholding_tax_payment: Migration to 16.0 --- .../__manifest__.py | 2 +- .../models/withholding_tax.py | 6 ++--- .../readme/CONTRIBUTORS.rst | 1 + .../security/security.xml | 22 +++++++-------- .../tests/test_withholding_tax_payment.py | 14 +++++++--- .../views/withholding_tax.xml | 27 ++++++++++++++----- .../wizard/create_move_payment.py | 6 ++--- 7 files changed, 49 insertions(+), 29 deletions(-) diff --git a/l10n_it_withholding_tax_payment/__manifest__.py b/l10n_it_withholding_tax_payment/__manifest__.py index 42bbe84284cd..197f06b2758e 100644 --- a/l10n_it_withholding_tax_payment/__manifest__.py +++ b/l10n_it_withholding_tax_payment/__manifest__.py @@ -5,7 +5,7 @@ { "name": "ITA - Ritenuta d'acconto - Pagamenti", "summary": "Gestisce le ritenute sulle fatture e sui pagamenti", - "version": "14.0.1.0.2", + "version": "16.0.1.0.1", "development_status": "Beta", "category": "Localization/Italy", "website": "https://github.com/OCA/l10n-italy", diff --git a/l10n_it_withholding_tax_payment/models/withholding_tax.py b/l10n_it_withholding_tax_payment/models/withholding_tax.py index f63069d8efcb..e60bfd5e1be7 100644 --- a/l10n_it_withholding_tax_payment/models/withholding_tax.py +++ b/l10n_it_withholding_tax_payment/models/withholding_tax.py @@ -38,7 +38,7 @@ def check_unlink(self): ) ) - super().check_unlink() + return super().check_unlink() class WithholdingTaxMovePayment(models.Model): @@ -69,8 +69,8 @@ def _compute_total(self): required=True, default=lambda self: self.env.company, ) - name = fields.Char("Name") - date = fields.Date(string="Date") + name = fields.Char() + date = fields.Date() date_payment = fields.Date("Payment Date") date_start = fields.Date("Start Date", readonly=True) date_stop = fields.Date("Stop Date", readonly=True) diff --git a/l10n_it_withholding_tax_payment/readme/CONTRIBUTORS.rst b/l10n_it_withholding_tax_payment/readme/CONTRIBUTORS.rst index cc67fa1833a3..d63185a2059b 100644 --- a/l10n_it_withholding_tax_payment/readme/CONTRIBUTORS.rst +++ b/l10n_it_withholding_tax_payment/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * Alessandro Camilli * Lorenzo Battistini * Matteo Bilotta +* Nextev diff --git a/l10n_it_withholding_tax_payment/security/security.xml b/l10n_it_withholding_tax_payment/security/security.xml index 1fdc258a4250..6a71d67ee484 100644 --- a/l10n_it_withholding_tax_payment/security/security.xml +++ b/l10n_it_withholding_tax_payment/security/security.xml @@ -2,17 +2,13 @@ - - - - - Withholding Tax Payment Move - - - ['|',('company_id','=',False),('company_id','in',company_ids)] - - - + + + Withholding Tax Payment Move + + + ['|',('company_id','=',False),('company_id','in',company_ids)] + diff --git a/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py b/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py index 23a79266bf12..80902511ac89 100644 --- a/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py +++ b/l10n_it_withholding_tax_payment/tests/test_withholding_tax_payment.py @@ -39,7 +39,9 @@ def setup_withholding_data(cls, company_data): """ cls.set_allowed_companies(company_data["company"]) wh_tax = cls.setup_withholding_tax(company_data) - invoice = cls.init_invoice("in_invoice", amounts=[100]) + invoice = cls.init_invoice( + "in_invoice", amounts=[100], company=company_data["company"] + ) invoice_form = Form(invoice) with invoice_form.invoice_line_ids.edit(0) as line_form: line_form.invoice_line_tax_wt_ids.clear() @@ -56,7 +58,9 @@ def set_allowed_companies(cls, company): """ context = {"allowed_company_ids": company.ids} if "allowed_company_ids" in cls.env.context: - cls.env.context.pop("allowed_company_ids") + ctx = dict(cls.env.context) + ctx.pop("allowed_company_ids") + cls.env.context = ctx cls.env.context = dict(**cls.env.context, **context) @classmethod @@ -91,7 +95,11 @@ def generate_withholding_tax_payment(self, invoice): ) wh_tax_payment_wizard = ( self.env["wizard.wt.move.payment.create"] - .with_context(active_model=wh_tax_move._name, active_ids=wh_tax_move.ids) + .with_context( + active_model=wh_tax_move._name, + active_ids=wh_tax_move.ids, + wt_move_ids=wh_tax_move.ids, + ) .create({}) ) wh_tax_payment_action = wh_tax_payment_wizard.generate() diff --git a/l10n_it_withholding_tax_payment/views/withholding_tax.xml b/l10n_it_withholding_tax_payment/views/withholding_tax.xml index b708896e084c..350e4cd03791 100644 --- a/l10n_it_withholding_tax_payment/views/withholding_tax.xml +++ b/l10n_it_withholding_tax_payment/views/withholding_tax.xml @@ -37,7 +37,7 @@ withholding.tax.move.payment.view.tree withholding.tax.move.payment - + @@ -72,6 +72,7 @@ string="Create Account Move" type="object" attrs="{'invisible': ['|', ('state', '!=', 'confirmed'), ('move_id', '!=', False)]}" + class="oe_highlight" /> +
+

+
- - - - - + + + + diff --git a/l10n_it_withholding_tax_payment/wizard/create_move_payment.py b/l10n_it_withholding_tax_payment/wizard/create_move_payment.py index 40bb19c4d387..088e6bf2e5e7 100644 --- a/l10n_it_withholding_tax_payment/wizard/create_move_payment.py +++ b/l10n_it_withholding_tax_payment/wizard/create_move_payment.py @@ -25,10 +25,10 @@ def _default_wt_moves(self): def generate(self): wt_move_payment_obj = self.env["withholding.tax.move.payment"] wt_payment = wt_move_payment_obj.generate_from_moves(self.wt_move_ids) - view = self.env["ir.model.data"].get_object_reference( - "l10n_it_withholding_tax_payment", "view_withholding_move_payment_form" + view = self.env["ir.model.data"]._xmlid_lookup( + "l10n_it_withholding_tax_payment.view_withholding_move_payment_form" ) - view_id = view[1] or False + view_id = view[2] or False return { "name": _("Withholding Tax Payment"),