Skip to content

Commit

Permalink
[MIG] project_ux: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mav-adhoc committed Feb 16, 2024
1 parent 39480ea commit 5cd7336
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
8 changes: 6 additions & 2 deletions project_ux/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ Project UX
Several improvements to project:

#. Change default behavior when click on the project card in the kanban view, now will go to the project form view instead of the project task kanban view.
#. Add a boolean toggle button called "Don´t send stage email" that gives the user the chance to avioid sending the email if the stage has an automatic template set. After the stage changes, this valure returns to false.
#. Add a boolean toggle button called "Don´t send stage email" that gives the user the chance to avoid sending the email if the stage has an automatic template set. After the stage changes, this value returns to false if the stage has an email template.
#. Add a button "i" in the card kanban view that links directly to the proyect updates.
#. Adds 3 new filters: "Is Task", "Is Sub-Task" & "Parent-Task".
#. Adds:
- 2 new filters: "Is Task"& "Is Sub-Task"
- 1 new agroupation: "Parent-Task"
#. Re-incorporates the wizard that allows to select an existing task to be converted as a sub-task in the sub-task tab (in the migration to 17, when you press on "Add line" in the sub-task tab, you could only create new sub-tasks, not convert the existing tasks to sub-tasks)


Installation
============
Expand Down
4 changes: 2 additions & 2 deletions project_ux/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Project UX',
'version': "16.0.1.1.0",
'version': "17.0.1.0.0",
'category': 'Project Management',
'sequence': 14,
'author': 'ADHOC SA',
Expand All @@ -36,7 +36,7 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
4 changes: 2 additions & 2 deletions project_ux/models/project_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from odoo import models, fields
from odoo import models, fields, api


class Task(models.Model):
Expand All @@ -22,7 +22,7 @@ def _track_template(self, changes):
if 'stage_id' in changes and task.stage_id.mail_template_id:
res['stage_id'] = (task.stage_id.mail_template_id, {
'message_type': 'comment',
'auto_delete_message': True,
'auto_delete_keep_log': False,
'email_layout_xmlid': 'mail.mail_notification_light'})
if 'stage_id' in res and task.dont_send_stage_email and task.stage_id.mail_template_id:
res.pop('stage_id')
Expand Down
6 changes: 3 additions & 3 deletions project_ux/views/project_project_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<field name="model">project.project</field>
<field name="inherit_id" ref="project.view_project_kanban"/>
<field name="arch" type="xml">
<kanban class="oe_background_grey o_kanban_dashboard o_project_kanban o_emphasize_colors">
<kanban class="o_kanban_dashboard o_project_kanban o_emphasize_colors">
<kanban default_group_by="stage_id"/>
<field name="stage_id" groups="project.group_project_stages"/>
<field name="sequence" groups="project.group_project_stages"/>
</kanban>
<kanban class="oe_background_grey o_kanban_dashboard o_project_kanban o_emphasize_colors" position="attributes">
<attribute name="class">oe_background_grey o_kanban_dashboard o_project_kanban o_emphasize_colors o_kanban_dashboard_project</attribute>
<kanban class="o_kanban_dashboard o_project_kanban o_emphasize_colors" position="attributes">
<attribute name="class">o_kanban_dashboard o_project_kanban o_emphasize_colors</attribute>
<attribute name="action"></attribute>
</kanban>
<xpath expr="/kanban//div[hasclass('o_kanban_record_bottom')]//a[@name='action_view_tasks']" position="before">
Expand Down
8 changes: 6 additions & 2 deletions project_ux/views/project_task_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<field name="tag_ids" position="after">
<xpath expr="//field[@name='tag_ids']" position="after">
<field name="dont_send_stage_email" widget="boolean_toggle"/>
</field>
</xpath>
<xpath expr="//field[@name='child_ids']" position="attributes">
<attribute name="widget">many2many</attribute>
<attribute name="domain">[('project_id', '=', project_id)]</attribute>
</xpath>
</field>
</record>

Expand Down

0 comments on commit 5cd7336

Please sign in to comment.