Skip to content

[14.0] mig l10n_it_account_balance_report#3169

Closed
TonyMasciI wants to merge 31 commits into
OCA:14.0from
saydigital:14.0-mig-l10_it_account_balance_report
Closed

[14.0] mig l10n_it_account_balance_report#3169
TonyMasciI wants to merge 31 commits into
OCA:14.0from
saydigital:14.0-mig-l10_it_account_balance_report

Conversation

@TonyMasciI

@TonyMasciI TonyMasciI commented Feb 10, 2023

Copy link
Copy Markdown
Contributor

Storia PR:

Prima: PR chiusa per errore in fase di rebase

Seconda: PR aperta in seguenza alla prima, ma mancano i commit di migrazione

@TonyMasciI TonyMasciI force-pushed the 14.0-mig-l10_it_account_balance_report branch from 6f6af42 to 9038783 Compare February 10, 2023 13:24
@stefano-ooops

Copy link
Copy Markdown

Come nella prima PR errore ancora presente
i test li ho fatti andando a stampare conto economico e stato patrimoniale dai movimenti presenti nel runboat, ti allego la stampa del mastrino che viene riportato in maniera errata nello stato patrimonialeimage

@TonyMasciI TonyMasciI force-pushed the 14.0-mig-l10_it_account_balance_report branch from 9038783 to d6c2fce Compare February 10, 2023 13:58
@francesco-ooops

Copy link
Copy Markdown
Contributor

@TonyMasciI facci sapere quando si può testare nuovamente

@francesco-ooops

Copy link
Copy Markdown
Contributor

Come nella prima PR errore ancora presente i test li ho fatti andando a stampare conto economico e stato patrimoniale dai movimenti presenti nel runboat, ti allego la stampa del mastrino che viene riportato in maniera errata nello stato patrimonialeimage

@TonyMasciI riesci a verificare questo? grazie!

@TonyMasciI

Copy link
Copy Markdown
Contributor Author

Come nella prima PR errore ancora presente i test li ho fatti andando a stampare conto economico e stato patrimoniale dai movimenti presenti nel runboat, ti allego la stampa del mastrino che viene riportato in maniera errata nello stato patrimonialeimage

@TonyMasciI riesci a verificare questo? grazie!

Ciao @francesco-ooops Il Mastrino che stai testando non è il menù che è presente in questo modulo, questo menù è presente in questo Repo, è vero che questo modulo l10n_it_account_balance_report dipende da account_financial_report, ma deve essere testato quest'altro menù:

immagine
immagine

Ti direi di testare il menù nel Repo, e nel caso di aprire un issue.

@francesco-ooops

Copy link
Copy Markdown
Contributor

@TonyMasciI forse abbiamo capito dove sta l'inghippo, puoi mettere la PR in "open" così possiamo testarla internamente? grazie

@TonyMasciI TonyMasciI marked this pull request as ready for review February 21, 2023 11:25
@francesco-ooops

Copy link
Copy Markdown
Contributor

@SirTakobi visto che lavoravi su #3199 , ti posso chiedere di verificare se per te è tutto ok in questa migrazione? :)

@SirTakobi

Copy link
Copy Markdown
Contributor

@SirTakobi visto che lavoravi su #3199 , ti posso chiedere di verificare se per te è tutto ok in questa migrazione? :)

Ok quando ho tempo la guardo

@francesco-ooops

Copy link
Copy Markdown
Contributor

@TonyMasciI questo doc è l'esito del test di @stefano-ooops su un db pulito della 12 e della 14, puoi darci un feedback?

@eLBati eLBati changed the title 14.0 mig l10 it account balance report [14.0] mig l10n_it_account_balance_report Mar 22, 2023
@francesco-ooops

Copy link
Copy Markdown
Contributor

@TonyMasciI gentile reminder

@TonyMasciI TonyMasciI force-pushed the 14.0-mig-l10_it_account_balance_report branch from 6d9122d to 05cc242 Compare March 24, 2023 14:17
@TonyMasciI

Copy link
Copy Markdown
Contributor Author

@TonyMasciI questo doc è l'esito del test di @stefano-ooops su un db pulito della 12 e della 14, puoi darci un feedback?

Rilasciata una correzione al problema che hai riscontrato. Fammi sapere!

@stefano-ooops

Copy link
Copy Markdown

@TonyMasciI questo doc è l'esito del test di @stefano-ooops su un db pulito della 12 e della 14, puoi darci un feedback?

Rilasciata una correzione al problema che hai riscontrato. Fammi sapere!

testato su runbot ora funziona

@francesco-ooops

Copy link
Copy Markdown
Contributor

@SirTakobi se vuoi dare un occhio finalizziamo 🤞

@stefano-ooops stefano-ooops 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.

OK FUNZIONA

@SirTakobi SirTakobi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Grazie della PR!
Puoi schiacciare i commit dei bot come indicato in https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests#mergesquash-the-commits-generated-by-bots-or-weblate?

Visto che sono state aggiunte centinaia di righe di codice, potresti aggiungere almeno un test?

Incomes = "Income", "Other Income"
Incomes = "Current Year Earnings", "Income", "Other Income"
-->
<record model="account.account.type" id="account.data_unaffected_earnings">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Come mai è necessario modificare questo tipo di conto per la migrazione?
Insieme alla modifica poco sotto, sembra essere un rollback di #2832

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

("incomes", "Incomes"),
("liabilities", "Liabilities"),
],
# [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Se non servono penso sia meglio eliminarli

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

<t t-if="o.hide_account_at_0">
<t t-set="style" t-value="'font-size: 14px;'" />
</t>
<t t-if="o.show_hierarchy">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Come mai show_hierarchy è preso da o mentre più sotto limit_hierarchy_level direttamente dalla variabili disponibili?
Se non c'è un motivo specifico, si può uniformare il comportamento?

<div class="act_as_cell left">
<span>
<a
t-att-data-active-id="line.account_id.id"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
t-att-data-active-id="line.account_id.id"
t-att-data-active-id="active_id"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

<t
t-set="domain"
t-value="[('account_id', 'in', line.compute_account_ids.ids),
t-value="[('account_id', 'in', line.group_id.account_ids.ids),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Come mai questa modifica? Guardando come veniva calcolato compute_account_ids non mi sembra equivalente, ma forse mi sono perso qualcosa nelle logiche della migrazione di account.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Report, the only data we need is the ending_balance field.
"""

def is_removable(d):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Questo cambia il comportamento anche del report originale, è voluto?
Mi pare che l'unica cosa diversa sia questa funzione innestata, quindi prima di fare un override completo proverei almeno a suggerire nel modulo account_financial_report di estrarre questa funzione (magari in un metodo model), e implementare lì la nuova logica ma solo per il nostro report.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍


@api.multi
def compute_data_for_report(self):
def clear_data(self, tb_data):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Questo metodo è dedicato all'inversione di segno dei totali di conti di un certo tipo, non ho trovato nulla del genere prima della migrazione, come mai è stato necessario aggiungerlo?
Prima della migrazione, i segni del totale venivano ribaltati semplicemente se negativi:

total_balance = 0
if float_compare(total_credit, total_debit, digits) == 1:
total_balance = total_credit - total_debit
elif float_compare(total_credit, total_debit, digits) == -1:
total_balance = total_debit - total_credit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Aggiunto il metodo clear_data per aggiustare i segni dei totali dei conti, dato che le informazioni arrivano sballate dal modello trial_banace del modulo account_financial_report, questa modifica è stata apportata per aveere dei conti sotto 0 come nel caso d'uso del documento.

[("profit_loss", "Profit & Loss"), ("balance_sheet", "Balance Sheet")],
)

company_id = fields.Many2one(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ho capito che tutte queste colonne vengono aggiunte perché non sono più recuperabili dal vecchio trial_balance_id, ma come mai è necessario aggiungerle? Non si può invece seguire la logica che viene utilizzata nel Trial Balance?
Ad esempio invece di dichiarare il campo company_id (che non viene più definito come campo in nessun report di account_financial_report), si potrebbe utilizzare il valore tb_data['company_id'].

In questo modo credo che le modifiche della migrazione sarebbero molto più ridotte, ma forse mi sfugge qualche problema in questo approccio?
In pratica, mi pare si stia cercando di ricreare la vecchia logica dei report account_financial_report invece di adattarsi alla nuova logica, e questo implica la creazione di tutti questi campi e le centinaia di righe di codice aggiunte nella migrazione.
Se possibile (come scrivevo, magari mi sfugge qualcosa per cui tutto ciò è necessario), cercherei di mantenere le modifiche di migrazione minimali.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

per i campi company_id | date_from | date_to sono stato costretto a lasciarli perché servono per la generazione del report.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ho provato a seguire la logica utilizzata dal Trial Balance in #3343 e non serve aggiungere nuovi campi, fammi sapere cosa ne pensi

@francesco-ooops

Copy link
Copy Markdown
Contributor

@TonyMasciI riesci a sistemare a stretto giro?

@francesco-ooops

Copy link
Copy Markdown
Contributor

@TonyMasciI ping :)

@francesco-ooops

Copy link
Copy Markdown
Contributor

@TonyMasciI pong

@francesco-ooops

Copy link
Copy Markdown
Contributor

@TonyMasciI pensi di riuscire a metterci le mani a breve?

Altrimenti siamo disponibili a prenderla in carico, basta farci sapere :)

@francesco-ooops

Copy link
Copy Markdown
Contributor

@TonyMasciI se gentilmente mi dai conferma che non hai aggiornamenti pronti da aggiungere, questa la prendiamo in carico noi

@TonyMasciI

Copy link
Copy Markdown
Contributor Author

@TonyMasciI se gentilmente mi dai conferma che non hai aggiornamenti pronti da aggiungere, questa la prendiamo in carico noi

Ciao, controllo e ti faccio sapere

@francesco-ooops

Copy link
Copy Markdown
Contributor

@TonyMasciI buongiorno, riesci a darci un feedback in giornata? vorremmo arrivare in fondo a questa PR

grazie

@TonyMasciI TonyMasciI force-pushed the 14.0-mig-l10_it_account_balance_report branch from 5b5b484 to 6271728 Compare April 27, 2023 09:04
@TonyMasciI

TonyMasciI commented Apr 27, 2023

Copy link
Copy Markdown
Contributor Author

@TonyMasciI buongiorno, riesci a darci un feedback in giornata? vorremmo arrivare in fondo a questa PR

grazie

@francesco-ooops vorrei aggiungere anche dei TEST, ma non credo che riesco in giornata, forse domani pomeriggio o settimana prossima.

@francesco-ooops

Copy link
Copy Markdown
Contributor

@SirTakobi puoi verificare gli ultimi aggiornamenti?

OCA-git-bot and others added 18 commits May 19, 2023 12:02
Currently translated at 92.9% (119 of 128 strings)

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_balance_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_balance_report/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_balance_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_balance_report/
Currently translated at 95.3% (122 of 128 strings)

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_balance_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_balance_report/it/
Usando il modulo l10n_it_account_balance_report, il cron di Pulizia dati interni diventa molto lento e in alcuni casi va in blocco.

L'autovacuum della tabella report_trial_balance diventa molto lenta per via delle cascade presenti nel modulo.
Inserendo gli indici nei campi collegati il problema si risolve, come già realizzato nel repo OCA/account-financial-reporting#750.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_balance_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_balance_report/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_account_balance_report
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_account_balance_report/
@TonyMasciI TonyMasciI force-pushed the 14.0-mig-l10_it_account_balance_report branch from d3449fd to f79338e Compare May 19, 2023 10:03

@stefano-ooops stefano-ooops 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.

testato ok

@francesco-ooops

Copy link
Copy Markdown
Contributor

@SirTakobi dovremmo esserci, riesci a fare review?

@SirTakobi

Copy link
Copy Markdown
Contributor

@SirTakobi dovremmo esserci, riesci a fare review?

Ne abbiamo parlato stamattina in https://discord.gg/yesf5HJ, e ieri anche internamente, per il momento non riesco ad aggiornare la review

@tafaRU tafaRU mentioned this pull request May 24, 2023
76 tasks

@eLBati eLBati 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.

Ci stiamo lavorando per provare a sistemare alcune cose. Pubblicheremo nei prossimi giorni

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mancano diversi commit, a partire da 6e7b901

"maintainers": ["SilvioGregorini"],
"website": "https://github.com/OCA/l10n-italy"
"/tree/12.0/l10n_it_account_balance_report",
"website": "https://github.com/OCA/l10n-italy" "/l10n_it_account_balance_report",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

</record>

<!--
Liabilities = "Current Year Earnings", "Payable", "Credit Card", "Prepayments",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Questa modifica penso sia da rimuovere

Incomes = "Income", "Other Income"
Incomes = "Current Year Earnings", "Income", "Other Income"
-->
<record model="account.account.type" id="account.data_unaffected_earnings">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

("incomes", "Incomes"),
("liabilities", "Liabilities"),
],
# [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

<div class="act_as_cell left">
<span>
<a
t-att-data-active-id="line.account_id.id"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

<t
t-set="domain"
t-value="[('account_id', 'in', line.compute_account_ids.ids),
t-value="[('account_id', 'in', line.group_id.account_ids.ids),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Report, the only data we need is the ending_balance field.
"""

def is_removable(d):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

)

# Override of `trial.balance.report.wizard` to set True as default value
show_hierarchy = fields.Boolean(default=True)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Questo non mi sembra faccia parte della migrazione ma è un nuovo comportamento, che modifica anche il comportamento del wizard da cui eredita; puoi metterlo in un commit o una PR dedicata?

[("profit_loss", "Profit & Loss"), ("balance_sheet", "Balance Sheet")],
)

company_id = fields.Many2one(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ho provato a seguire la logica utilizzata dal Trial Balance in #3343 e non serve aggiungere nuovi campi, fammi sapere cosa ne pensi

@TonyMasciI TonyMasciI closed this Jul 6, 2023
@TonyMasciI

Copy link
Copy Markdown
Contributor Author

Chiusa in favore della PR: #3343

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.