Skip to content

Commit

Permalink
Merge PR #2752 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by rvalyi
  • Loading branch information
OCA-git-bot committed Oct 27, 2023
2 parents 3942788 + a72350b commit 5b7cabe
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion l10n_br_contract/models/contract_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _prepare_recurring_invoices_values(self, date_ref=False):
for invoice_val in super_inv_vals:
# Identify how many Document Types exist
for inv_line in invoice_val.get("invoice_line_ids"):
if type(inv_line[2]) == list:
if type(inv_line[2]) is list:
continue

operation_line_id = self.env["l10n_br_fiscal.operation.line"].browse(
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_nfe/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def atualiza_status_nfe(self, processo):
else:
state = SITUACAO_EDOC_REJEITADA
if self.authorization_event_id and infProt.nProt:
if type(infProt.dhRecbto) == datetime:
if type(infProt.dhRecbto) is datetime:
protocol_date = fields.Datetime.to_string(infProt.dhRecbto)
else:
protocol_date = fields.Datetime.to_string(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def lines(self):
tmp_total_value_ncm = round(product_inventory_value, account_precision)
# A validação abaixo é necessária p/
# não preencher a primeira linha
if type(tmp_ncm_controler) != bool:
if type(tmp_ncm_controler) is not bool:
tmp_ncm_controler_line = True

result_lines.append(
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_website_sale/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def address(self, **kw):
and res.qcontext["checkout"]["city_id"]
):
state_id = res.qcontext["checkout"]["state_id"]
if type(state_id) != str:
if type(state_id) is not str:
state_id = state_id.id
elif state_id:
state_id = int(state_id)
Expand Down
4 changes: 2 additions & 2 deletions payment_pagseguro/models/payment_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def pagseguro_s2s_capture_transaction(self):
)

if (
type(res) == dict
type(res) is dict
and res.get("payment_response")
and res.get("payment_response").get("message") == "SUCESSO"
):
Expand Down Expand Up @@ -136,7 +136,7 @@ def pagseguro_s2s_void_transaction(self):
)

if (
type(res) == dict
type(res) is dict
and res.get("payment_response")
and res.get("payment_response").get("message") == "SUCESSO"
):
Expand Down
2 changes: 1 addition & 1 deletion spec_driven_model/models/spec_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def _export_field(self, xsd_field, class_obj, field_spec, export_value=None):
return self._export_float_monetary(
xsd_field, xsd_type, class_obj, xsd_required, export_value
)
elif type(self[xsd_field]) == str:
elif type(self[xsd_field]) is str:
return self[xsd_field].strip()
else:
return self[xsd_field]
Expand Down

0 comments on commit 5b7cabe

Please sign in to comment.