0940e14c39b46f46b47286821e6998bf0ca3f363
Steps:
- Install Events
- Go to Events / Configuration / Settings
- Enable Tickets
- Go to Sales / Configuration / Settings
- Enable Multiple Sales Prices per Product
- Go to Sales / Products
- Edit Event Registration
- Sales tab
- Pricing
- Pricelist: Public Pricelist (USD)
- Price: $6
- Go to Sales
- Create a new quotation
- Pricelist: Public Pricelist (USD)
- Product: Event Registration
- Event: Design Fair
- Ticket: VIP
Bug:
The pricelist is not taken into account. Unit price should be $900 but
is $1500.
Explanation:
The original issue comes from this commit: https://github.com/odoo/odoo/commit/379f1490c93dc599a74add2d678c18fbba1efa62
The advertised amount was not the one showing up in the cart. This is
because the pricelist was not taken into account anymore when entering
the payment process.
Using `price_reduce` instead of `price` enables all kinds of discounts
on the final price.
However, `price_reduce` relies on the context to find the current
pricelist.
This commit adds the context needed to compute the price of the tickets.
This context is the same as the one in the sales module since pricelists
are working fine there: https://github.com/odoo/odoo/blob/b208570ce8399bc6d3e4a8ba02eef6558e0a6ccc/addons/sale/models/sale.py#L1494
The currency conversion is done in `product.price`. It's therefore
already done when calling `price_reduce`.
opw:2519453
closes odoo/odoo#71175
X-original-commit: bee8ac5ccf8106b25566332e769b73e8f707d05b
Signed-off-by: backspac <backspac@users.noreply.github.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%