Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][WIP] l10n_it_reverse_charge migration and partial refactoring #2128

Closed
wants to merge 86 commits into from
Closed

[14.0][WIP] l10n_it_reverse_charge migration and partial refactoring #2128

wants to merge 86 commits into from

Conversation

dcorio
Copy link
Contributor

@dcorio dcorio commented Feb 23, 2021

Lavoro di porting a versione 14 e refactoring parziale per rimuovere il metodo di integrazione iva

--
Confermo di aver firmato il CLA https://odoo-community.org/page/cla e di aver letto le linee guida su https://odoo-community.org/page/contributing

dcorio and others added 30 commits February 22, 2021 17:41
[IMP] pep8

[FIX] typos and pep8

[IMP] l10n_it_reverse_charge refactoring

[ADD] account_move_skip

[IMP] skip expr

[IMP] i18n

[IMP] tax mapping

[IMP] mandatory fields

[IMP] autohide if == 0

[REM] pdb

[IMP] no need to specify expr

[FIX] write if no credit/debit
[ADD] l10n_it_reverse_charge: add initial draft of README

[ADD] l10n_it_reverse_charge: add note about 'Integrazione IVA'

[ADD] l10n_it_reverse_charge: add check if there is default credit account defined on Self Invoice Payment Journal

[ADD] l10n_it_reverse_charge: set rc on invoice.line according to RC Type defined on fiscal position

[FIX] l10n_it_reverse_charge: rename tax_src_id and tax_dest_id fields to be more consinstent and easier to understand their purpose

[IMP] l10n_it_reverse_charge: adapt to latest OCA guidelines

[FIX] l10n_it_reverse_charge: fix 'WARNING test_reverse_charge openerp.modules.loading: The model account.rc.type has no access rules'

[ADD] l10n_it_reverse_charge
Handle invoice supplier cancellation and reopening for method 'selfinvoice':
* cancellation: both supplier invoice and selfinvoice are cancelled
* reopening: data on existing selfinvoice are copied to supplier invoice

[FIX] l10n_it_reverse_charge: fix WARNING account.invoice.line.create() with unknown fields: uom_id

[IMP] l10n_it_reverse_charge: improve README

[IMP] l10n_it_reverse_charge: add more comments for making code easier to understand

[IMP] l10n_it_reverse_charge: add help to tax_ids field

[FIX] l10n_it_reverse_charge:
* do not copy rc_self_invoice_id
* check if inv has rc_self_invoice_id before to proceed with its cancellation

[FIX] l10n_it_reverse_charge: avoid product from self invoice lines to better handle related stats

[ADD] 8.0-l10n_it_reverse_charge: copy self_invoice_text to self invoice name
[W7910(wrong-tabs-instead-of-spaces), ]  Use wrong tabs indentation instead of four spaces

FIX screenshots

FIX allow to use and compute RC field in invoice line form pop up

l10n_it_reverse_charge ADD "With additional supplier self invoice"
to enable the creation of an additional supplier self
invoice. This is tipically used for extraUE suppliers,
in order to show, in supplier register, an invoice to the
specified partner (tipically, my company), instead of the
extraUE partner

Also FIX
ValueError: "local variable 'tax_code_id' referenced before assignment" while evaluating
u'invoice_validate()'
when tax mapping not found
FIX invoice_line_tax_ids field
…nvoice_draft due to odoo/odoo@bc8d5db (#433)

In this way both invoices are again set as draft.
Currently translated at 100.0% (55 of 55 strings)

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_reverse_charge
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_reverse_charge/it/
…ated from PO

[FIX] l10n_it_reverse_charge: Assign RC flag only to supplier invoices

[FIX] l10n_it_reverse_charge: Assign RC flag when vendor bill is created from PO
Fixes the following usecase:

0. Install Purchase
1. Set Reverse Charge type for a new fiscal position _fp_rc_
2. Assign _fp_rc_ to a new partner _partner_rc_
3. Create a new PO with one line for _partner_rc_, confirm, receive the products
4. From the button in the created PO, create a new vendor bill

Before this commit:
RC flag is not set in the line of the created invoice

After this commit:
RC flag is set in the line of the created invoice

[FIX] l10n_it_reverse_charge: Assign RC flag when vendor bill is populated with partner_id and then purchase_id
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_reverse_charge
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_reverse_charge/
Otherwise in case payment term such as 15/30 days the autoinvoice won't be payed at all.
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_reverse_charge
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_reverse_charge/
… between amount_tax and amount shown on payments_widget
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_reverse_charge
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_reverse_charge/
Also fix extra UE case

FIX l10n_it_reverse_charge: setting discount in supplier invoice would produce a wrong self invoice

REF reconcile_rc_invoice to increase performance.
Writing company_id would produce recomputation of every account.move.line linked to accounts involved in journal entry to be created.
In case of thousands or milions of move lines, this would last hours
@dcorio
Copy link
Contributor Author

dcorio commented May 7, 2021

@As400it devo scriverlo nel readme. il registro usato non deve essere di tipo varie, ma di tipo banca

@Borruso
Copy link
Contributor

Borruso commented May 7, 2021

l10n_it_reverse_charge/security/reverse_charge_security.xml

Adesso:
['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
Fixato:
['|',('company_id','=',False),('company_id','in',company_ids)]

Inoltre se data è noupdate=1 dovresti scrivere la migration: https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-13.0#tasks-to-do-in-the-migration

@SimoneVagile
Copy link
Contributor

@dcorio #2310

@SimoRubi
Copy link
Member

Questa si può chiudere in favore di #2310 ?

@dcorio dcorio closed this Jun 14, 2021
@dcorio
Copy link
Contributor Author

dcorio commented Jun 14, 2021

@SimoRubi certamente, grazie per aver preso in carico il lavoro

TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jun 18, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jun 18, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jun 18, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jul 2, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jul 2, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jul 9, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jul 9, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jul 9, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jul 9, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jul 17, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jul 20, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jul 30, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jul 30, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Aug 6, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Aug 20, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Sep 3, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Sep 17, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Oct 1, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Oct 8, 2021
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Oct 15, 2021
TheMule71 added a commit to TheMule71/l10n-italy that referenced this pull request Jan 21, 2022
TheMule71 added a commit to TheMule71/l10n-italy that referenced this pull request Jan 21, 2022
TheMule71 added a commit to odoo-italia/l10n-italy that referenced this pull request Jun 29, 2022
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.