-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by pedrobaeza
- Loading branch information
Showing
22 changed files
with
1,053 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
================================================= | ||
Online event ticket sales with alternative prices | ||
================================================= | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:b94936e2af17bc8cf56c05b552790bd033aa91470c84ebc0aaebb815b7623224 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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-LGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
:alt: License: LGPL-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_sale_b2x_alt_price | ||
: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_sale_b2x_alt_price | ||
: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 extends the functionality of website event sales to support | ||
displaying the alternative price in the website event registration page | ||
and to allow your visitors to know the final price in case they will | ||
have some special fiscal tax behavior. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
1. Configure some tickets for your event. | ||
2. The product associated with the tickets should have taxes. | ||
3. Publish the event. | ||
|
||
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_sale_b2x_alt_price%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://www.tecnativa.com>`__: | ||
|
||
- Jairo Llopis | ||
- Carlos Roca | ||
- David Vidal | ||
- Pilar Vargas | ||
|
||
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-Yajo| image:: https://github.com/Yajo.png?size=40px | ||
:target: https://github.com/Yajo | ||
:alt: Yajo | ||
|
||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-Yajo| | ||
|
||
This module is part of the `OCA/event <https://github.com/OCA/event/tree/17.0/website_event_sale_b2x_alt_price>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2021 Tecnativa - Jairo Llopis | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
{ | ||
"name": "Online event ticket sales with alternative prices", | ||
"summary": "Display alt. price (B2B for B2C websites, and viceversa)", | ||
"version": "17.0.1.0.0", | ||
"development_status": "Beta", | ||
"category": "Website", | ||
"website": "https://github.com/OCA/event", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"maintainers": ["Yajo"], | ||
"license": "LGPL-3", | ||
"auto_install": True, | ||
"depends": ["website_event_sale", "website_sale_b2x_alt_price"], | ||
"data": ["templates/website_event_sale.xml"], | ||
"assets": { | ||
"web.assets_frontend": [ | ||
"/website_event_sale_b2x_alt_price/static/src/scss/website_event.scss", | ||
], | ||
"web.assets_tests": [ | ||
"/website_event_sale_b2x_alt_price/static/src/js/b2b_with_discount.esm.js", | ||
"/website_event_sale_b2x_alt_price/static/src/js/b2b.esm.js", | ||
"/website_event_sale_b2x_alt_price/static/src/js/b2c_with_discount.esm.js", | ||
"/website_event_sale_b2x_alt_price/static/src/js/b2c.esm.js", | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_event_sale_b2x_alt_price | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2024-03-21 20:34+0000\n" | ||
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n" | ||
"Language-Team: none\n" | ||
"Language: es\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.17\n" | ||
|
||
#. module: website_event_sale_b2x_alt_price | ||
#: model:ir.model,name:website_event_sale_b2x_alt_price.model_event_event_ticket | ||
msgid "Event Ticket" | ||
msgstr "Entrada para el Evento" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_event_sale_b2x_alt_price | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2023-07-18 14:11+0000\n" | ||
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n" | ||
"Language-Team: none\n" | ||
"Language: it\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.17\n" | ||
|
||
#. module: website_event_sale_b2x_alt_price | ||
#: model:ir.model,name:website_event_sale_b2x_alt_price.model_event_event_ticket | ||
msgid "Event Ticket" | ||
msgstr "Biglietto evento" |
19 changes: 19 additions & 0 deletions
19
website_event_sale_b2x_alt_price/i18n/website_event_sale_b2x_alt_price.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_sale_b2x_alt_price | ||
# | ||
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_sale_b2x_alt_price | ||
#: model:ir.model,name:website_event_sale_b2x_alt_price.model_event_event_ticket | ||
msgid "Event Ticket" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import event_ticket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2021 Tecnativa - Jairo Llopis | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo import models | ||
|
||
|
||
class EventEventTicket(models.Model): | ||
_inherit = "event.event.ticket" | ||
|
||
def _get_ticket_combination_info(self): | ||
"""Imitate product.template's _get_combination_info().""" | ||
website = self.env["website"].get_current_website(fallback=False) | ||
# Obtain the inverse field of the normal b2b/b2c behavior | ||
alt_field = ( | ||
"total_included" | ||
if website.show_line_subtotals_tax_selection == "tax_excluded" | ||
else "total_excluded" | ||
) | ||
price, alt_price = self.price_reduce, self.price_reduce_taxinc | ||
# Inverse them if taxes excluded | ||
if alt_field == "total_excluded": | ||
price, alt_price = alt_price, price | ||
return { | ||
"alt_field": alt_field, | ||
"alt_list_price": alt_price, | ||
"alt_price": alt_price, | ||
"price": price, | ||
# HACK OPW-2518694: discounted price is always tax-excluded | ||
# TODO Check behavior when fixed | ||
"has_discounted_price": False, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["whool"] | ||
build-backend = "whool.buildapi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- [Tecnativa](https://www.tecnativa.com): | ||
- Jairo Llopis | ||
- Carlos Roca | ||
- David Vidal | ||
- Pilar Vargas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This module extends the functionality of website event sales to support | ||
displaying the alternative price in the website event registration page | ||
and to allow your visitors to know the final price in case they will | ||
have some special fiscal tax behavior. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
To use this module, you need to: | ||
|
||
1. Configure some tickets for your event. | ||
2. The product associated with the tickets should have taxes. | ||
3. Publish the event. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.