Skip to content
Extraits de code Groupes Projets
Valider 9005cc4a rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

[ADD] update to v14.0.2

parent 614d041e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -11,6 +11,9 @@ DIGITANIE - Projet et Feuilles de temps
- Ajout d'un champ Date de revue à la table *project.task*, affiche dans les vues asociées
- Ajout d'un champ Type de tâche à la table *account.analytic.line*, affiche dans les vues asociées
- Ajout du champ département dans les vues listes des feuilles de temps
- Rend les champs projet / tâches non modifiables sur feuilles de temps
- Affiche 20 entrées de tâches sur les feuilles de temps
- Renvoie le nom de la catégorie / nom du projet lorsqu'on recherche un nom de projet
Credits
......
......@@ -3,11 +3,12 @@
"summary": """Gestion des projets et Feuilles de temps""",
"author": "Le Filament",
"website": "https://www.le-filament.com",
"version": "14.0.1.0.0",
"version": "14.0.2.0.0",
"license": "AGPL-3",
"depends": ["hr_timesheet", "project_category"],
"depends": ["hr_timesheet", "project_category", "web_m2x_options"],
"data": [
"views/hr_timesheet_views.xml",
"views/project_project.xml",
"views/project_task.xml",
"report/project_report_view.xml",
],
......
# Copyright 2020 Le Filament (<http://www.le-filament.com>)
# Copyright 2020-2022 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import account
from . import project
from . import project_task
# Copyright 2022 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class Project(models.Model):
_inherit = "project.project"
def name_get(self):
""" Return the type then project name
"""
res = []
for project in self:
name = "%s / %s" % (project.type_id.name, project.name) if project.type_id else project.name
res.append((project.id, name))
return res
......@@ -11,7 +11,17 @@
<field name="arch" type="xml">
<field name="unit_amount" position="before">
<field name="task_type_id" />
</field>
<field name="project_id" position="attributes">
<attribute
name="options"
>{'no_create': true, 'no_open': true,}</attribute>
</field>
<field name="task_id" position="attributes">
<attribute
name="options"
>{'no_create': true, 'no_open': true, 'limit': 20,}</attribute>
<attribute name="required">True</attribute>
</field>
</field>
</record>
......@@ -21,9 +31,20 @@
<field name="model">account.analytic.line</field>
<field name="inherit_id" ref="hr_timesheet.timesheet_view_tree_user" />
<field name="arch" type="xml">
<xpath expr="//field[@name='employee_id']" position="after">
<field name="employee_id" position="after">
<field name="department_id" options='{"no_open": True}' />
</xpath>
</field>
<field name="project_id" position="attributes">
<attribute
name="options"
>{'no_create': true, 'no_open': true,}</attribute>
</field>
<field name="task_id" position="attributes">
<attribute
name="options"
>{'no_create': true, 'no_open': true, 'limit': 20,}</attribute>
<attribute name="required">True</attribute>
</field>
</field>
</record>
......@@ -32,11 +53,11 @@
<field name="model">account.analytic.line</field>
<field name="inherit_id" ref="hr_timesheet.timesheet_view_form_user" />
<field name="arch" type="xml">
<xpath expr="//field[@name='employee_id']" position="after">
<field name="employee_id" position="after">
<field name="department_id" options='{"no_open": True}' />
<field name="project_type_id" />
<field name="task_type_id" />
</xpath>
<field name="task_type_id" required="1" />
</field>
</field>
</record>
......@@ -48,7 +69,7 @@
<field name="employee_id" position="after">
<field name="department_id" />
<field name="project_type_id" />
<field name="task_type_id" />
<field name="task_type_id" required="1" />
</field>
<filter name="groupby_employee" position="after">
<filter
......
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="project_kanban" model="ir.ui.view">
<field name="model">project.project</field>
<field name="inherit_id" ref="project.view_project_kanban" />
<field name="arch" type="xml">
<xpath expr="//templates//div[hasclass('o_primary')]" position="after">
<div class="o_kanban_record_body" t-if="record.type_id.value">
<field name="type_id" widget="badge" />
</div>
</xpath>
</field>
</record>
</odoo>
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter