Skip to content
Health
60/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 5 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 18.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.75 MB
Module directory on disk
Code analysis 0 migration notes 6 models 6 views 0 HTTP endpoints

Description

This module integrates Field Service with Purchasing to automate the subcontracting workflow.

It allows users to:

  1. Mark subcontractor vendors on partners.
  2. Configure a service product on Field Service order templates.
  3. Resolve the Purchase Order vendor from the assigned worker or its parent company.
  4. Create draft Purchase Orders for subcontracted orders.
  5. Set the Purchase Order Expected Arrival from the Field Service Order Scheduled End.
  6. Keep the Purchase Order Expected Arrival synchronized when the Field Service Order planned dates change.
  7. Update delivered quantities from Field Service timesheets.
  8. Reassign workers on orders with linked subcontract Purchase Orders.

The module uses fieldservice_stage_server_action to trigger automation on stage transitions.

Dependencies

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 6

XML IDNameModelTypeStatus
fsm_order_cancel_confirm_form_view fsm.order.cancel.confirm.form fsm.order.cancel.confirm form New
fsm_order_form_view_subcontracting fsm.order.form.subcontracting fsm.order form Inherits fieldservice.fsm_order_form
fsm_order_reassign_confirm_form_view fsm.order.reassign.confirm.form fsm.order.reassign.confirm form New
fsm_partner_form_view_subcontracting res.partner.form.subcontracting res.partner form Inherits fieldservice.fsm_partner_fields
fsm_template_form_view_subcontracting fsm.template.form.subcontracting fsm.template form Inherits fieldservice.fsm_template_form_view
purchase_order_form_view_subcontracting purchase.order.form.subcontracting purchase.order form Inherits purchase.purchase_order_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 6

New fields (3)
  • purchase_order_count Integer
    compute='_compute_purchase_order_count'
  • purchase_order_ids One2many → purchase.order
    comodel_name='purchase.order' help='Purchase Order auto-created when this FSO was assigned to a subcontractor worker.' inverse_name='fsm_order_id' string='Subcontract POs'
  • reassign_worker Boolean
    compute='_compute_reassign_worker' help='Determine if a worker reassignment can be performed.'
Public methods (4)
  • action_cancel(self)
    Ask how to handle active subcontract POs before cancelling the FSO.
  • action_open_reassign_confirm(self)
    Open the reassignment confirmation wizard.
  • action_view_purchase_order(self)
    Smart button action to open linked Purchase Orders.
  • write(self, vals)

New fields (3)
  • fsm_order_id Many2one → fsm.order
    comodel_name='fsm.order' readonly=True required=True string='Field Service Order'
  • purchase_order_ids Many2many → purchase.order
    comodel_name='purchase.order' compute='_compute_purchase_order_ids' readonly=True string='Purchase Orders'
  • warning_message Text
    compute='_compute_warning_message'
Public methods (2)
  • action_cancel_fsm_and_purchase_orders(self)
    Cancel related Purchase Orders and then cancel the FSO.
  • action_cancel_fsm_only(self)
    Cancel the FSO and keep related Purchase Orders open.

New fields (4)
  • fsm_order_id Many2one → fsm.order
    comodel_name='fsm.order' readonly=True required=True string='Field Service Order'
  • new_person_id Many2one → fsm.person
    comodel_name='fsm.person' required=True string='New Worker'
  • purchase_order_ids Many2many → purchase.order
    comodel_name='purchase.order' compute='_compute_purchase_order_ids' readonly=True string='Purchase Orders'
  • warning_message Text
    compute='_compute_warning_message'
Public methods (1)
  • action_confirm(self)
    Cancel the POs and proceed with worker reassignment.

New fields (1)
  • subcontract_product_id Many2one → product.product
    comodel_name='product.product' domain=[('type', '=', 'service'), ('purchase_method', '=', 'receive')] help="Service product used on the Purchase Order line when an FSO of this type is subcontracted to an external worker. The product should have invoicing policy 'Based on Received Quantities' and supplierinfo configured for each vendor." string='Subcontracting Service Product'
Public methods (0)

No public methods.

New fields (2)
  • fsm_order_count Integer
    compute='_compute_fsm_order_count' string='FSO Count'
  • fsm_order_id Many2one → fsm.order
    comodel_name='fsm.order' copy=False help='The Field Service Order that generated this Purchase Order.' index=True ondelete='set null' string='Field Service Order'
Public methods (1)
  • action_view_fsm_order(self)
    Smart button action to open the linked FSO.

New fields (1)
  • is_fsm_subcontractor Boolean
    string='Is Subcontractor?'
Public methods (0)

No public methods.