Skip to content

Commit 1fe4a9a

Browse files
authored
Merge pull request OCA#713 from Tecnativa/11.0-fix-sale_order_product_recommendation-wiz
[FIX] sale_order_product_recommendation: wizard didn't properly get on memory created lines
2 parents 3f446e9 + 6d95a59 commit 1fe4a9a

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

sale_order_product_recommendation/wizards/sale_order_recommendation.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ def _generate_recommendations(self):
110110
if i == self.line_amount:
111111
break
112112

113-
@api.model
114-
def create(self, vals):
115-
if 'line_ids' in vals:
116-
vals['line_ids'] = [
117-
line for line in vals['line_ids'] if line[2]["is_modified"]]
118-
return super(SaleOrderRecommendation, self).create(vals)
119-
120113
@api.multi
121114
def action_accept(self):
122115
"""Propagate recommendations to sale order."""

sale_order_product_recommendation/wizards/sale_order_recommendation_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<field name="currency_id" invisible="1"/>
2323
<field name="sale_line_id" invisible="1"/>
2424
<field name="is_modified" invisible="1"/>
25-
<field name="product_id" readonly="1"/>
25+
<field name="product_id" readonly="1" force_save="1"/>
2626
<field name="price_unit"/>
2727
<field name="times_delivered"/>
2828
<field name="units_delivered"/>

0 commit comments

Comments
 (0)