Skip to content

Commit

Permalink
[IMP] OCA#122 Past Due
Browse files Browse the repository at this point in the history
  • Loading branch information
osi-scampbell authored and murtuzasaleh committed Mar 16, 2020
1 parent 908217c commit 934f9a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions fieldservice/models/fsm_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def _onchange_customer_id_location(self):
duration = fields.Float(string='Actual duration',
compute=_compute_duration,
help='Actual duration in hours')
current_date = fields.Datetime(default=fields.datetime.now(), store=True)

# Location
territory_id = fields.Many2one('fsm.territory', string="Territory")
Expand Down
3 changes: 3 additions & 0 deletions fieldservice/views/fsm_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@
<filter string="Done"
domain="[('stage_id.is_closed', '=', True)]"
name="done"/>
<filter string="Past Due"
domain="[('stage_id.name', 'not in', ['Started', 'Completed', 'Cancelled']), ('scheduled_date_start', '&lt;', current_date)]"
name="past_due"/>
<separator/>
<group expand="0" string="Group By">
<filter name="territory_id" string="Territory" domain=""
Expand Down

0 comments on commit 934f9a9

Please sign in to comment.