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][IMP]l10n_it_fatturapa_in: copy changing values only #4240

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

Conversation

PicchiSeba
Copy link
Contributor

@PicchiSeba PicchiSeba commented Jun 28, 2024

There's no need to overwrite values when they don't change. Moreover a user might not have permissions to write certain fields (in my case it was stock_valuation_layer_ids, which requires the Stock / Administrator group)

Solves: #4242

@PicchiSeba PicchiSeba force-pushed the 14.0-l10n_it_fattura_pi_in-write-changing-values branch from fc93349 to 4b2c86c Compare June 28, 2024 10:50
@PicchiSeba PicchiSeba marked this pull request as ready for review June 28, 2024 11:04
@PicchiSeba PicchiSeba force-pushed the 14.0-l10n_it_fattura_pi_in-write-changing-values branch from 4b2c86c to 3b311cd Compare June 28, 2024 11:48
@francesco-ooops francesco-ooops linked an issue Jun 28, 2024 that may be closed by this pull request
2 tasks
Copy link
Contributor

@aleuffre aleuffre left a comment

Choose a reason for hiding this comment

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

Code review

l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py Outdated Show resolved Hide resolved
l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py Outdated Show resolved Hide resolved
@PicchiSeba PicchiSeba force-pushed the 14.0-l10n_it_fattura_pi_in-write-changing-values branch 2 times, most recently from 4e8138b to c57f2bc Compare July 1, 2024 13:50
@PicchiSeba PicchiSeba force-pushed the 14.0-l10n_it_fattura_pi_in-write-changing-values branch from c57f2bc to 51a083b Compare July 1, 2024 13:54
@PicchiSeba PicchiSeba requested a review from aleuffre July 1, 2024 13:54
Copy link
Contributor

@aleuffre aleuffre left a comment

Choose a reason for hiding this comment

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

Code review, LGTM

Copy link
Contributor

@francesco-ooops francesco-ooops left a comment

Choose a reason for hiding this comment

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

Funzionale ok!

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@francesco-ooops
Copy link
Contributor

@OCA/local-italy-maintainers si può mergiare?

@francesco-ooops
Copy link
Contributor

@SirAionTech buona per te?

@SirAionTech
Copy link
Contributor

@SirAionTech buona per te?

A me già non convinceva questa parte di codice che prende tutto quello che c'è nella cache e lo scrive.
Questa PR non mi sembra migliorare questo aspetto, ma già non mi spiegavo il codice di prima quindi non saprei cosa dire di questa modifica.
Forse sarebbe meglio lasciar stare la cache.

@francesco-ooops
Copy link
Contributor

@SirAionTech riusciamo a risalire a chi/quando era stata aggiunta questa funzione?

@SirAionTech
Copy link
Contributor

SirAionTech commented Jul 11, 2024

@SirAionTech riusciamo a risalire a chi/quando era stata aggiunta questa funzione?

Fu aggiunta in 773e1c3 (il commit originale è cb063e9) da @eLBati

@francesco-ooops
Copy link
Contributor

Ok, dunque è lì da un bel po'

@eLBati hai idea dell'utilità di questa funzione?

@eLBati
Copy link
Member

eLBati commented Jul 12, 2024

_convert_to_write era usato per replicare nell'importazione quello che avviene nell'interfaccia all'esecuzione dell'onchange e scriverlo sul record (altrimenti le modifiche dell'onchange non venivano salvate). Quindi in questo caso serviva a salvare le modifiche fatte da _onchange_invoice_line_wt_ids.

@francesco-ooops
Copy link
Contributor

@eLBati grazie, secondo te come possiamo intervenire per risolvere il problema indicato nella issue?

@francesco-ooops
Copy link
Contributor

@eLBati ping! Che ne pensi di questa PR? Andiamo a fare danni?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment