8bbe9c8be3000bfaab7e096d01d1851b39a8cba9
In this commit, we are changing the way prices of the components of a combo product is calculated. The idea is that a combo product's price should behave similarly as normal products. This results to a simpler logic in calculating the prices of the components. In order to get the fraction that will be used to scale the prices of the component products, the lst_price of the combo product is divided by the total of the pos.combo.base_price. This ratio is then multiplied to each pos.combo.base_price to get the pro-rated unit price of each component. We then proceed to normal calculation of taxes based on the tax configuration of the selected products. Furthermore, we are now taking into account the extra prices from the selected attributes. If the orderline is a component of a combo (menu) product, the extra prices of the attributes are added on top of the prorated unit price, just like we do with the `pos.combo.line`'s `combo_price`. E.g.: ``` product.product.1 -> lst_price = 10 A1 -> price_extra = 5 A3 -> price_extra = 3 pos.order.line.1, product.product.1, attributes=[A1,A3] -> price_unit = 10 + 5 + 3 = 18 ``` One more thing, there is a regression in the combo configurator popup where the total price of the selection is removed. It should be restored in the future with calculation that properly follows the description above. closes odoo/odoo#139915 Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.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%