Skip to content

[6788][ADD] maintenance_equipment_usability - #10

Open
smorita7749 wants to merge 8 commits into
18.0from
6788-add-maintenance_equipment_usability
Open

smorita7749 wants to merge 8 commits into
18.0from
6788-add-maintenance_equipment_usability

Conversation

@smorita7749

Copy link
Copy Markdown
Contributor

Add maintenance_equipment_usability.

Computes equipment usability from the equipment status, the latest completed maintenance request result, and a configurable usability grace period.

  • Equipment status (Preparing / Operating / Idle / Retired / Scrapped): only equipment in the Operating status can be usable.
  • Maintenance result (Passed / Failed) on maintenance requests, with follow-up request creation for failed results.
  • Usability (Unknown / Usable / Unusable) computed on the equipment (not stored; searchable), with badges and filters on the equipment list/kanban/search.
  • Usability grace period configured per company in Settings > Maintenance (default 12 months).

@smorita7749
smorita7749 force-pushed the 6788-add-maintenance_equipment_usability branch from 7023b5d to 6fd5595 Compare July 10, 2026 01:56
@smorita7749
smorita7749 force-pushed the 6788-add-maintenance_equipment_usability branch 3 times, most recently from 600ccb3 to ae51bb1 Compare July 22, 2026 13:33
Comment thread maintenance_equipment_usability/models/maintenance_equipment.py
Comment thread maintenance_equipment_usability/models/res_company.py Outdated
Comment thread maintenance_equipment_usability/models/res_config_settings.py Outdated
Comment thread maintenance_equipment_usability/models/maintenance_equipment.py Outdated
… flag

Equipment flagged as Maintenance Not Required is excluded from the
maintenance result evaluation: it is usable while it is in the Operating
status, regardless of its maintenance requests.
@smorita7749

Copy link
Copy Markdown
Contributor Author

Pushed 5d54443 to 6788-add-maintenance_equipment_usability.

 .../views/maintenance_equipment_views.xml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

usability_state and status are now inserted before category_id instead of after it, and in that order, so the equipment form starts with Usability, Status, Category. The customer asked for that order, and inserting before category_id also keeps it stable against #9, which inserts its own fields after category_id.

maintenance_exempt stays where it was, in a separate operation after category_id. #9 moves it into its Inspection page and relabels it Inspection Exempt (点検対象外); with this module installed alone it keeps its current place and its Maintenance Not Required label.

This reverts commit 5d54443.
This reverts commit d062258.
comodel_name="maintenance.request",
compute="_compute_latest_maintenance_result",
store=True,
readonly=True,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
readonly=True,

latest_maintenance_result_date = fields.Date(
compute="_compute_latest_maintenance_result",
store=True,
readonly=True,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
readonly=True,

comodel_name="maintenance.request",
string="Source Request",
copy=False,
readonly=True,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
readonly=True,

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants