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_currency_id

View 17.0
Inputs Method Outputs
  • expense_line_ids
  • is_multiple_currency
  • payment_mode
  • company_currency_id
- for sheet in self:
-             if not sheet.expense_line_ids or sheet.is_multiple_currency or sheet.payment_mode == 'own_account':
-                 sheet.currency_id = sheet.company_currency_id
-             else:
-                 sheet.currency_id = sheet.expense_line_ids[:1].currency_id
  • currency_id

Back to entity