Skip to content

Commit ce76d23

Browse files
committed
[IMP] _rep_cost: less depends, better performance
Dejamos depends igual que como tenemos en 18+ ver acá 499693f X-original-commit: 62f205b
1 parent 73a36fa commit ce76d23

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

product_replenishment_cost/models/product_replenishment_cost_rule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def _get_eval_context(self, obj=None):
7272
if not obj and self.env.context.get('active_id') \
7373
and self.env.context.get('active_model') == 'product.template':
7474
obj = model.browse(self.env.context['active_id'])
75-
7675
return {
7776
'env': env,
7877
'model': model,

product_replenishment_cost/models/product_template.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,11 @@ def _compute_replenishment_cost_last_update(self):
188188
# rule
189189
# 'replenishment_base_cost_currency_id',
190190
# # because of being stored
191-
'replenishment_base_cost_currency_id.rate_ids.rate',
191+
'replenishment_base_cost_currency_id',
192192
# # and this if we change de date (name field)
193193
# 'replenishment_base_cost_currency_id.rate_ids.name',
194194
# rule items
195-
'replenishment_cost_rule_id.item_ids.sequence',
196-
'replenishment_cost_rule_id.item_ids.percentage_amount',
197-
'replenishment_cost_rule_id.item_ids.fixed_amount',
195+
'replenishment_cost_rule_id',
198196
)
199197
@api.depends_context('company')
200198
def _compute_replenishment_cost(self):

0 commit comments

Comments
 (0)