Skip to content

Commit

Permalink
FIX Some SonarCloud issues reported
Browse files Browse the repository at this point in the history
  • Loading branch information
ecino committed May 9, 2022
1 parent 414940e commit a38ac37
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def unreconcile(self):
{
"date_invoice": invoice.date_invoice,
"comment": self.comment
or "New invoice after " "payment attribution changed.",
or "New invoice after payment attribution changed.",
"invoice_line_ids": False,
}
)
Expand Down
4 changes: 2 additions & 2 deletions child_sync_wp/tools/wp_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def parse_response(self, response):
if not data:
break
if self.verbose:
_logger.info("body:", repr(data))
_logger.info("body: " + repr(data))
p.feed(data)

if stream is not response:
Expand Down Expand Up @@ -116,7 +116,7 @@ def upload_children(self, children):
"Child Upload partially failed."
+ str(count_insert)
+ " of "
+ len(children)
+ str(len(children))
)
else:
_logger.error("Child Upload failed.")
Expand Down
1 change: 0 additions & 1 deletion crm_switzerland/views/crm_phonecall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@

<record id="crm_phone.crm_phonecall_action_open" model="ir.actions.act_window">
<field name="context">{'search_default_my_calls': 1, 'search_default_open': 1, 'default_state': 'open'}</field>
<!--<field name="search_view_id" ref="crm.phonecall.search"/>-->
</record>
</odoo>
11 changes: 5 additions & 6 deletions muskathlon/forms/trip_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,11 @@ def _form_validate_passport_expiration_date(self, value, **req_values):
valid = not old
except (ValueError, TypeError):
valid = False
finally:
if not valid:
message = _("Please enter a valid date")
if old:
message = _("Your passport must be renewed!")
return "passport_expiration_date", message
if not valid:
message = _("Please enter a valid date")
if old:
message = _("Your passport must be renewed!")
return "passport_expiration_date", message
# No error
return 0, 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def generate_test_cases_partner(self):
self.ensure_one()
if not self.partner_selected:
raise exceptions.UserError("No partner selected")
return False
case = self.config_id.generate_test_case_by_partner(
self.partner, self.child_ids, self.send_mode)
self._apply_cases([case])
Expand Down

0 comments on commit a38ac37

Please sign in to comment.