Skip to content

Commit 21235cb

Browse files
committed
[UPD] Gimme more s***
1 parent 381ab47 commit 21235cb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sale_triple_discount/models/sale_order_line.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,19 @@ def triple_discount_preprocess(self):
110110
vals = {fname: 0 for fname in self._discount_fields()}
111111
vals["discount"] = line._get_final_discount()
112112

113-
line.invalidate_recordset(self._discount_fields())
114-
line._cache.update(vals)
113+
# line.invalidate_recordset(self._discount_fields())
114+
# line._cache.update(vals)
115+
line.update(vals)
115116
return prev_values
116117

117118
@api.model
118119
def triple_discount_postprocess(self, prev_values):
119120
"""Restore the discounts of the lines in the dictionary prev_values.
120121
Updating the cache provides consistency through re-computations."""
121122
for line, prev_vals_dict in list(prev_values.items()):
122-
line.invalidate_recordset(self._discount_fields())
123-
line._cache.update(prev_vals_dict)
123+
# line.invalidate_recordset(self._discount_fields())
124+
# line._cache.update(prev_vals_dict)
125+
line.update(prev_vals_dict)
124126

125127
def _convert_to_tax_base_line_dict(self):
126128
self.ensure_one()

0 commit comments

Comments
 (0)