diff options
| author | nie <nie@odoo.com> | 2021-05-17 10:02:06 +0000 |
|---|---|---|
| committer | nie <nie@odoo.com> | 2021-05-21 11:24:25 +0000 |
| commit | bee8ac5ccf8106b25566332e769b73e8f707d05b (patch) | |
| tree | 3c8f3bd5757905e83ebe5ea96dd465726eab91d6 /addons/pos_cache | |
| parent | ed723be917637320fc4d2787bdf505e4a7a8216d (diff) | |
[FIX] event_sale: ticket price with pricelist
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#71114
X-original-commit: e92282f712d485ca97feb8a729abe3b975183451
Signed-off-by: backspac <backspac@users.noreply.github.com>
Diffstat (limited to 'addons/pos_cache')
0 files changed, 0 insertions, 0 deletions
