diff --git a/models/account_payment.py b/models/account_payment.py index fba0216..023d3d3 100644 --- a/models/account_payment.py +++ b/models/account_payment.py @@ -27,10 +27,6 @@ class AccountPayment(models.Model): payment._synchronize_to_moves({'amount', 'deduction_line_ids', 'amount_substract'}) # 2. Standard confirmation logic with bypass flag for internal writes - hr_expense_class = self._get_hr_expense_base_class() - if hr_expense_class: - return super(hr_expense_class, self.with_context(skip_expense_lock=True)).action_post() - return super(AccountPayment, self.with_context(skip_expense_lock=True)).action_post() def _synchronize_to_moves(self, changed_fields): @@ -95,11 +91,7 @@ class AccountPayment(models.Model): def action_cancel(self): # Propagate bypass flag during cancel - hr_expense_class = self._get_hr_expense_base_class() - if hr_expense_class: - res = super(hr_expense_class, self.with_context(skip_expense_lock=True)).action_cancel() - else: - res = super().action_cancel() + res = super(AccountPayment, self.with_context(skip_expense_lock=True)).action_cancel() for payment in self: if payment.expense_ids: @@ -110,11 +102,7 @@ class AccountPayment(models.Model): def action_draft(self): # Propagate bypass flag during reset to draft - hr_expense_class = self._get_hr_expense_base_class() - if hr_expense_class: - res = super(hr_expense_class, self.with_context(skip_expense_lock=True)).action_draft() - else: - res = super().action_draft() + res = super(AccountPayment, self.with_context(skip_expense_lock=True)).action_draft() for payment in self: if payment.expense_ids: