File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
sale_triple_discount/models Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments