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

[MIG] l10n_it_account_stamp: Migrazione a 18.0 #4373

Open
wants to merge 44 commits into
base: eau-de-merge
Choose a base branch
from

Conversation

primes2h
Copy link
Contributor

No description provided.

sergiocorato and others added 30 commits September 12, 2024 11:24
[FIX] clean

[FIX] clean

[FIX] pep8

[IMP] use tax obj instead of tax code

[FIX] icon path

[FIX] get product with lang context

[FIX] translation

[FIX] product name

[FIX] compute after unlink of invoice line
…OCA#818)

This is needed as stamp line should be under VAT exemption
Currently translated at 100.0% (29 of 29 strings)

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_stamp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_stamp/it/
[FIX] extra blank line
[FIX] typos in source strings
[IMP] readme, adapt to v.12.0 and add italian section
[IMP] __manifest__.py, set ITA name and summary
Currently translated at 100.0% (29 of 29 strings)

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_stamp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_stamp/it/
Currently translated at 100.0% (29 of 29 strings)

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_stamp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_stamp/it/
[FIX] 2 euro image file
[IMP] image on invoice to display stamp application
      and revert checkbox to previous position
[FIX] show button in draft edit mode only
Currently translated at 100.0% (30 of 30 strings)

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_stamp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_stamp/it/
Currently translated at 100.0% (30 of 30 strings)

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_stamp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_stamp/it/
Currently translated at 100.0% (30 of 30 strings)

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_stamp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_stamp/it/
Test case:

 - Create a product setting VAT "fuori campo" (price 1)
 - Configure "Tax Stamp 2 euro" product to apply to "fuori campo"
 - Create an invoice, add a line selecting the previously created product and setting unit price = 100

tax_stamp field stays false
Currently translated at 100.0% (31 of 31 strings)

Translation: l10n-italy-14.0/l10n-italy-14.0-l10n_it_account_stamp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_account_stamp/it/
mymage and others added 12 commits September 12, 2024 14:47
Currently translated at 100.0% (30 of 30 strings)

Translation: l10n-italy-16.0/l10n-italy-16.0-l10n_it_account_stamp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_account_stamp/it/
…lement '<xpath expr=//p[@t-if='o.fiscal_position_id.note']>' cannot be located in parent view
Currently translated at 100.0% (31 of 31 strings)

Translation: l10n-italy-16.0/l10n-italy-16.0-l10n_it_account_stamp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_account_stamp/it/
…singleton

After odoo/odoo@28004b7#diff-a97352a94802dc006fe1dad7587741ccc6e8d9edf5eb70110a1087c52dde2759R97-R109
test_amount_total_changing_currency fails with the following error:

Traceback (most recent call last):
  File "/__w/l10n-italy/l10n-italy/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py", line 93, in test_amount_total_changing_currency
    invoice_form = Form(invoice)
  File "/opt/odoo/odoo/tests/common.py", line 1977, in __init__
    assert recordp['id'], "editing unstored records is not supported"
  File "/opt/odoo/odoo/models.py", line 5897, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/opt/odoo/odoo/fields.py", line 5065, in __get__
    raise ValueError("Expected singleton: %s" % record)
ValueError: Expected singleton: account.move(230, 236)

and test_keep_lines_description fails with the following error:

Traceback (most recent call last):
  File "/__w/l10n-italy/l10n-italy/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py", line 73, in test_keep_lines_description
    self.assertEqual(len(invoice), 1)
AssertionError: 2 != 1

and test_post_invoicing fails with the following error:

Traceback (most recent call last):
  File "/__w/l10n-italy/l10n-italy/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py", line 55, in test_post_invoicing
    self.assertEqual(len(invoice_ids), 1)
AssertionError: 2 != 1
Steps:
 - Configure 2 companies
   - Company 1 - No tax stamp applied in the settings
   - Company 2 - Tax stamp applied in the settings
 - Activate "Synchronize invoices/bills" under "Inter-Company Transactions" in "General Settings" (enterprise feature)
 - From Company 1, create an invoice to Company 2 and try to "Confirm" the invoice

Get "Missing tax stamp product in company settings"

Expected behavior for Company 1 (invoice):
- Since no taxstamp exists in settings for Company 1 and "Apply tax stamp" is FALSE on the invoice itself - there should be no error "Missing tax stamp".
Expected behavior for Company 2 (bill):
- Since taxstamp applied in the settings, it should be correctly processed.
If stamp line can be added (invoice in draft): show button to add stamp line.
If stamp line can't be added (invoice not in draft): show message explaining why it can't be added.
If stamp line has already been added: show message saying it has already been added (useful if invoice has many lines).
Button and messages update live while updating the invoice.
Better messages to user for charging stamp to customer

Co-authored-by:  Simone Rubino <[email protected]>
Currently translated at 100.0% (35 of 35 strings)

Translation: l10n-italy-16.0/l10n-italy-16.0-l10n_it_account_stamp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_account_stamp/it/
@primes2h
Copy link
Contributor Author

primes2h commented Sep 13, 2024

@SirAionTech
per qualche strano motivo (forse il cambio al volo da master a eau-de-merge?) non riesco a aprire una PR sopra la tua #4369

TODO: script di migrazione

@primes2h
Copy link
Contributor Author

primes2h commented Sep 17, 2024

@SirAionTech per qualche strano motivo (forse il cambio al volo da master a eau-de-merge?) non riesco a aprire una PR sopra la tua #4369

TODO: script di migrazione

Aggiunti in de646a5 (da testare).

@SirAionTech
Copy link
Contributor

@SirAionTech per qualche strano motivo (forse il cambio al volo da master a eau-de-merge?) non riesco a aprire una PR sopra la tua #4369
TODO: script di migrazione

Aggiunti in de646a5 (da testare).

Se aspettiamo di poter testare gli script di migrazione per mergiare diventiamo vecchi perché potrebbero volerci mesi prima che Odoo o OpenUpgrade abbiano la migrazione per account.
Potresti mettere una nota nella roadmap così intanto potremmo mergiare il modulo quando è a posto, cosa ne dici?

@primes2h primes2h force-pushed the 18.0-mig-l10n_it_account_stamp branch from de646a5 to 7f24e90 Compare September 17, 2024 14:56
@primes2h
Copy link
Contributor Author

@SirAionTech per qualche strano motivo (forse il cambio al volo da master a eau-de-merge?) non riesco a aprire una PR sopra la tua #4369
TODO: script di migrazione

Aggiunti in de646a5 (da testare).

Se aspettiamo di poter testare gli script di migrazione per mergiare diventiamo vecchi perché potrebbero volerci mesi prima che Odoo o OpenUpgrade abbiano la migrazione per account. Potresti mettere una nota nella roadmap così intanto potremmo mergiare il modulo quando è a posto, cosa ne dici?

Chiaro, il "da testare" l'ho messo solo come promemoria, per me possiamo fare il merge anche subito dopo la review.
P.S.: ho comunque aggiunto una nota anche in ROADMAP.

@primes2h primes2h force-pushed the 18.0-mig-l10n_it_account_stamp branch from 7f24e90 to e3a7d0e Compare September 23, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.