[IMP] various: improve section and add note on sale order and invoice

Enterprise counterpart of this commit: https://github.com/odoo/odoo/commit/762adedece1c6c2b97b282348659c1b39b988d24

In enterprise the commit will also remove most of the features of website_quote_subscription because they became obsolete with the ability to create sections.

Indeed the feature was to automatically regroup recurring subscriptions in a "section" at the bottom of the documents. Now if the sale persons want that behavior they can just create an actual section.

Task #53996
PR #2276
This commit is contained in:
Ravi Gadhia
2018-07-17 13:13:15 +02:00
committed by Sébastien Theys
parent 977e1dfe66
commit efa70274cf
+1 -1
View File
@@ -214,7 +214,7 @@ class SaleCouponProgram(models.Model):
i.e Buy 1 imac + get 1 ipad mini free then check 1 imac is on cart or not
or Buy 1 coke + get 1 coke free then check 2 cokes are on cart or not
"""
order_lines = order.order_line - order._get_reward_lines()
order_lines = order.order_line.filtered(lambda line: line.product_id) - order._get_reward_lines()
products_qties = dict.fromkeys([product for product in order_lines.mapped('product_id')], 0)
for line in order_lines:
products_qties[line.product_id] += line.product_uom_qty