Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] fieldservice_activity #450

Closed
19 tasks done
max3903 opened this issue Dec 24, 2019 · 2 comments
Closed
19 tasks done

[RFC] fieldservice_activity #450

max3903 opened this issue Dec 24, 2019 · 2 comments
Assignees
Milestone

Comments

@max3903
Copy link
Sponsor Member

max3903 commented Dec 24, 2019

Depends on fieldservice
License: AGPL-3

On the Field Service order, the instructions allow you to enter the different tasks or activities that need to be performed as un-structured content.

This module allows you to define activity on a template/order, define whether the activity is required or not and a reference. Once an activity is completed, the date and person are stored.

All the required activities needs to be completed to complete the FSM order.

Configuration

  • Go to Field Service > Configuration > Settings
  • Activate the FSM Order Templates if you don't want to keep creating the same activities

Usage

Templates

  • Go to Field Service > Master Data > Templates
  • Create or select a template
  • Go to the Activities tab to add activities
  • Set their name, whether they are required or not and a reference (i.e a URL)

Orders

  • Go to Field Service > Operations > All Orders
  • Create or select an order
  • Select a template to copy the activities from that template
  • Create additional activities if necessary
  • Complete them when they are done or cancel them
  • Complete the order

Technical Specifications

fieldservice

res.config.settings

  • Add a boolean field "Manage Activities" (module_fieldservice_activity)

fieldservice_activity

fsm.activity

  • Add the object
  • Sort the records using the sequence field
  • Add a required char field "Name"
  • Add a boolean field "Required" (required). Default value is False.
  • Add an integer field "Sequence" (sequence). Use the "handle" widget when displaying the field in a list view.
  • Add a boolean field "Completed" (completed). Default value is False.
  • Add a datetime field "Completed on" (completed_on)
  • Add a char field "Completed on" (completed_by)
  • Add a char field (ref)
  • Add a many2one field "FSM Order" (fsm_order_id) to fsm.order.
  • Add a many2one field "FSM Template" (fsm_template_id) to fsm.template.
  • Set all fields as read-only if completed = True.
  • Add a method action_done to set:
  • completed = True
  • completed_on = now
  • completed_by = self.env.user.name

fsm.template

  • Add a one2many field "Activities" (activity_ids) to fsm.activity using fsm_template_id.

fsm.order

  • Add a one2many field "Activities" (activity_ids) to fsm.activity using fsm_order_id.
  • Show the completed_on and completed_by fields if completed is true.
  • Extend _onchange_template_id to copy the activities from the template to the fsm order.
  • Extend the action_complete method to check that all the required activities are completed. Raise an error message otherwise: "You need to complete all the required activities to complete this order!"

User Interface

FSM Template

Screenshot from 2019-12-24 15-30-30

FSM Order with Activities

Screenshot from 2019-12-24 15-32-03

FSM Order with Completed Activities

Screenshot from 2019-12-24 15-44-34

@max3903 max3903 added this to the 12.0 milestone Dec 24, 2019
@max3903 max3903 self-assigned this Dec 24, 2019
@brian10048
Copy link
Sponsor Contributor

@max3903 Looks like a good start to me and that you have a good bit of the work already done based on those screenshots!

What are your thoughts on adding a response type and response value field to activities? Similar to a quality control point in MRP app. For example, a pass/fail response, a numeric response within a range of values, a text response, or a pre-defined list of responses from which the user would choose at the time of activity completion.

@max3903
Copy link
Sponsor Member Author

max3903 commented Dec 26, 2019

Ping @wolfhall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants