Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions project_task_res_partner_building/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
:target: https://www.gnu.org/licenses/lgpl-3.0.html
:alt: License: LGPL-3

=====================
Project Task Building
=====================

Overview
========

The **Project Task Building** module extends the standard Odoo **Project** application by adding a new field to associate tasks with specific buildings (represented by `res.partner` records).

Features
========

- Adds a new field **"Building"** (`building_id`) to project tasks.
- The field is displayed in the task form view, just after the **Customer** (`partner_id`) field.
- The **Building** is a Many2one relation to `res.partner`, allowing reuse of existing partner records for building identification.

Use Case
========

This is particularly useful for construction, property management, or maintenance companies where each task must be linked to a specific building.

For example:
- A maintenance request can be assigned to a task and associated with the building it belongs to.
- Projects spanning multiple buildings can track individual tasks per location.

Usage
=====

1. Go to **Project > Tasks**.
2. Open any task form.
3. You will find a new field labeled **Building** after the **Customer** field.
4. Select a partner record that represents the building related to this task.

Configuration
=============

No additional configuration is required after installation.

Bug Tracker
===========

If you find any issues or bugs, please report them at:
`https://github.com/avanzosc/project-addons/issues <https://github.com/avanzosc/project-addons/issues>`_

Credits
=======

Contributors
------------

* Ana Juaristi <anajuaristi@avanzosc.es>
* Unai Beristain <unaiberistain@avanzosc.es>

License
=======

This module is licensed under the LGPL-3 License.

See: https://www.gnu.org/licenses/lgpl-3.0.html
1 change: 1 addition & 0 deletions project_task_res_partner_building/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
12 changes: 12 additions & 0 deletions project_task_res_partner_building/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Project Task Building",
"version": "16.0.1.0.0",
"category": "Project",
"author": "Avanzosc",
"license": "LGPL-3",
"depends": ["project"],
"data": ["views/project_task_views.xml"],
"installable": True,
"application": False,
"website": "https://github.com/avanzosc/project-addons",
}
1 change: 1 addition & 0 deletions project_task_res_partner_building/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import project_task
11 changes: 11 additions & 0 deletions project_task_res_partner_building/models/project_task.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from odoo import fields, models


class ProjectTask(models.Model):
_inherit = "project.task"

building_id = fields.Many2one(
"res.partner",
string="Building",
help="Select the building related to this task.",
)
13 changes: 13 additions & 0 deletions project_task_res_partner_building/views/project_task_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<odoo>
<record id="view_task_form_inherit_building" model="ir.ui.view">
<field name="name">project.task.form.inherit.building</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2" />
<field name="arch" type="xml">
<xpath expr="//group/group[2]/field[@name='partner_id']" position="after">
<field name="building_id" />
</xpath>
</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions setup/project_task_res_partner_building/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)