Anh Thao Pham (pta) c2e55d8ac7 [FIX] point_of_sale: fix ignored products from POS order report
- Open a POS session
- In the same POS order, add the following order lines:

     Product   |   Quantity   |   Price
  ----------------------------------------
    Product A  |      1       |  $ 1.00
    Product A  |     -1       |  $ 2.00
    Product B  |      1       |  $ 5.00

- The order has a total of $ 4.00
- Pay and validate order
- Go to Point of Sale > Reporting > Orders and switch to pivot view
The order has a total of 5.00

This is due to the fact that products, for which the sum of quantities is equal
to 0, are not retrieved by the SQL request.
(i.e. Sum of quantities for Product A = 1 - 1 = 0)
This is caused by the HAVING section that is there to prevent a division by 0
when computing average_price, which depends on the sum of quantities of the product.

The solution is to remove the HAVING section and to set average_price to NULL
when the sum of quantities for a product is equal to 0.

opw-2369023

closes odoo/odoo#63130

X-original-commit: 80d44f1735a49acf3a43c5c4638523d4434ac537
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-12-10 09:15:16 +00:00
2020-11-30 07:07:58 +00:00
2020-12-08 15:42:16 +00:00
2020-04-20 11:41:39 +00:00
…
…
…
2019-11-08 11:24:04 +00:00
2020-09-28 14:07:25 +00:00

Build Status Tech Doc Help Nightly Builds

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

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%