[16.0] [MIG] l10n_it_withholding_tax#2998
Merged
OCA-git-bot merged 74 commits intoDec 6, 2022
Merged
Conversation
…aturity date [ADD] author [FIX] copyright & description [IMP] l10n_it_withholding_tax - description
[fix] descriptions [fix] dependency [fix] config [fix] config view [fix] using invoice partner in reconcile [imp] using tax authority partner [add] tests first version [imp] tests [imp] tests [ADD] field help [fix] using right date and period when paying
moves all modules into a __unported__ directory
FIX copyright headers FIX PEP8 IMP description IMP description and copyright FIX PEP8
Creation of WT statement Wt moves creation Quote for payments
[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
[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
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
- Create a USD bank journal - Add 2 rates to USD currency: yesterday with rate 0.8; today with rate 0.9 - Create an USD invoice with date = yesterday - Create a bank statement (on USD bank account) today registering a full payment and try to reconcile Get "Valore di credito o debito errato nella registrazione contabile"
check wt_moves Added rules Show payment move after generation from wt moves More check for payment unreconciliation Company readonly in payment wt Company readonly in payment wt Fix conflict with translation
* [FIX] Travis check and readonly on company_id * [FIX] Travis check and readonly on company_id
odoo/tools/translate.py", line 539, in next
raise Exception("malformed file: bad line: %s" % line)
Exception: malformed file: bad line: # * l10n_it_withholding_tax
Restore l10n_it_withholding_tax_payment/i18n/lt.po
FIX l10n_it_withholding_tax: invoicing user can't open nor create invoices with wh tax
Without the possibility to avoid bank journal, Withholding Tax Statement would appear in Accounting Dashboard / Bank Reconciliation under 'Minus Unreconciled Statement Lines' FIX typo Withhoulding
…is-ci.org/OCA/l10n-italy/jobs/394011315#L2844-L2849 (OCA#517) [FIX] Remove all po files containing duplicate terms (except it.po) in order to get Travis green after weblate migration (OCA#519) The problem was introduced by a manual manipulation of the .po files at OCA@949a109#diff-b06d4f56026a0366ca7fdd91f96ddf27
… date competence equal to payment date (and not invoice date), while date maturity shall be computed based from invoice payment date (OCA#518)
Currently translated at 100.0% (85 of 85 strings) Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_withholding_tax Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_withholding_tax/it/
WARNING openerp_test odoo.addons.base.ir.ir_ui_view: Error-prone use of @Class in view view.withholding.invoice.supplier.form (): use the hasclass(*classes) function to filter elements by their classes
…opy) suffix to code
… has no attribute 'id'"
… has no attribute 'date'"
…vendor bills from Bills tree view
Steps to reproduce the behavior:
* create and confirm a bill invoice with withholding tax
* select it from the Bills tree view
* click on Register Payment button
* click on Create Payment button
The following error is raised:
Traceback (most recent call last):
File "/home/tafaru/dev/envs/odoo14/l10n-italy/l10n_it_withholding_tax/tests/test_withholding_tax.py", line 305, in test_create_payments
payment_register.with_context(default_move_type="in_invoice").action_create_payments()
File "/home/tafaru/dev/envs/odoo14/odoo/addons/account/wizard/account_payment_register.py", line 668, in action_create_payments
payments = self._create_payments()
File "/home/tafaru/dev/envs/odoo14/odoo/addons/account/wizard/account_payment_register.py", line 664, in _create_payments
self._reconcile_payments(to_process, edit_mode=edit_mode)
File "/home/tafaru/dev/envs/odoo14/odoo/addons/account/wizard/account_payment_register.py", line 627, in _reconcile_payments
.filtered_domain([('account_id', '=', account.id), ('reconciled', '=', False)])\
File "/home/tafaru/dev/envs/odoo14/odoo/addons/account_edi/models/account_move.py", line 427, in reconcile
res = super().reconcile()
File "/home/tafaru/dev/envs/odoo14/odoo/addons/account/models/account_move.py", line 4838, in reconcile
partials = self.env['account.partial.reconcile'].create(sorted_lines._prepare_reconciliation_partials())
File "<decorator-gen-188>", line 2, in create
File "/home/tafaru/dev/envs/odoo14/odoo/odoo/api.py", line 329, in _model_create_single
return self.browse().concat(*(create(self, vals) for vals in arg))
File "/home/tafaru/dev/envs/odoo14/odoo/odoo/api.py", line 329, in <genexpr>
return self.browse().concat(*(create(self, vals) for vals in arg))
File "/home/tafaru/dev/envs/odoo14/l10n-italy/l10n_it_withholding_tax/models/account.py", line 100, in create
reconcile.generate_wt_moves()
File "/home/tafaru/dev/envs/odoo14/l10n-italy/l10n_it_withholding_tax/models/account.py", line 162, in generate_wt_moves
wt_move.generate_account_move()
File "/home/tafaru/dev/envs/odoo14/l10n-italy/l10n_it_withholding_tax/models/withholding_tax.py", line 440, in generate_account_move
move = self.env["account.move"].create(move_vals)
File "<decorator-gen-167>", line 2, in create
File "/home/tafaru/dev/envs/odoo14/odoo/odoo/api.py", line 347, in _model_create_multi
return create(self, [arg])
File "/home/tafaru/dev/envs/odoo14/odoo/addons/account/models/account_move.py", line 1978, in create
vals_list = self._move_autocomplete_invoice_lines_create(vals_list)
File "/home/tafaru/dev/envs/odoo14/odoo/addons/account/models/account_move.py", line 1914, in _move_autocomplete_invoice_lines_create
vals = self_ctx._add_missing_default_values(vals)
File "/home/tafaru/dev/envs/odoo14/odoo/odoo/models.py", line 1854, in _add_missing_default_values
defaults = self.default_get(list(missing_defaults))
File "/home/tafaru/dev/envs/odoo14/odoo/odoo/models.py", line 1309, in default_get
defaults[name] = field.default(self)
File "/home/tafaru/dev/envs/odoo14/odoo/addons/account/models/account_move.py", line 124, in _get_default_currency
journal = self._get_default_journal()
File "/home/tafaru/dev/envs/odoo14/odoo/addons/account/models/account_move.py", line 108, in _get_default_journal
journal_type=journal.type,
odoo.exceptions.UserError: Cannot create an invoice of type in_invoice with a journal having general as type.
Currently translated at 93.8% (107 of 114 strings) Translation: l10n-italy-14.0/l10n-italy-14.0-l10n_it_withholding_tax Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_withholding_tax/it/
473a6c5 to
e91d7fe
Compare
marco-marchiori
approved these changes
Nov 29, 2022
marco-marchiori
left a comment
There was a problem hiding this comment.
Functional review:
configured new withholding tax ("1040", rate 20%), and a specific fiscal position for a supplier
entered an invoice
- correctly recognized the supplier
- correctly withheld 20%
- whttx reported into statements
- whttx reported into moves
tafaRU
approved these changes
Dec 2, 2022
tafaRU
left a comment
Member
There was a problem hiding this comment.
Review tecnica: solo un commento, non bloccante, il resto LGTM 👍
Contributor
|
This PR has the |
Co-authored-by: andreapiovesana <andrea.m.piovesana@gmail.com>
e91d7fe to
6d6c9d6
Compare
Member
|
/ocabot merge nobump |
Contributor
|
On my way to merge this fine PR! |
Contributor
|
Congratulations, your PR was merged at 4667b4a. Thanks a lot for contributing to OCA. ❤️ |
Closed
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.