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

[16.0] [FIX] l10n_it_fatturapa_out: attach report to a xml invoice pops an error on "report_print_menu" field #4156

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

micheledic
Copy link
Contributor

Quando provi ad allegare un report ad un XML di fattura, esce un errore perchè è stata usata fields.Selection .
Inoltre non funziona la domain.
Con questa PR vengono fixate entrambe le cose

@micheledic
Copy link
Contributor Author

andato in fail il precommit, qual è il problema?

@OpenCode
Copy link
Contributor

andato in fail il precommit, qual è il problema?

Te lo dice la action stessa:
https://github.com/OCA/l10n-italy/actions/runs/9206643473/job/25324940111#step:7:49

In generale, installa pre-commit in locale e fallo girare lì prima di pushare così vedi gli errori (molti dei quali risolve black autonomamente cambiando il codice)

@francesco-ooops
Copy link
Contributor

@micheledic ciao, puoi aprire una issue per tracciare il problema con i passi per riprodurre?

@micheledic
Copy link
Contributor Author

micheledic commented May 24, 2024

@micheledic ciao, puoi aprire una issue per tracciare il problema con i passi per riprodurre?

#4159 ecco a te

Principalmente credo sia un problema di contesto, visto che i values dipendono dal contesto se si perde il contesto nel ping-pong di chiamate allora non riesce a validare il value

Comment on lines -48 to +36
report_print_menu = fields.Selection(
selection="_get_selection",
help="This report will be automatically included in the created XML",
report_print_menu = fields.Many2one(
"ir.actions.report",
Copy link
Contributor

Choose a reason for hiding this comment

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

Sembra un rollback di 0315ba5, @TheMule71 @michelerusti cosa ne pensate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ho visto anche la PR che ha portato da Many2one a Selection , ma secondo il mio parere ha più senso sia una many2one visto anche che nel caso di Selection, viene riportato errore se viene settato quel campo senza contesto active_model ....
Cioè gli attributi dell'entità del wizard, non dovrebbero essere strict rispetto al contesto ma il contesto dovrebbe solamente suggerire il report da utilizzare. Poi usando widget=selection anche la many2one diventa come selection e quindi trasparente per ,l'utente finale

Poi chi dovrà provvedere ad esportare le fatture, avrà sicuramente anche accesso al modello ir.actions.report quindi non dovrebbero esserci problemi di permessi d'accesso

Ovviamente parere mio tecnico, potrei anche sbagliarmi

@SirAionTech SirAionTech added the needs fixing Has conflicts or is failing mandatory CI checks label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
16.0 needs fixing Has conflicts or is failing mandatory CI checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

l10n_it_fatturapa_out : errore saltuario quando si allega un report all'XML
4 participants