Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Expenses

Entity: hr.expense.sheet

Compute Method: _compute_selectable_payment_method_line_ids

View 18.0
Inputs Method Outputs
  • company_id
  • company_id.company_expense_allowed_payment_method_line_ids
  • company_id.id
- for sheet in self:
-             allowed_method_line_ids = sheet.company_id.company_expense_allowed_payment_method_line_ids
-             if allowed_method_line_ids:
-                 sheet.selectable_payment_method_line_ids = allowed_method_line_ids
-             else:
-                 sheet.selectable_payment_method_line_ids = self.env['account.payment.method.line'].search([
-                     ('payment_type', '=', 'outbound'),
-                     ('journal_id.active', '=', True),
-                     ('company_id', 'parent_of', sheet.company_id.id)
-                 ])
  • selectable_payment_method_line_ids

Back to entity