[ADD] maintenance_project_task_domain
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m29s

This commit is contained in:
2025-10-21 16:22:39 +02:00
parent ab57dc9c40
commit edeacc4555
5 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
*.*~
*pyc

View File

@@ -0,0 +1,36 @@
===============================
maintenance_project_task_domain
===============================
This module adjusts the domain applied to task field in order to limit
selection to tasks in any of unfolded stages.
# Installation
Use Odoo normal module installation procedure to install
`maintenance_project_task_domain`.
# Known issues / Roadmap
# 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
- Quentin Mondot
## Funders
The development of this module has been financially supported by:
- Elabore (https://elabore.coop)
## Maintainer
This module is maintained by Elabore.

View File

@@ -0,0 +1,20 @@
# Copyright 2025 Quentin Mondot
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "maintenance_project_task_domain",
"version": "16.0.1.0.0",
"author": "Elabore",
"website": "https://elabore.coop",
"maintainer": "Quentin Mondot",
"license": "AGPL-3",
"category": "Tools",
"summary": "This module adjusts the domain applied to task field in order to limit "
"selection to tasks in any of unfolded stages.",
"depends": ["maintenance_project"],
"data": [
"views/maintenance_view_form_task_domain.xml"
],
"installable": True,
"auto_install": True,
"application": False,
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="maintenance_view_form_task_domain" model="ir.ui.view">
<field name="name">maintenance.form.task.domain</field>
<field name="model">maintenance.request</field>
<field name="inherit_id" ref="maintenance_project.hr_equipment_request_view_form" />
<field name="priority" eval="99" />
<field name="arch" type="xml">
<xpath expr="//field[@name='task_id' and @domain]" position="attributes">
<attribute
name="domain"
>[('project_id', '=', project_id),('stage_id.fold', '=', False)]</attribute>
</xpath>
</field>
</record>
</odoo>