Compare commits
2 Commits
project_us
...
project_ta
Author | SHA1 | Date | |
---|---|---|---|
8c32e99f2f | |||
|
be81194749 |
@@ -17,7 +17,8 @@
|
||||
"project_working_time_task_portal"
|
||||
],
|
||||
"data": [
|
||||
"views/project_task_views.xml",
|
||||
"views/project_task_views.xml",
|
||||
"views/project_views.xml"
|
||||
],
|
||||
"installable": True,
|
||||
"application": False,
|
||||
|
1
project_task_billable_hours/models/__init__.py
Normal file
1
project_task_billable_hours/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import billable_time
|
16
project_task_billable_hours/models/billable_time.py
Normal file
16
project_task_billable_hours/models/billable_time.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from odoo import models, fields, api
|
||||
|
||||
class Project(models.Model):
|
||||
_inherit = "project.project"
|
||||
|
||||
billable_remaining_hours = fields.Float(
|
||||
compute="_compute_project_billable_remaining_hours",
|
||||
string="Billable Remaining Hours",
|
||||
store=True,
|
||||
help="Total Billable remaining time (without exclude_from_sale_order timesheet lines)."
|
||||
)
|
||||
|
||||
@api.depends("task_ids.billable_remaining_hours")
|
||||
def _compute_project_billable_remaining_hours(self):
|
||||
for project in self:
|
||||
project.billable_remaining_hours = sum(task.billable_remaining_hours for task in project.task_ids)
|
19
project_task_billable_hours/views/project_views.xml
Normal file
19
project_task_billable_hours/views/project_views.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="project_working_time_view_project_kanban" model="ir.ui.view">
|
||||
<field name="name">project.working.time.view.project.kanban</field>
|
||||
<field name="model">project.project</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.view_project_kanban_inherited" />
|
||||
<field name="priority" eval="999" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('o_project_kanban_boxes')]/following-sibling::div[1]" position="replace">
|
||||
<t t-set="badgeColor" t-value="'border-success'"/>
|
||||
<t t-set="badgeColor" t-value="'border-danger'" t-if="record.billable_remaining_hours.raw_value < 0"/>
|
||||
<div t-if="record.allow_timesheets.raw_value and record.allocated_hours.raw_value > 0"
|
||||
t-attf-class="oe_kanban_align badge border {{ badgeColor }}" title="Billable remaining hours" groups="hr_timesheet.group_hr_timesheet_user">
|
||||
<field name="billable_remaining_hours" widget="timesheet_uom"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
43
project_usability_misc/README.rst
Normal file
43
project_usability_misc/README.rst
Normal file
@@ -0,0 +1,43 @@
|
||||
======================
|
||||
project_usability_misc
|
||||
======================
|
||||
Miscellaneous usability improvements for project management.
|
||||
- Add a "All tasks" button in "Tasks" Menu to display all tasks.
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Use Odoo normal module installation procedure to install
|
||||
``project_usability_misc``.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
None yet.
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `our issues website <https://github.com/elabore-coop/project-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
|
||||
------------
|
||||
|
||||
* Boris Gallet
|
||||
|
||||
Funders
|
||||
-------
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
This module is maintained by Elabore.
|
1
project_usability_misc/__init__.py
Normal file
1
project_usability_misc/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# Empty __init__.py file for the project_usability_misc module.
|
23
project_usability_misc/__manifest__.py
Normal file
23
project_usability_misc/__manifest__.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright 2025 Boris Gallet (Elabore)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "project_usability_misc",
|
||||
"version": "16.0.1.0.0",
|
||||
"author": "Elabore",
|
||||
"website": "https://github.com/elabore-coop/project-tools",
|
||||
"maintainer": "boris.gallet@elabore.coop",
|
||||
"license": "AGPL-3",
|
||||
"category": "Tools",
|
||||
"summary": "Miscellaneous usability improvements for project management",
|
||||
"depends": [
|
||||
"base",
|
||||
"project",
|
||||
],
|
||||
"data": [
|
||||
"views/project_task.xml",
|
||||
],
|
||||
"demo": [],
|
||||
"installable": True,
|
||||
"auto_install": False,
|
||||
"application": False,
|
||||
}
|
22
project_usability_misc/i18n/fr.po
Normal file
22
project_usability_misc/i18n/fr.po
Normal file
@@ -0,0 +1,22 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * project_usability_misc
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-07-08 08:19+0000\n"
|
||||
"PO-Revision-Date: 2025-07-08 08:19+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: project_usability_misc
|
||||
#: model:ir.actions.act_window,name:project_usability_misc.action_all_tasks
|
||||
#: model:ir.ui.menu,name:project_usability_misc.menu_all_tasks
|
||||
msgid "All Tasks"
|
||||
msgstr "Toutes les tâches"
|
22
project_usability_misc/views/project_task.xml
Normal file
22
project_usability_misc/views/project_task.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- Define the action for All Tasks -->
|
||||
<record id="action_all_tasks" model="ir.actions.act_window">
|
||||
<field name="name">All Tasks</field>
|
||||
<field name="res_model">project.task</field>
|
||||
<field name="view_mode">kanban,tree,form,calendar,pivot,graph,activity</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="search_view">project.view_task_search_form_extended</field>
|
||||
</record>
|
||||
|
||||
<!-- Add a menu item for All Tasks -->
|
||||
<menuitem
|
||||
id="menu_all_tasks"
|
||||
name="All Tasks"
|
||||
parent="project.menu_main_pm"
|
||||
action="project_usability_misc.action_all_tasks"
|
||||
sequence="9"
|
||||
/>
|
||||
</data>
|
||||
</odoo>
|
Reference in New Issue
Block a user