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

[16.0] [MIG] pos_event_sale: Migration to 16.0 #1205

Draft
wants to merge 55 commits into
base: 16.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e3acf81
[ADD] pos_event_sale : Module to sell events from the Point of Sale.
ivantodorovich Jun 3, 2021
9d0657f
[IMP] pos_event_sale: Improve usability in touchscreen devices
ivantodorovich Jun 23, 2021
59b9bbc
[FIX] pos_event_sale: Customer display
ivantodorovich Sep 3, 2021
a174982
[UPD] Update pos_event_sale.pot
oca-travis Nov 2, 2021
21572b1
[UPD] README.rst
OCA-git-bot Nov 2, 2021
fb77a5d
[ADD] icon.png
OCA-git-bot Nov 2, 2021
a818649
[IMP] pos_event_sale: pre-commit execution
ivantodorovich Nov 13, 2021
3fade3a
[MIG] pos_event_sale: Migration to 15.0
ivantodorovich Nov 13, 2021
4bc6681
[UPD] Update pos_event_sale.pot
Jun 6, 2022
a177fcc
[UPD] README.rst
OCA-git-bot Jun 6, 2022
7ce0043
[IMP] `pos_event_sale`: Create only the missing `event.registrations`
ivantodorovich Jul 1, 2022
97b50e6
pos_event_sale 15.0.1.0.1
OCA-git-bot Jul 4, 2022
745799c
[FIX] pos_event_sale: event_barcode compatibility (enterprise)
ivantodorovich Oct 3, 2022
2d065d5
pos_event_sale 15.0.1.0.2
OCA-git-bot Oct 3, 2022
6f67944
[UPD] Update pos_event_sale.pot
Mar 6, 2023
ea9ddc1
Update translation files
weblate Mar 6, 2023
064c09f
Added translation using Weblate (Italian)
mymage Mar 9, 2023
19d1daa
Translated using Weblate (Italian)
mymage Mar 9, 2023
4167c94
[IMP] pos_event_sale: add EventEvent.getTicketSeatsAvailable
ivantodorovich Mar 14, 2023
905d940
[IMP] pos_event_sale: homogenize event info icons
ivantodorovich Mar 14, 2023
3861d5f
Translated using Weblate (Italian)
mymage Mar 16, 2023
5354848
pos_event_sale 15.0.1.0.3
OCA-git-bot Mar 27, 2023
c94ae2e
[IMP] pos_event_sale: Add hook to store currency_id for each existing…
Camille0907 Mar 29, 2023
76cb412
[FIX] pos_event_sale: ignore adding tickets with missing data
ivantodorovich Mar 29, 2023
c669601
[IMP] pos_event_sale: Add search and filters to the EventSelector
ivantodorovich Apr 3, 2023
21a3f04
[FIX] pos_event_sale: wrong instanceof check
ivantodorovich Apr 3, 2023
91710a4
[FIX] pos_event_sale: properly handle `raiseIfNotFound` in case of Ar…
ivantodorovich Apr 3, 2023
1af7729
pos_event_sale 15.0.1.0.4
OCA-git-bot Apr 4, 2023
c07f95c
[UPD] Update pos_event_sale.pot
Apr 4, 2023
f6fcaad
pos_event_sale 15.0.2.0.0
OCA-git-bot Apr 4, 2023
c6bbd50
Update translation files
weblate Apr 4, 2023
190ff76
[IMP] pos_event_sale: copy event_ticket_id when cloning an Orderline
ivantodorovich Apr 4, 2023
42ec962
[FIX] pos_event_sale: confirm only draft registrations
ivantodorovich Apr 4, 2023
c696258
[FIX] pos_event_sale: avoid cancelling done registrations
ivantodorovich Apr 4, 2023
19c4039
[FIX] pos_event_sale: disable auto_confirmation
ivantodorovich Apr 4, 2023
5bc27d1
[FIX] pos_event_sale: cancel refunded registrations when paid
ivantodorovich Apr 4, 2023
d1afe6b
[IMP] pos_event_sale: allow to negate lines
ivantodorovich Apr 4, 2023
85ff5eb
[IMP] pos_event_sale: refactor and add unit tests
ivantodorovich Apr 5, 2023
4990a16
pos_event_sale 15.0.3.0.0
OCA-git-bot Apr 6, 2023
e3682cd
Remove duplication of event.type.ticket code in event.event.ticket
Camille0907 Apr 7, 2023
37e7c90
[UPD] Update pos_event_sale.pot
Apr 7, 2023
137d6b8
pos_event_sale 15.0.3.0.1
OCA-git-bot Apr 7, 2023
f00dfe0
Update translation files
weblate Apr 7, 2023
3e828d3
Translated using Weblate (Italian)
mymage Apr 10, 2023
364f7f4
[FIX] pos_event_sale: wrong value for payment_status computation
ivantodorovich Apr 11, 2023
a571ffa
[IMP] pos_event_sale: implement event registration reprinting
ivantodorovich Apr 11, 2023
d87a1a0
pos_event_sale 15.0.3.1.0
OCA-git-bot Apr 12, 2023
3e203ef
[IMP] pos_event_sale: pre-commit stuff
BT-cserra Jun 8, 2023
7b32808
[IMP] pos_event_sale: pre-commit execution
maq-adhoc Jun 11, 2024
0d9966f
[MIG] pos_event_sale: Migration to 16.0
maq-adhoc Jun 11, 2024
8a32646
[16.0][MIG] pos_event_sale: Migration to 16.0
BT-dmoreno Jul 4, 2023
1849bed
[FIX] pos_event_sale: Click on open session button
dal-adhoc Aug 16, 2024
d4ba491
[FIX] pos_event_sale: Added extra checks, remove numpad press on cash
dal-adhoc Aug 16, 2024
fb12af5
[IMP] formating code
maq-adhoc Aug 20, 2024
d6a1b82
[FIX] pos_event_sale: Attempt to click on 'More...'
dal-adhoc Aug 23, 2024
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
122 changes: 122 additions & 0 deletions pos_event_sale/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
====================
Point of Sale Events
====================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/15.0/pos_event_sale
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-15-0/pos-15-0-pos_event_sale
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/184/15.0
:alt: Try me on Runbot

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

Sell events tickets from the Point of Sale

**Table of contents**

.. contents::
:local:

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

Go to *Point of Sale > Configuration > Point of Sale* and enable *Sell Events*
on the desired PoS.

Optionally, you can choose to filter on a list of Event Types.

Enable *Available in PoS* on all event products related to event tickets you
want to sell in PoS. If the ticket product is not available on the pos,
the ticket won't be available neither.

Usage
=====


- Click on the Add Event button, or on any Event product.

.. image:: https://raw.githubusercontent.com/OCA/pos/15.0/pos_event_sale/static/description/add_event_button.png

- Use the calendar widget to filter the events, and click on one.

.. image:: https://raw.githubusercontent.com/OCA/pos/15.0/pos_event_sale/static/description/event_calendar.png

- Add as many Tickets as you want

.. image:: https://raw.githubusercontent.com/OCA/pos/15.0/pos_event_sale/static/description/ticket_selector.png

Known issues / Roadmap
======================


* Handle event registration details. It could be another popup right
before going to payment (similar to core `event_sale` workflow).

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_event_sale%0Aversion:%2015.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
~~~~~~~

* Camptocamp

Contributors
~~~~~~~~~~~~

* `Camptocamp <https://www.camptocamp.com>`_

* Iván Todorovich <[email protected]>

* `Moka Tourisme <https://www.mokatourisme.fr>`_

* Grégory Schreiner <[email protected]>

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.

.. |maintainer-ivantodorovich| image:: https://github.com/ivantodorovich.png?size=40px
:target: https://github.com/ivantodorovich
:alt: ivantodorovich

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ivantodorovich|

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/15.0/pos_event_sale>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions pos_event_sale/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .hooks import post_init_hook, pre_init_hook
from . import models
from . import reports
40 changes: 40 additions & 0 deletions pos_event_sale/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright 2021 Camptocamp (https://www.camptocamp.com).
# @author Iván Todorovich <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Point of Sale Events",
"summary": "Sell events from Point of Sale",
"author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pos",
"category": "Marketing",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"maintainers": ["ivantodorovich"],
"depends": ["event_sale", "point_of_sale"],
"data": [
"security/security.xml",
"reports/report_pos_order.xml",
"views/event_registration.xml",
"views/event_event.xml",
"views/pos_order.xml",
"views/res_config_settings.xml",
],
"assets": {
"point_of_sale.assets": [
"web/static/lib/fullcalendar/core/main.css",
"web/static/lib/fullcalendar/daygrid/main.css",
"web/static/lib/fullcalendar/core/main.js",
"web/static/lib/fullcalendar/daygrid/main.js",
"web/static/lib/fullcalendar/interaction/main.js",
"pos_event_sale/static/src/js/**/*.js",
"pos_event_sale/static/src/scss/**/*.scss",
"pos_event_sale/static/src/xml/**/*.xml",
],
"web.assets_tests": [
"pos_event_sale/static/tests/tours/**/*",
],
},
"pre_init_hook": "pre_init_hook",
"post_init_hook": "post_init_hook",
}
45 changes: 45 additions & 0 deletions pos_event_sale/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2022 Moka Tourisme (https://www.mokatourisme.fr).
# @author Iván Todorovich <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

import logging

from odoo import SUPERUSER_ID, api
from odoo.tools.sql import column_exists, create_column

_logger = logging.getLogger(__name__)


def pre_init_hook(cr):
"""Store currency_id in database for each existing pos_order_line"""
if not column_exists(cr, "pos_order_line", "currency_id"):
_logger.info("Pre-computing pos.order.line.currency_id..")
create_column(cr, "pos_order_line", "currency_id", "int4")
cr.execute(
"""
WITH pos_order_line_currency AS (
SELECT
pol.id AS id,
COALESCE(aj.currency_id, rc.currency_id) AS currency_id
FROM pos_order_line AS pol
JOIN pos_order AS po ON pol.order_id = po.id
JOIN pos_session AS ps ON po.session_id = ps.id
JOIN pos_config AS pc ON ps.config_id = pc.id
JOIN res_company AS rc ON pc.company_id = rc.id
LEFT JOIN account_journal AS aj ON pc.journal_id = aj.id
)
UPDATE pos_order_line
SET currency_id = pos_order_line_currency.currency_id
FROM pos_order_line_currency
WHERE pos_order_line.id = pos_order_line_currency.id
"""
)


def post_init_hook(cr, __):
"""Set the Event Registration product available for POS"""
env = api.Environment(cr, SUPERUSER_ID, {})
product = env.ref("event_sale.product_product_event", raise_if_not_found=False)
if product:
_logger.info("Setting default Event Product as available in Point of Sale..")
product.available_in_pos = True
Loading
Loading