diff --git a/models/hr_expense.py b/models/hr_expense.py index b57e72b2e492a08e7f0a45ab4c79f5322cc7bdce..4bf33ce8a44a975217140de393c7431da1f8c2d0 100644 --- a/models/hr_expense.py +++ b/models/hr_expense.py @@ -123,10 +123,12 @@ class CGScopExpense(models.Model): """ Définit le comportement lorsqu'on coche Aller/Retour """ - if self.is_return: - self.quantity = self.quantity * 2 - elif not self.is_return: - self.quantity = self.quantity / 2 + if ((self.product_id.expense_formula == 'fixed_price') and + (self.product_id.is_ik)): + if self.is_return: + self.quantity = self.quantity * 2 + elif not self.is_return: + self.quantity = self.quantity / 2 # ------------------------------------------------------ # Button function