Skip to content

[16.0] [MIG] l10n_it_withholding_tax#2998

Merged
OCA-git-bot merged 74 commits into
OCA:16.0from
TheMule71:16.0-mig-l10n_it_withholding_tax
Dec 6, 2022
Merged

[16.0] [MIG] l10n_it_withholding_tax#2998
OCA-git-bot merged 74 commits into
OCA:16.0from
TheMule71:16.0-mig-l10n_it_withholding_tax

Conversation

@TheMule71

Copy link
Copy Markdown
Contributor

No description provided.

eLBati and others added 30 commits November 2, 2022 21:25
…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
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
FIX l10n_it_withholding_tax menu (OCA#403)

unusable taxes menu with odoo enterprise or web_responsive

FIX l10n_it_withholding_tax (OCA#416)

Gli oggetti withholding.tax.move, withholding.tax.statement e withholding.tax.move.payment si possono eliminare dalla vista elendo dei relativi menu
- 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
SimoRubi and others added 12 commits November 10, 2022 15:06
…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/
@TheMule71 TheMule71 force-pushed the 16.0-mig-l10n_it_withholding_tax branch from 473a6c5 to e91d7fe Compare November 10, 2022 14:06

@marco-marchiori marco-marchiori left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 tafaRU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review tecnica: solo un commento, non bloccante, il resto LGTM 👍

Comment thread l10n_it_withholding_tax/models/account.py Outdated
@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Co-authored-by: andreapiovesana <andrea.m.piovesana@gmail.com>
@TheMule71 TheMule71 force-pushed the 16.0-mig-l10n_it_withholding_tax branch from e91d7fe to 6d6c9d6 Compare December 6, 2022 09:10
@tafaRU

tafaRU commented Dec 6, 2022

Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-2998-by-tafaRU-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 2ee8bd8 into OCA:16.0 Dec 6, 2022
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 4667b4a. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.