Skip to content

Commit

Permalink
[IMP] portal_event_tickets: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
azimkhankuat authored and em230418 committed Oct 31, 2024
1 parent 1096944 commit 42ed7e1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions portal_event_tickets/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Customer Event Portal
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-it--projects--llc%2Fwebsite--addons-lightgray.png?logo=github
:target: https://github.com/it-projects-llc/website-addons/tree/14.0/portal_event_tickets
:target: https://github.com/it-projects-llc/website-addons/tree/17.0/portal_event_tickets
:alt: it-projects-llc/website-addons

|badge1| |badge2| |badge3|
Expand Down Expand Up @@ -125,7 +125,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/it-projects-llc/website-addons/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/it-projects-llc/website-addons/issues/new?body=module:%20portal_event_tickets%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/it-projects-llc/website-addons/issues/new?body=module:%20portal_event_tickets%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -149,6 +149,6 @@ Contributors
Maintainers
-----------

This module is part of the `it-projects-llc/website-addons <https://github.com/it-projects-llc/website-addons/tree/14.0/portal_event_tickets>`_ project on GitHub.
This module is part of the `it-projects-llc/website-addons <https://github.com/it-projects-llc/website-addons/tree/17.0/portal_event_tickets>`_ project on GitHub.

You are welcome to contribute.
2 changes: 1 addition & 1 deletion portal_event_tickets/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"summary": """Allows to customers see their tickets for events at the Portal""",
"category": "Marketing",
"images": ["images/banner.jpg"],
"version": "14.0.1.0.0",
"version": "17.0.1.0.0",
"author": "IT-Projects LLC",
"support": "[email protected]",
"website": "https://github.com/it-projects-llc/website-addons",
Expand Down
6 changes: 3 additions & 3 deletions portal_event_tickets/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class PortalEvent(CustomerPortal):
def _prepare_home_portal_values(self, counters):
values = super(PortalEvent, self)._prepare_home_portal_values(counters)
values = super()._prepare_home_portal_values(counters)
if "tickets_count" in counters:
domain = self._tickets_domain()
values["tickets_count"] = (
Expand All @@ -34,7 +34,7 @@ def _tickets_domain(self, partner=None):
@http.route()
def account(self, *args, **kw):
"""Add sales documents to main account page"""
response = super(PortalEvent, self).account(*args, **kw)
response = super().account(*args, **kw)
domain = self._tickets_domain()
tickets_count = request.env["event.registration"].search_count(domain)

Expand Down Expand Up @@ -332,7 +332,7 @@ def ticket_change(self, ticket_id, **kw):
class WebsiteSaleExtended(WebsiteSale):
@http.route()
def cart(self, **post):
response = super(WebsiteSaleExtended, self).cart(**post)
response = super().cart(**post)
if post.get("total_is_negative"):
response.qcontext.update(
{
Expand Down
2 changes: 1 addition & 1 deletion portal_event_tickets/models/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ def check_partner_for_new_ticket(self, partner_id):
# False means no errors
return False

return super(Event, self).check_partner_for_new_ticket(partner_id)
return super().check_partner_for_new_ticket(partner_id)
2 changes: 2 additions & 0 deletions portal_event_tickets/models/event_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def _compute_scheduled_date(self):
rself.scheduled_date = datetime.strptime(
date, tools.DEFAULT_SERVER_DATETIME_FORMAT
) + _INTERVALS[rself.interval_unit](sign * rself.interval_nbr)
return True

def execute(self, registration=None):
for rself in self:
Expand Down Expand Up @@ -104,3 +105,4 @@ def _compute_scheduled_date(self):
](rself.scheduler_id.interval_nbr)
else:
rself.scheduled_date = False
return True
2 changes: 1 addition & 1 deletion portal_event_tickets/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SaleOrderLine(models.Model):
_inherit = "sale.order.line"

def _cancel_line(self, origin=None):
res = super(SaleOrderLine, self)._cancel_line(origin=origin)
res = super()._cancel_line(origin=origin)

tickets = self.env["event.registration"].search(
[
Expand Down
2 changes: 1 addition & 1 deletion portal_event_tickets/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class TourCase(HttpCase):
def setUp(self):
super(TourCase, self).setUp()
super().setUp()

# create Event
self.event = self.env["event.event"].create(
Expand Down

0 comments on commit 42ed7e1

Please sign in to comment.