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_state

View 17.0
Inputs Method Outputs
  • payment_state
  • account_move_ids
  • approval_state
- for sheet in self:
-             if sheet.payment_state != 'not_paid':
-                 sheet.state = 'done'
-             elif sheet.account_move_ids:
-                 sheet.state = 'post'
-             elif sheet.approval_state:
-                 sheet.state = sheet.approval_state
-             else:
-                 sheet.state = 'draft'
  • state

Back to entity