Skip to content

Conversation

micheledic
Copy link
Contributor

No description provided.

@micheledic micheledic force-pushed the 18.0_mig_l10n_it_financial_statements_report branch 2 times, most recently from e1793e5 to 04d7fb0 Compare June 3, 2025 06:52
@micheledic micheledic marked this pull request as draft June 3, 2025 07:10
@micheledic micheledic force-pushed the 18.0_mig_l10n_it_financial_statements_report branch from 04d7fb0 to 78694fe Compare June 3, 2025 08:35
@micheledic micheledic marked this pull request as ready for review June 3, 2025 08:47
@micheledic
Copy link
Contributor Author

Ho introdotto con questa PR anche un metodo per il campo account_ids che sulla 18.0 restituisce "cannot be searchable" Issue OCA/account-financial-reporting#1306
Lo stesso l'ho proposto sul modulo originario, quindi nel caso venisse approvato tolgo e ripunto ad account_ids
OCA/account-financial-reporting#1327

@micheledic micheledic force-pushed the 18.0_mig_l10n_it_financial_statements_report branch 3 times, most recently from addc917 to 2555cb4 Compare June 3, 2025 09:15
Copy link
Member

@eLBati eLBati left a comment

Choose a reason for hiding this comment

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

Grazie!

<t t-set="company" t-value="o.company_id" />
<link
href="/account_financial_report/static/src/css/report.css"
href="/l10n_it_financial_statements_report/static/src/css/report.css"
Copy link
Member

Choose a reason for hiding this comment

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

Come mai non usiamo più quello di account_financial_report?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

il file scss di account_financial_report viene incluso solo nel bundle assets_backend , stampando il pdf non si renderizza correttamente in quanto non è nel bundle report_assets_common e per procedere comunque alla migrazione ho incluso questo report nel modulo

Copy link
Contributor

Choose a reason for hiding this comment

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

Meglio continuare a usare i file scss di account_financial_report invece di duplicare anche qui lo stesso file.
Per farlo funzionare hanno incluso i bundle del backend nel report nella migrazione OCA/account-financial-reporting@01f22b8:

    <template id="account_financial_report.html_container">
        <t t-call-assets="web.assets_backend" />
        <t t-set="body_classname" t-value="'container'" />

(da https://github.com/OCA/account-financial-reporting/blob/69ec629b8c70640b137a45d012bb2befa502d6bc/account_financial_report/report/templates/layouts.xml#L3-L5)

Non dico che mi piaccia come soluzione, ma è meglio che copiare quello stesso file in questo modulo.

Copy link
Contributor

Choose a reason for hiding this comment

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

Per il css avevo già provato a usare <t t-call="account_financial_report.html_container">

ma non viene proprio stampato il bundle asset backend. Ho verificato proprio l'html generato che viene poi passato a wkhtml e c'è solo report asset bundle

Prova a fare come è stato fatto nel commit di migrazione che ti ho linkato:

-        <link
-            href="/account_financial_report/static/src/css/report_html.css"
-            rel="stylesheet"
-        />
+        <t t-call-assets="web.assets_backend" />

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@monen17 https://github.com/OCA/account-financial-reporting/pull/1366/files a quanto pare cambieranno tornando a com'era, effettivamente il css di financial_report rompe il css in giro per odoo

>
<div>
<!--invisible="[('not_only_one_unaffected_earnings_account', '=', False)]" -->

Copy link
Member

Choose a reason for hiding this comment

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

Non serve più?

Copy link
Contributor Author

@micheledic micheledic Jun 4, 2025

Choose a reason for hiding this comment

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

mia svista, ripristinato sia questo che gli altri. C'è il boolean nella nuova versione ma il valore è l'opposto dell'altro

"account.account", compute="_compute_current_account_ids"
)

def _compute_current_account_ids(self):
Copy link
Member

Choose a reason for hiding this comment

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

Secondo me possiamo lasciare le modifiche in OCA/account-financial-reporting#1327 e far dipendere questa (#4789) da quella (OCA/account-financial-reporting#1327)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Va bene, solo che non so quando verrà mergiata la PR su financial_report . Semmai una volta fatto il giro che tutto funziona, appena la mergiano punto a quel campo e tolgo da qui.
Alla fine la compute è la stessa , quindi funzionerà uguale la computazione dei conti

Copy link
Contributor

Choose a reason for hiding this comment

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

@eLBati approvatela in 2-3 così costringiamo i maintainers a rispondere

Copy link
Contributor

Choose a reason for hiding this comment

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

Secondo me possiamo lasciare le modifiche in OCA/account-financial-reporting#1327 e far dipendere questa (#4789) da quella (OCA/account-financial-reporting#1327)

Concordo

Va bene, solo che non so quando verrà mergiata la PR su financial_report . Semmai una volta fatto il giro che tutto funziona, appena la mergiano punto a quel campo e tolgo da qui. Alla fine la compute è la stessa , quindi funzionerà uguale la computazione dei conti

E se di là vengono fatte delle modifiche poi chi si ricorda di portarle di qua? E se anche qualcuno se lo ricordasse, poi ha voglia di farlo?
Meglio non duplicare il codice.

@micheledic micheledic force-pushed the 18.0_mig_l10n_it_financial_statements_report branch from 2555cb4 to b33173d Compare June 4, 2025 10:30
@odooNextev odooNextev mentioned this pull request Jun 4, 2025
38 tasks
@micheledic
Copy link
Contributor Author

/ocabot migration

@OCA-git-bot
Copy link
Contributor

Hi @micheledic. Your command failed:

Invalid options for command migration: .

Ocabot commands

  • ocabot merge major|minor|patch|nobump
  • ocabot rebase
  • ocabot migration {MODULE_NAME}

More information

@micheledic
Copy link
Contributor Author

/ocabot migration l10n_it_financial_statements_report

@OCA-git-bot
Copy link
Contributor

Sorry @micheledic you are not allowed to mark the addon to be migrated.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

@micheledic
Copy link
Contributor Author

@eLBati puoi tu ?

@francesco-ooops
Copy link
Contributor

/ocabot migration l10n_it_financial_statements_report

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Jun 5, 2025
Borruso added a commit to DinamicheAziendali/l10n-italy that referenced this pull request Jun 13, 2025
Copy link
Contributor

@monen17 monen17 left a comment

Choose a reason for hiding this comment

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

Grazie della PR!
Ci sono diverse cose che non mi tornano sul segno dei gruppi di conti ma sono uguali a com'è in 16.0 quindi non è questo il momento di cambiarle, anche se qui il codice viene proprio aggiunto e non migrato perché è stato rimosso da df6d0e5.

Puoi schiacciare i commit come descritto in https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests#mergesquash-the-commits-generated-by-bots-or-weblate? Al momento diversi commit portati sono dei bot:

Image

Potresti anche togliere [18.0] dal commit di migrazione? Al momento è

Image

Ma i commit dovrebbero seguire https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#71commit-message, quindi iniziare con un tag che in questo caso è [MIG].
Occhio anche al typo nel nome del modulo 😉
Ti consiglio di usare https://github.com/OCA/odoo-module-migrator che automatizza la creazione del commit e diversi passaggi per la migrazione.

"account.account", compute="_compute_current_account_ids"
)

def _compute_current_account_ids(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Secondo me possiamo lasciare le modifiche in OCA/account-financial-reporting#1327 e far dipendere questa (#4789) da quella (OCA/account-financial-reporting#1327)

Concordo

Va bene, solo che non so quando verrà mergiata la PR su financial_report . Semmai una volta fatto il giro che tutto funziona, appena la mergiano punto a quel campo e tolgo da qui. Alla fine la compute è la stessa , quindi funzionerà uguale la computazione dei conti

E se di là vengono fatte delle modifiche poi chi si ricorda di portarle di qua? E se anche qualcuno se lo ricordasse, poi ha voglia di farlo?
Meglio non duplicare il codice.

<t t-set="company" t-value="o.company_id" />
<link
href="/account_financial_report/static/src/css/report.css"
href="/l10n_it_financial_statements_report/static/src/css/report.css"
Copy link
Contributor

Choose a reason for hiding this comment

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

Meglio continuare a usare i file scss di account_financial_report invece di duplicare anche qui lo stesso file.
Per farlo funzionare hanno incluso i bundle del backend nel report nella migrazione OCA/account-financial-reporting@01f22b8:

    <template id="account_financial_report.html_container">
        <t t-call-assets="web.assets_backend" />
        <t t-set="body_classname" t-value="'container'" />

(da https://github.com/OCA/account-financial-reporting/blob/69ec629b8c70640b137a45d012bb2befa502d6bc/account_financial_report/report/templates/layouts.xml#L3-L5)

Non dico che mi piaccia come soluzione, ma è meglio che copiare quello stesso file in questo modulo.

@micheledic micheledic force-pushed the 18.0_mig_l10n_it_financial_statements_report branch 2 times, most recently from 1bdeda0 to 39c908e Compare July 7, 2025 10:31
@micheledic
Copy link
Contributor Author

@monen17 ho squashato i commit del bot, fixato nome commit e alcuni attributi, aggiunto anche test-requirementst.txt per far dipendere dalla PR fix di account_financial_report (è corretto fare così giusto?
Per il css avevo già provato a usare
<t t-call="account_financial_report.html_container">

ma non viene proprio stampato il bundle asset backend.
Ho verificato proprio l'html generato che viene poi passato a wkhtml e c'è solo report asset bundle

@micheledic micheledic force-pushed the 18.0_mig_l10n_it_financial_statements_report branch from 39c908e to 81ff7a5 Compare July 7, 2025 10:53
@micheledic
Copy link
Contributor Author

@OCA/local-italy-maintainers rimosso i test-requirements in quanto hanno mergiato il fix, ora è ok

@mrcast
Copy link
Contributor

mrcast commented Sep 12, 2025

Ho testato e funzionalmente mi pare ok, tranne un punto. Scrivo i passi:

-Su un conto che vado a movimentare ho impostato la valuta secondaria
image

-Faccio una fattura in valuta secondaria

image

e verifico che fa il cambio

image

-Lancio la stampa del conto economico con l'opzione: "Show Ending Balance in Currency"

image

OSSERVATO
Non viene valorizzato l'ending balance in valuta secondaria

image

ATTESO
ottengo il cambio come in registrazione

@micheledic
Copy link
Contributor Author

Ho testato e funzionalmente mi pare ok, tranne un punto. Scrivo i passi:

-Su un conto che vado a movimentare ho impostato la valuta secondaria image

-Faccio una fattura in valuta secondaria

image e verifico che fa il cambio image -Lancio la stampa del conto economico con l'opzione: "Show Ending Balance in Currency" image **OSSERVATO** Non viene valorizzato l'ending balance in valuta secondaria image **ATTESO** ottengo il cambio come in registrazione

Potrebbe essere un bug di account_financial_report e non di financial_report(l'ennesimo bug).
Se provi ad esportare il trial balance di account_financial_report, non da anche li l'ending balance.

image

Potrei occuparmene io di fixarlo, ma a questo punto ritengo non sia più un bug che blocchi la migrazione di financial statements, visto che è da fixare sul modulo da cui dipende.
@sergiocorato che ne pensi ?

@micheledic
Copy link
Contributor Author

OCA/account-financial-reporting#1387 Aperta PR per fix del problema di cui sopra

SirTakobi and others added 20 commits September 15, 2025 15:39
Balance is too generic, Financial statements is what this module is producing
Currently translated at 100.0% (74 of 74 strings)

Translation: l10n-italy-14.0/l10n-italy-14.0-l10n_it_financial_statements_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_financial_statements_report/it/
Currently translated at 100.0% (70 of 70 strings)

Translation: l10n-italy-16.0/l10n-italy-16.0-l10n_it_financial_statements_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_financial_statements_report/it/
Report XLSX: the syntax "if isinstance(value, int | float)" can be used on Python 3.10 and above versions.
16.0 code should be compatible with Python>=3.7 tho.
Currently translated at 100.0% (70 of 70 strings)

Translation: l10n-italy-16.0/l10n-italy-16.0-l10n_it_financial_statements_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_financial_statements_report/it/
Currently translated at 100.0% (70 of 70 strings)

Translation: l10n-italy-16.0/l10n-italy-16.0-l10n_it_financial_statements_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_financial_statements_report/it/
Currently translated at 100.0% (70 of 70 strings)

Translation: l10n-italy-16.0/l10n-italy-16.0-l10n_it_financial_statements_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_financial_statements_report/it/
Currently translated at 100.0% (71 of 71 strings)

Translation: l10n-italy-16.0/l10n-italy-16.0-l10n_it_financial_statements_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_financial_statements_report/it/
@micheledic micheledic force-pushed the 18.0_mig_l10n_it_financial_statements_report branch from 389b5d6 to 22f0280 Compare September 15, 2025 13:40
@micheledic
Copy link
Contributor Author

micheledic commented Sep 15, 2025

@mrcast potresti riprovare ora? fix su financial_report mergiato

@OCA/local-italy-developers ora dovrebbe essere tutto ok

@MaurizioPellegrinet
Copy link

Sembra cha ancora non funzioni:

  • ho fatto 3 fatture, di cui 2 in valuta secondaria
  • il bilancio non restituisce il valore in valuta
image image image

@micheledic micheledic force-pushed the 18.0_mig_l10n_it_financial_statements_report branch from 22f0280 to 585833a Compare September 16, 2025 10:34
@micheledic
Copy link
Contributor Author

micheledic commented Sep 16, 2025

Sembra cha ancora non funzioni:

  • ho fatto 3 fatture, di cui 2 in valuta secondaria
  • il bilancio non restituisce il valore in valuta

image image image

Ciao,
http://oca-l10n-italy-18-0-pr4789-585833ad664f.runboat.odoo-community.org/odoo/customer-invoices/50/1
Ho dato nuovamente un rebuild, ho riprovato e me lo mostra correttamente. Ma viene mostrato selezionando la currency sul conto, come dal tuo primo test.
Peer com'è fatto nativamente il modulo account_financial_report , l'ending balance in currency viene sommato SOLO se sul conto c'è una currency selezionata come da description del campo :
https://github.com/OCA/account-financial-reporting/blob/4c53984534d148743e27c92f7b546d7fd77f4c98/account_financial_report/wizard/trial_balance_wizard.py#L57-62

financial_statements_report si basa su account_financial_report, i dati li prende dal wizard di financial_report e quindi ne eredita anche le logiche

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.