[ADD] maintenance_equipment_customer: add customer contact link
Some checks failed
tests / test (pull_request) Successful in 1m9s
pre-commit / pre-commit (pull_request) Failing after 1m34s

Store the company contact owning the equipment as a single many2one field,
restricted to company partners. Expose linked equipment and installed
services on the contact form and filters, so contacts can be searched by
service and version.
This commit is contained in:
Stéphan Sainléger
2026-11-17 17:21:11 +01:00
parent 01cf43a97e
commit 56951f779d
11 changed files with 543 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
# =================================== maintenance_equipment_customer
This module links maintenance equipment to the company contact that owns it. It also
exposes the equipment's installed services on the contact, so contacts can be filtered
by service and service version.
A single company contact is allowed per equipment. Individual contacts are rejected
because an equipment belongs to a structure, not to a person attached to that structure.
Features:
- **Customer contact on equipment**: a _Customer Contact_ field is available under the
equipment name and is restricted to company contacts.
- **Equipment on contacts**: a stat button on the contact form opens the equipment
linked to that contact.
- **Service-based contact filtering**: contacts can be filtered by maintenance service
and service version (e.g. contacts having an Odoo 14 instance).
# Installation
Use Odoo normal module installation procedure to install
`maintenance_equipment_customer`.
This module depends on:
- `maintenance`
- `maintenance_server_data`
# Configuration
No specific configuration is required. After installation, the new fields are available
on the maintenance equipment and contact forms.
# Usage
## Linking equipment to a customer
1. Go to _Maintenance > Equipments_.
2. Open an equipment record.
3. Fill in the **Customer Contact** field under the equipment name.
4. Only company contacts can be selected.
## Viewing equipment from a contact
1. Go to _Contacts_.
2. Open a company contact.
3. Click the **Equipment** stat button to see its maintenance equipment.
## Filtering contacts by service
1. Go to _Contacts_.
2. In the search bar, select **Maintenance Service** and/or **Maintenance Service
Version**.
3. For example, select service _Odoo_ and version _14.0_ to find contacts with an Odoo
14 instance.
# Bug Tracker
Bugs are tracked on
[our issues website](https://github.com/elabore-coop/maintenance-tools/issues). In case
of trouble, please check there if your issue has already been reported. If you spotted
it first, help us smashing it by providing a detailed and welcomed feedback.
# Credits
## Contributors
- Stéphan Sainléger
## Funders
The development of this module has been financially supported by:
- Elabore (https://elabore.coop)
## Maintainer
This module is maintained by Elabore.