Field Service - Subcontracting

fieldservice_subcontracting
REPOSITORY
REPOSITORYOCA/field-service
GIT
GIThttps://github.com/OCA/field-service.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/field-service/tree/18.0/fieldservice_subcontracting
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYField Service
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Binhex
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Binhex
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, Edilio Escalona Almira
WEBSITE
WEBSITEhttps://github.com/OCA/field-service
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-07 07:50:07
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/field-service:
    - fieldservice
    - base_territory
    - fieldservice_project
    - fieldservice_timesheet
    - fieldservice_stage_server_action
odoo/odoo:
    - base
    - base_geolocalize
    - base_setup
    - web
    - resource
    - contacts
    - mail
    - bus
    - web_tour
    - html_editor
    - project
    - analytic
    - uom
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - rating
    - digest
    - hr_timesheet
    - hr
    - phone_validation
    - resource_mail
    - hr_hourly_cost
    - base_automation
    - sms
    - iap_mail
    - iap
    - purchase
    - account
    - onboarding
    - product
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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.

Code Analysis

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 xpath 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 xpath Inherits fieldservice.fsm_partner_fields
fsm_template_form_view_subcontracting fsm.template.form.subcontracting fsm.template xpath Inherits fieldservice.fsm_template_form_view
purchase_order_form_view_subcontracting purchase.order.form.subcontracting purchase.order xpath 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.