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][FIX] l10n_br_nfe: remoção do warning inconsistent 'compute_sudo' #3107

Merged
merged 1 commit into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions l10n_br_nfe/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@ def _prepare_import_dict(
# nfe.40.tlocal / nfe.40.enderEmit / 'nfe.40.enderDest
# TODO: may be not store=True -> then override match
nfe40_CNPJ = fields.Char(
compute="_compute_nfe_data", inverse="_inverse_nfe40_CNPJ", store=True
compute="_compute_nfe_data",
inverse="_inverse_nfe40_CNPJ",
store=True,
compute_sudo=True,
)
nfe40_CPF = fields.Char(
compute="_compute_nfe_data", inverse="_inverse_nfe40_CPF", store=True
compute="_compute_nfe_data",
inverse="_inverse_nfe40_CPF",
store=True,
compute_sudo=True,
)
nfe40_xLgr = fields.Char(
readonly=True,
Expand Down Expand Up @@ -95,6 +101,7 @@ def _prepare_import_dict(
selection=[("nfe40_CNPJ", "CNPJ"), ("nfe40_CPF", "CPF")],
string="CNPJ/CPF do Emitente",
compute="_compute_nfe_data",
compute_sudo=True,
)

# nfe.40.tendereco
Expand Down Expand Up @@ -138,6 +145,7 @@ def _prepare_import_dict(
selection=[("nfe40_CNPJ", "CNPJ"), ("nfe40_CPF", "CPF")],
string="CNPJ/CPF do Parceiro",
compute="_compute_nfe_data",
compute_sudo=True,
)

nfe40_choice_dest = fields.Selection(
Expand All @@ -156,6 +164,7 @@ def _prepare_import_dict(
selection=[("nfe40_CNPJ", "CNPJ"), ("nfe40_CPF", "CPF")],
string="CNPJ/CPF do Parceiro Autorizado",
compute="_compute_nfe_data",
compute_sudo=True,
)

# nfe.40.transporta
Expand All @@ -166,6 +175,7 @@ def _prepare_import_dict(
],
string="CNPJ or CPF",
compute="_compute_nfe_data",
compute_sudo=True,
)

is_anonymous_consumer = fields.Boolean(
Expand Down
Loading