[IMP] project_timesheet_holidays, _*: bring ux improvements for project and timesheet app
*_= project, sale_timesheet,
The purpose of this commit is to improve the UX of the project and timesheet app
So in this commit done following changes:
- In the timesheet time off form view changes the label from
timesheet to timesheets
- In the timesheet list view added a 'no_open' option on the SOL field to
make not be clickable
- In project form view removed the 'quick' create option from the
user_id field
- In project task form view added a 'no_open' option on the SOL field to
make not be clickable
- Color of the Gantt and calendar views in project app
My Tasks:
the color used should be according to the personal stage set on the task.
All tasks:
the color used should be according to the project set on the task.
When the user clicks on a project in the main view of Project app:
the color used should be according to the stage.
task-3125942
closes odoo/odoo#111688
Related: odoo/enterprise#36615
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
committed by
Prakash Prajapati
parent
e335489526
commit
1ec282f858
@@ -182,7 +182,6 @@ class Task(models.Model):
|
||||
'res.company', string='Company', compute='_compute_company_id', store=True, readonly=False, recursive=True,
|
||||
required=True, copy=True, default=_default_company_id)
|
||||
color = fields.Integer(string='Color Index')
|
||||
project_color = fields.Integer(related='project_id.color', string='Project Color')
|
||||
rating_active = fields.Boolean(string='Project Rating Status', related="project_id.rating_active")
|
||||
attachment_ids = fields.One2many('ir.attachment', compute='_compute_attachment_ids', string="Main Attachments",
|
||||
help="Attachments that don't come from a message.")
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="user_id" string="Project Manager" widget="many2one_avatar_user" attrs="{'readonly':[('active','=',False)]}" domain="[('share', '=', False)]"/>
|
||||
<field name="user_id" string="Project Manager" widget="many2one_avatar_user" attrs="{'readonly':[('active','=',False)]}" domain="[('share', '=', False)]" options="{'no_quick_create': True}"/>
|
||||
<label for="date_start" string="Planned Date"/>
|
||||
<div name="dates" class="o_row">
|
||||
<field name="date_start" widget="daterange" options='{"related_end_date": "date"}'/>
|
||||
|
||||
@@ -716,7 +716,7 @@
|
||||
<field eval="2" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar date_start="date_deadline" string="Tasks" mode="month"
|
||||
color="color" event_limit="5" hide_time="true"
|
||||
color="stage_id" event_limit="5" hide_time="true"
|
||||
event_open_popup="true" quick_add="false" show_unusual_days="True"
|
||||
js_class="project_calendar"
|
||||
scales="month,year">
|
||||
@@ -740,7 +740,7 @@
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//calendar" position="attributes">
|
||||
<attribute name="color">project_color</attribute>
|
||||
<attribute name="color">project_id</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='project_id']" position="attributes">
|
||||
<attribute name="filters">1</attribute>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="inherit_id" ref="hr_holidays.edit_holiday_status_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='visual']" position="before">
|
||||
<group name="timesheet" groups="base.group_no_one" string="Timesheet">
|
||||
<group name="timesheet" groups="base.group_no_one" string="Timesheets">
|
||||
<div class="text-muted mb-4" colspan="2">
|
||||
Generate timesheets when validating time off requests of this type
|
||||
</div>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<field name="commercial_partner_id" invisible="1" groups="sales_team.group_sale_salesman"/>
|
||||
<field name="is_so_line_edited" invisible="1" groups="sales_team.group_sale_salesman"/>
|
||||
<field name="allow_billable" invisible="1" groups="sales_team.group_sale_salesman"/>
|
||||
<field name="so_line" widget="so_line_field" optional="show" options="{'no_create': True}" context="{'create': False, 'edit': False, 'delete': False}" attrs="{'invisible': [('allow_billable', '=', False)], 'readonly': [('readonly_timesheet', '=', True)]}" placeholder="Non-billable" groups="sales_team.group_sale_salesman"/>
|
||||
<field name="so_line" widget="so_line_field" optional="show" options="{'no_create': True, 'no_open': True}" context="{'create': False, 'edit': False, 'delete': False}" attrs="{'invisible': [('allow_billable', '=', False)], 'readonly': [('readonly_timesheet', '=', True)]}" placeholder="Non-billable" groups="sales_team.group_sale_salesman"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
optional="hide"/>
|
||||
<field name="so_line" groups="sales_team.group_sale_salesman"
|
||||
attrs="{'column_invisible': [('parent.allow_billable', '=', False)], 'readonly': [('readonly_timesheet', '=', True)]}"
|
||||
context="{'with_remaining_hours': True, 'with_price_unit': True}" options="{'no_create': True}"
|
||||
context="{'with_remaining_hours': True, 'with_price_unit': True}" options="{'no_create': True, 'no_open': True}"
|
||||
domain="[('is_service', '=', True), ('order_partner_id', 'child_of', parent.partner_id), ('is_expense', '=', False), ('state', 'in', ['sale', 'done'])]"
|
||||
optional="hide"/>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user