Skip to content

Commit

Permalink
Merge PR #419 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Dec 12, 2024
2 parents 4107c51 + da0506f commit e54318d
Show file tree
Hide file tree
Showing 13 changed files with 588 additions and 0 deletions.
90 changes: 90 additions & 0 deletions website_event_track_stage_cancelled/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
====================================
Event session cancellation workflows
====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5b097a42c4e7f0b131db2c084e18507b59691209462f99e46db35aa9556bb40e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fevent-lightgray.png?logo=github
:target: https://github.com/OCA/event/tree/17.0/website_event_track_stage_cancelled
:alt: OCA/event
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/event-17-0/event-17-0-website_event_track_stage_cancelled
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/event&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module complements ``event_stage_cancelled`` to set the event
sessions to a cancelled stage when the event is cancelled.

**Table of contents**

.. contents::
:local:

Configuration
=============

Follow the instructions for ``event_stage_cancelled``.

Usage
=====

Just click on the *Cancel Event* and all the event's sessions will be
set to the first cancelled stage.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/event/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/OCA/event/issues/new?body=module:%20website_event_track_stage_cancelled%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.

Credits
=======

Authors
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://tecnativa.com>`__

- David Vidal

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/event <https://github.com/OCA/event/tree/17.0/website_event_track_stage_cancelled>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions website_event_track_stage_cancelled/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
12 changes: 12 additions & 0 deletions website_event_track_stage_cancelled/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Event session cancellation workflows",
"version": "17.0.1.0.0",
"category": "Marketing",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/event",
"license": "AGPL-3",
"depends": ["website_event_track", "event_stage_cancelled"],
"data": [],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_event_track_stage_cancelled
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: website_event_track_stage_cancelled
#: model:ir.model,name:website_event_track_stage_cancelled.model_event_event
msgid "Event"
msgstr ""
1 change: 1 addition & 0 deletions website_event_track_stage_cancelled/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import event_event
17 changes: 17 additions & 0 deletions website_event_track_stage_cancelled/models/event_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 Tecnativa S.L. - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models


class EventEvent(models.Model):
_inherit = "event.event"

def button_cancel(self):
"""Perform cancellation of the sessions"""
res = super().button_cancel()
stage_id = self.env["event.track.stage"].search(
[("is_cancel", "=", True)], limit=1
)
if stage_id:
self.track_ids.stage_id = stage_id
return res
3 changes: 3 additions & 0 deletions website_event_track_stage_cancelled/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions website_event_track_stage_cancelled/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Follow the instructions for `event_stage_cancelled`.
2 changes: 2 additions & 0 deletions website_event_track_stage_cancelled/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Tecnativa](https://tecnativa.com)
- David Vidal
2 changes: 2 additions & 0 deletions website_event_track_stage_cancelled/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module complements `event_stage_cancelled` to set the event sessions to a
cancelled stage when the event is cancelled.
2 changes: 2 additions & 0 deletions website_event_track_stage_cancelled/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Just click on the *Cancel Event* and all the event's sessions will be set to the
first cancelled stage.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e54318d

Please sign in to comment.