Skip to content

Installation Instructions

1. Add Package Dependency

Add limepkg-workorder as a dependency to your solution.

poetry add limepkg-workorder
poetry add limepkg-workorder-list-actions
poetry add limepkg-form-actions

2. Set up Database Structure

Different parts of the work order package requires different tables and fields to be present. It is possible to set them up manually, or use the addon-installer.

  1. Run the addon-installer for Workorder under Lime Admin -> Settings -> Workorder -> Setup
  2. Run the addon-installer for Form under Lime Admin -> Settings -> Form -> Setup
  3. If you are going to use the scheduledworkorder limetype make sure to enable Log changes in Lisa on it to ease troubleshooting.
  4. On the work order limetype: insert relations to objects that a work order may concern. Buildings, apartments, machines, services, etc. Usually the thing(s) your customer provides to their customers.

3. Set up Users and Groups

Perform these steps in LISA.

  1. Add users to the Field workers group. This group is used to control who should see the Work order list widget.

  2. Add users to the Certifiers group. This group is used to control who should be able to edit article rows when the status has changed from not approved. (Only applicable when using the decorator @certifiers_when_approved.)

  3. Add users to the Work Order Administrators group. This group is used to control who should be able to see the Resource Planner on the Start Page. (Only applicable when using the Resource Planner)

4. Set up Web Client

To be able to use the new lime types and features from this package, they need to be configured in Lime Admin.

  1. Create filters. Create at least these three filters in the work order table:

    1. My open "webclient.workorder.my_open" (coworker=$me and state=NotStarted OR Started)

      {
          "op": "AND",
          "exp": [
              {
                  "key": "coworker",
                  "op": "=",
                  "exp": "$me"
              },
              {
                  "key": "state",
                  "op": "IN",
                  "exp": ["NotStarted", "Started"]
              }
          ]
      }
      
    2. My finished "webclient.workorder.my_finished" (coworker=me and state=finished)

      {
          "op": "AND",
          "exp": [
              {
                  "key": "coworker",
                  "op": "=",
                  "exp": "$me"
              },
              {
                  "key": "state",
                  "op": "IN",
                  "exp": ["Finished"]
              }
          ]
      }
      
    3. Unassigned "webclient.workorder.unassigned" (coworker=null)

      {
          "key": "coworker",
          "op": "=",
          "exp": null
      }
      

5. Import Settings

The Settings files are to be imported one by one to designated places in Lime Admin ➡ Settings. By doing so, you will be more in control of which configurations you want to import. You will also receive more helpful error messages if that should happen.

The files that you should import are found on Github. There you will find configurations for:

  • Document Widget
  • Form
  • Scheduled LimeObject
  • Work Order
  • Work Order List
  • Work Order List Actions

6. Configure Maps

Follow instructions in Maps documentation

Recommended Maps configuration to use is found on Github

7. Custom Limeobjects

  1. Create a custom limeobject class for the lime type that corresponds to work orders. Decorate it with @workorder. This decorator will inject the necessary business logic to implement the different work order behaviors.

    from lime_type.limeobjects import LimeObject
    from limepkg_workorder.decorators import workorder
    
    
    @workorder()
    class Workorder(LimeObject):
        pass
    
    
    def register_limeobject_classes(register_class):
        register_class('workorder', Workorder)
    
  2. Create a custom limeobject class for the lime type that corresponds to article rows. Decorate it with @articlerow. This decorator will inject the necessary business logic to implement the different article row behaviors.

    from lime_type.limeobjects import LimeObject
    from limepkg_workorder.decorators import articlerow
    
    
    @articlerow()
    class ArticleRow(LimeObject):
        pass
    
    
    def register_limeobject_classes(register_class):
        register_class('articlerow', ArticleRow)
    

You should now be able to start Work order with the standard configuration. 🎉🎉🎉

Head to the configuration section if you want to tweak and tune your Work order setup to your customer's needs.