[IMP] various: improve custom activity views
The following summary view of the record in the activity views have been improved: - project_task: task state added - project_project: project manager added - event_event: responsible and the dates (date_begin_located and date_end_located) added - account_move: total amount, customer and state added - sale_order: total amount and the state added - purchase_order: total amount and the state added - crm_lead: customer and stage added - hr_applicant (hr_recruitment): recruiter added - survey_survey: responsible added - maintenance.request: added equipment and responsible - stock.picking: added scheduled_date - repair.order: responsible, schedule_date and product_id added - mrp.production: added responsible - hr_leave (hr_holidays): status is added and default deadline modified see below Ensures that "Schedule activity" is in one line by adding a colspan. hr_leave activity: When a time off approval activity is created as a consequence of the creation of a hr.leave, the deadline of the activity is set to the date_from of the hr.leave minus activity type delay_count (default 15) except if it leads to a date anterior to today. In that case it is set to today. That way, in the activity view, the time off approval activities are more or less sorted by related hr.leave date_from and the cell date is an indication of when the time off is planned. Technical note: on most activity view, the activity record was not occupying all the horizontal space. To solve that problem the css has been modified and the max-width (200) that was imposed on the sub div has been removed. And as it was impossible to impose a max-width for a flex div (which is the common case for the activity record), the max width is imposed on each text that might be too long using the class o_text_block. That class has been modified to impose a max-width. That's why that class has been added in most view. Alternativly, we could have modified the activity compiler to add that class when the attribute full was set (not done because not sure of the consequence). Task-3300854 Part-of: odoo/odoo#138135
This commit is contained in:
@@ -1286,6 +1286,30 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_move_view_activity" model="ir.ui.view">
|
||||
<field name="name">account.move.view.activity</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Account Entry">
|
||||
<field name="currency_id"/>
|
||||
<templates>
|
||||
<div t-name="activity-box" class="d-block">
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="name" string="Entry Name" class="o_text_block o_text_bold"/>
|
||||
<div class="m-1"/>
|
||||
<field name="amount_total" widget="monetary"/>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="commercial_partner_id" string="Commercial Entity" class="o_text_block"/>
|
||||
<div class="m-1"/>
|
||||
<field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'posted'"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
</activity>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_move_filter" model="ir.ui.view">
|
||||
<field name="name">account.move.select</field>
|
||||
<field name="model">account.move</field>
|
||||
|
||||
@@ -513,9 +513,17 @@
|
||||
<templates>
|
||||
<div t-name="activity-box">
|
||||
<field name="user_id" widget="many2one_avatar_user" domain="[('share', '=', False)]"/>
|
||||
<div>
|
||||
<field name="name" display="full"/>
|
||||
<field name="expected_revenue" widget="monetary" display="full" muted="1"/>
|
||||
<div class="flex-grow-1">
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="name" display="full" class="o_text_block o_text_bold"/>
|
||||
<div class="m-1"/>
|
||||
<field name="expected_revenue" widget='monetary' display="full" muted="1"/>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="partner_id" muted="1" display="full" class="o_text_block"/>
|
||||
<div class="m-1"/>
|
||||
<field name="stage_id" widget="badge"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
|
||||
@@ -158,6 +158,26 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="event_event_view_activity" model="ir.ui.view">
|
||||
<field name="name">event.event.view.activity</field>
|
||||
<field name="model">event.event</field>
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Event">
|
||||
<templates>
|
||||
<div t-name="activity-box">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
<div class="flex-grow-1">
|
||||
<field name="name" string="Event Name" class="o_text_block o_text_bold"/>
|
||||
<field name="date_begin"/>
|
||||
<i class="fa fa-long-arrow-right mx-2" aria-label="Arrow icon" title="Arrow" />
|
||||
<field name="date_end"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
</activity>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="event_event_view_form_quick_create" model="ir.ui.view">
|
||||
<field name="name">event.event.form.quick_create</field>
|
||||
<field name="model">event.event</field>
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
<div t-name="activity-box">
|
||||
<img t-att-src="activity_image('res.partner', 'avatar_128', record.purchaser_id.raw_value)" t-att-title="record.purchaser_id.value" t-att-alt="record.purchaser_id.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="vehicle_id" display="full"/>
|
||||
<field name="vehicle_id" display="full" class="o_text_block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
@@ -356,8 +356,8 @@
|
||||
<div t-name="activity-box">
|
||||
<img t-att-src="activity_image('fleet.vehicle', 'image_128', record.vehicle_id.raw_value)" role="img" t-att-title="record.vehicle_id.value" t-att-alt="record.vehicle_id.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="vehicle_id"/>
|
||||
<field t-if="record.description.raw_value" name="description" muted="1"/>
|
||||
<field name="vehicle_id" class="o_text_block"/>
|
||||
<field t-if="record.description.raw_value" name="description" muted="1" class="o_text_block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
|
||||
@@ -338,8 +338,8 @@
|
||||
<div t-name="activity-box">
|
||||
<img class="rounded-circle" t-att-src="activity_image('fleet.vehicle', 'image_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="license_plate" display="full"/>
|
||||
<field name="model_id" muted="1"/>
|
||||
<field name="license_plate" display="full" class="o_text_block"/>
|
||||
<field name="model_id" muted="1" class="o_text_block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
|
||||
@@ -331,8 +331,8 @@
|
||||
<div t-name="activity-box">
|
||||
<img class="rounded" t-att-src="activity_image('hr.employee', 'avatar_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="name" display="full"/>
|
||||
<field name="job_id" muted="1" display="full"/>
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<field name="job_id" muted="1" display="full" class="o_text_block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
|
||||
@@ -355,8 +355,8 @@
|
||||
<div t-name="activity-box">
|
||||
<img class="rounded" t-att-src="activity_image('hr.employee', 'avatar_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="name" display="full"/>
|
||||
<field name="job_id" muted="1" display="full"/>
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<field name="job_id" muted="1" display="full" class="o_text_block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
<div t-name="activity-box">
|
||||
<img class="rounded" t-att-src="activity_image('hr.employee', 'avatar_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="name" display="full"/>
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<field name="total_amount" widget="monetary" muted="1" display="full"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1025,7 +1025,7 @@
|
||||
<div t-name="activity-box">
|
||||
<img class="rounded" t-att-src="activity_image('hr.employee', 'avatar_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="name" display="full"/>
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<field name="total_amount" widget="monetary" muted="1" display="full"/>
|
||||
<field name="state" display="right"/>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<field name="name">Time Off Approval</field>
|
||||
<field name="icon">fa-sun-o</field>
|
||||
<field name="res_model">hr.leave</field>
|
||||
<field name="delay_count">15</field>
|
||||
</record>
|
||||
<record id="mail_act_leave_second_approval" model="mail.activity.type">
|
||||
<field name="name">Time Off Second Approve</field>
|
||||
|
||||
@@ -9,6 +9,7 @@ import pytz
|
||||
from collections import namedtuple, defaultdict
|
||||
|
||||
from datetime import datetime, timedelta, time
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from pytz import timezone, UTC
|
||||
|
||||
from odoo.addons.base.models.ir_model import MODULE_UNINSTALL_FLAG
|
||||
@@ -1460,10 +1461,19 @@ class HolidaysRequest(models.Model):
|
||||
elif holiday.state == 'confirm':
|
||||
if holiday.holiday_status_id.leave_validation_type != 'no_validation':
|
||||
user_ids = holiday.sudo()._get_responsible_for_approval().ids or self.env.user.ids
|
||||
today = fields.Date.today()
|
||||
activity_type = self.env.ref('hr_holidays.mail_act_leave_approval')
|
||||
for user_id in user_ids:
|
||||
date_deadline = (
|
||||
(holiday.date_from -
|
||||
relativedelta(**{activity_type.delay_unit: activity_type.delay_count or 0})).date()
|
||||
if holiday.date_from else today)
|
||||
if date_deadline < today:
|
||||
date_deadline = today
|
||||
activity_vals.append({
|
||||
'activity_type_id': self.env.ref('hr_holidays.mail_act_leave_approval').id,
|
||||
'activity_type_id': activity_type.id,
|
||||
'automated': True,
|
||||
'date_deadline': date_deadline,
|
||||
'note': note,
|
||||
'user_id': user_id,
|
||||
'res_id': holiday.id,
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
<div t-name="activity-box">
|
||||
<img class="rounded" t-att-src="activity_image('hr.employee', 'avatar_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="employee_id" bold="1"/> <span class="text-muted">(<field name="number_of_days"/> days)</span>
|
||||
<field name="employee_id" class="o_text_block o_text_bold"/> <span class="text-muted">(<field name="number_of_days"/> days)</span>
|
||||
<field name="holiday_status_id" muted="1" display="full"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -184,15 +184,16 @@
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Time Off Request">
|
||||
<field name="employee_id"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="number_of_days"/>
|
||||
<templates>
|
||||
<div t-name="activity-box">
|
||||
<img class="rounded" t-att-src="activity_image('hr.employee', 'avatar_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value" width="50" height="50"/>
|
||||
<div class="ms-2">
|
||||
<field name="name" bold="1"/> <span class="text-muted">(<field name="number_of_days"/> days)</span>
|
||||
<img class="rounded" t-att-src="activity_image('hr.employee', 'avatar_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
|
||||
<div class="ms-2 flex-grow-1">
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="name" class="o_text_block o_text_bold"/>
|
||||
<div class="text-muted text-nowrap">(<field name="number_of_days"/> days)</div>
|
||||
</div>
|
||||
<div class="text-muted">
|
||||
<field name="holiday_status_id" display="full"/>
|
||||
<field name="date_from" widget="date"/> <i class="fa fa-long-arrow-right" title="to" /> <field name="date_to" widget="date"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -407,9 +407,10 @@
|
||||
<activity string="Applicants">
|
||||
<templates>
|
||||
<div t-name="activity-box">
|
||||
<div class="ms-2">
|
||||
<field name="name" display="full"/>
|
||||
<field name="partner_name" muted="1" display="full"/>
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
<div class="flex-grow-1">
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<field name="partner_name" muted="1" display="full" class="o_text_block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
|
||||
@@ -90,20 +90,12 @@
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
> div {
|
||||
max-width: 200px;
|
||||
|
||||
.o_text_block {
|
||||
@include o-text-overflow;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.o_text_bold {
|
||||
font-weight: bold;
|
||||
font-weight: $font-weight-bold;
|
||||
}
|
||||
|
||||
.o_text_block {
|
||||
@include o-text-overflow($max-width: 15rem);
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<t t-name="mail.ActivityViewFooter">
|
||||
<tfoot>
|
||||
<tr class="o_data_row">
|
||||
<td class="o_record_selector p-3 cursor-pointer" t-on-click.prevent.stop="props.scheduleActivity">
|
||||
<td class="o_record_selector p-3 cursor-pointer" colspan="3" t-on-click.prevent.stop="props.scheduleActivity">
|
||||
<span class="btn btn-link"><i class="fa fa-plus pe-2"/><span>Schedule activity</span></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
<div t-name="activity-box">
|
||||
<img t-att-src="activity_image('res.partner', 'avatar_128', record.id.raw_value)" role="img" t-att-title="record.name.value" t-att-alt="record.name.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="name" display="full"/>
|
||||
<field name="parent_id" muted="1" display="full"/>
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<field name="parent_id" muted="1" display="full" class="o_text_block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
|
||||
@@ -52,6 +52,27 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="maintenance_request_view_activity" model="ir.ui.view">
|
||||
<field name="name">maintenance.request.view.activity</field>
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Maintenance Request">
|
||||
<field name="user_id"/>
|
||||
<templates>
|
||||
<div t-name="activity-box">
|
||||
<field name="user_id" widget="many2one_avatar_user" domain="[('share', '=', False)]"/>
|
||||
<div class="flex-grow-1 d-block">
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="name" display="full" class="o_text_block o_text_bold"/>
|
||||
</div>
|
||||
<field name="equipment_id" muted="1" display="full" class="o_text_block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
</activity>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_equipment_request_view_form" model="ir.ui.view">
|
||||
<field name="name">equipment.request.form</field>
|
||||
<field name="model">maintenance.request</field>
|
||||
|
||||
@@ -19,6 +19,24 @@
|
||||
<field name="target">fullscreen</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_view_activity" model="ir.ui.view">
|
||||
<field name="name">mrp.production.view.activity</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Manufacturing Orders">
|
||||
<templates>
|
||||
<div t-name="activity-box" class="d-flex w-100">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
<div class="flex-grow-1">
|
||||
<field name="name" class="o_text_block"/>
|
||||
<field name="date_start" widget="date" class="d-block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
</activity>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.tree</field>
|
||||
<field name="model">mrp.production</field>
|
||||
|
||||
@@ -131,8 +131,8 @@
|
||||
<div t-name="activity-box">
|
||||
<img t-att-src="activity_image('product.template', 'image_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="name" display="full"/>
|
||||
<div t-if="record.default_code.value" class="text-muted">
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<div t-if="record.default_code.value" class="o_text_block text-muted">
|
||||
[<field name="default_code"/>]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -483,8 +483,8 @@
|
||||
<div t-name="activity-box">
|
||||
<img t-att-src="activity_image('product.product', 'image_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
|
||||
<div class="ms-2">
|
||||
<field name="name" display="full"/>
|
||||
<div t-if="record.default_code.value" class="text-muted">
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<div t-if="record.default_code.value" class="o_text_block text-muted">
|
||||
[<field name="default_code"/>]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -131,14 +131,14 @@ export class ProjectTaskStateSelection extends StateSelectionField {
|
||||
}
|
||||
|
||||
getDropdownPosition() {
|
||||
if (this.isView(['kanban', 'list', 'calendar']) || this.env.isSmall) {
|
||||
if (this.isView(['activity', 'kanban', 'list', 'calendar']) || this.env.isSmall) {
|
||||
return '';
|
||||
}
|
||||
return 'bottom-end';
|
||||
}
|
||||
|
||||
getTogglerClass(currentValue) {
|
||||
if (this.isView(['kanban', 'list', 'calendar']) || this.env.isSmall) {
|
||||
if (this.isView(['activity', 'kanban', 'list', 'calendar']) || this.env.isSmall) {
|
||||
return 'btn btn-link d-flex p-0';
|
||||
}
|
||||
return 'o_state_button btn rounded-pill ' + this.colorButton[currentValue];
|
||||
|
||||
+5
-5
@@ -13,7 +13,7 @@
|
||||
</xpath>
|
||||
<!-- Waiting state button -->
|
||||
<xpath expr="//t[@t-if='props.readonly']" position="after">
|
||||
<t t-elif="currentValue == '04_waiting_normal' and isView(['kanban', 'list', 'calendar'])">
|
||||
<t t-elif="currentValue == '04_waiting_normal' and isView(['activity', 'kanban', 'list', 'calendar'])">
|
||||
<button class="d-flex align-items-center btn fw-normal p-0 justify-content-center " title="This task is blocked by another unfinished task" t-att-class="{'o_task_state_list_view': isView(['list'])}">
|
||||
<i class="fa fa-lg fa-hourglass-o"></i>
|
||||
</button>
|
||||
@@ -22,13 +22,13 @@
|
||||
<!-- The toggle mark as done button -->
|
||||
<xpath expr="//t[@t-if='props.readonly']" position="after">
|
||||
<t t-elif="isToggleMode and currentValue == '01_in_progress'">
|
||||
<button t-if="isView(['kanban', 'list', 'calendar']) or this.env.isSmall"
|
||||
<button t-if="isView(['activity', 'kanban', 'list', 'calendar']) or this.env.isSmall"
|
||||
class="d-flex align-items-center btn fw-normal p-0"
|
||||
tabindex="-1"
|
||||
t-att-class="{'o_task_state_list_view': isView(['list'])}"
|
||||
t-on-click.stop="toggleState"
|
||||
>
|
||||
<i t-attf-class="{{ stateIcon(currentValue) }} {{ statusColor(currentValue) }} {{ ['1_done', '1_canceled'].includes(currentValue) and isView(['kanban']) ? 'opacity-50' : '' }}"></i>
|
||||
<i t-attf-class="{{ stateIcon(currentValue) }} {{ statusColor(currentValue) }} {{ ['1_done', '1_canceled'].includes(currentValue) and isView(['activity', 'kanban']) ? 'opacity-50' : '' }}"></i>
|
||||
</button>
|
||||
<button t-else="" class="o_state_button btn oe_highlight rounded-pill" style="white-space: nowrap;" tabindex="-1"
|
||||
t-attf-class="#{currentValue == '1_done' ? 'btn-success' : 'btn-outline-secondary'}"
|
||||
@@ -54,9 +54,9 @@
|
||||
|
||||
<!-- Normal dropdown mode toggle button (displayed on the card/record by default) -->
|
||||
<xpath expr="//t[@t-set-slot='toggler']/div" position="replace">
|
||||
<div t-if="isView(['kanban', 'list', 'calendar']) or this.env.isSmall" class="d-flex align-items-center" t-att-class="{'o_task_state_list_view': isView(['list'])}" t-att-title="label">
|
||||
<div t-if="isView(['activity', 'kanban', 'list', 'calendar']) or this.env.isSmall" class="d-flex align-items-center" t-att-class="{'o_task_state_list_view': isView(['list'])}" t-att-title="label">
|
||||
<i t-if="currentValue == '04_waiting_normal'" t-attf-class="{{ stateIcon(currentValue) }} {{ statusColor(currentValue) }}" style="color: #4A4F59;"/>
|
||||
<i t-else="" t-attf-class="{{ stateIcon(currentValue) }} {{ statusColor(currentValue) }} {{ ['1_done', '1_canceled'].includes(currentValue) and isView(['kanban']) ? 'opacity-50' : '' }}"/>
|
||||
<i t-else="" t-attf-class="{{ stateIcon(currentValue) }} {{ statusColor(currentValue) }} {{ ['1_done', '1_canceled'].includes(currentValue) and isView(['activity', 'kanban']) ? 'opacity-50' : '' }}"/>
|
||||
</div>
|
||||
<div t-else="" class="d-flex align-items-center">
|
||||
<t t-if="currentValue == '04_waiting_normal'">
|
||||
|
||||
@@ -12,3 +12,7 @@
|
||||
.o_form_project_project .o_setting_box {
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.o_many2many_avatar_user_no_wrap div {
|
||||
flex-wrap: nowrap !important;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="project_project_view_activity" model="ir.ui.view">
|
||||
<field name="name">project.project.view.activity</field>
|
||||
<field name="model">project.project</field>
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Project">
|
||||
<templates>
|
||||
<div t-name="activity-box" class="d-flex">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
<field name="name" string="Project Name" class="flex-grow-1 o_text_block"/>
|
||||
</div>
|
||||
</templates>
|
||||
</activity>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_send_mail_project_project" model="ir.actions.act_window">
|
||||
<field name="name">Send Email</field>
|
||||
<field name="res_model">mail.compose.message</field>
|
||||
|
||||
@@ -803,17 +803,19 @@
|
||||
<field name="user_ids"/>
|
||||
<field name="project_id"/>
|
||||
<templates>
|
||||
<div class="w-100" t-name="activity-box" style="display: inline-grid; grid-template-columns: auto max-content;">
|
||||
<div>
|
||||
<span t-att-title="record.name.value">
|
||||
<field name="name" display="full" class="w-100 text-truncate"/>
|
||||
</span>
|
||||
<span t-att-title="record.project_id.value" invisible="context.get('default_project_id', False)">
|
||||
<field t-if="record.project_id.value" name="project_id" muted="1" class="w-100 text-truncate"/>
|
||||
<span t-else="" class="fst-italic text-muted"><i class="fa fa-lock"></i> Private</span>
|
||||
</span>
|
||||
<div t-name="activity-box" class="justify-content-between gap-2">
|
||||
<div class="flex-shrink-1">
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<div t-att-title="record.project_id.value" invisible="context.get('default_project_id', False)">
|
||||
<field t-if="record.project_id.value" name="project_id" muted="1" class="o_text_block"/>
|
||||
<div t-else="" class="fst-italic text-muted"><i class="fa fa-lock"/> Private</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-end gap-2 flex-grow-1">
|
||||
<field name="state" widget="project_task_state_selection" class="align-self-center"
|
||||
options="{'hide_label': 1, 'is_toggle_mode': false}"/>
|
||||
<field name="user_ids" widget="many2many_avatar_user" class="o_many2many_avatar_user_no_wrap"/>
|
||||
</div>
|
||||
<field name="user_ids" widget="many2many_avatar_user"/>
|
||||
</div>
|
||||
</templates>
|
||||
</activity>
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
<div class="w-100" t-name="activity-box" style="display: inline-grid; grid-template-columns: auto max-content;">
|
||||
<div>
|
||||
<span t-att-title="record.name.value">
|
||||
<field name="name" display="full" class="w-100 text-truncate align-middle"/>
|
||||
<field name="name" display="full" class="w-100 o_text_block align-middle"/>
|
||||
</span>
|
||||
</div>
|
||||
<field name="user_ids" widget="many2many_avatar_user"/>
|
||||
|
||||
@@ -654,11 +654,21 @@
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Purchase Order">
|
||||
<field name="currency_id"/>
|
||||
<templates>
|
||||
<div t-name="activity-box">
|
||||
<div>
|
||||
<field name="name" display="full"/>
|
||||
<field name="partner_id" muted="1" display="full"/>
|
||||
<div t-name="activity-box" class="d-block">
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="name" display="full" class="o_text_block o_text_bold"/>
|
||||
<div class="m-1"/>
|
||||
<field name="amount_total" widget="monetary"/>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="partner_id" muted="1" display="full" class="o_text_block"/>
|
||||
<div class="m-1"/>
|
||||
<field name="state" widget="badge"
|
||||
decoration-success="state == 'purchase' or state == 'done'"
|
||||
decoration-warning="state == 'to approve'"
|
||||
decoration-info="state == 'draft' or state == 'sent'"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
|
||||
@@ -3,6 +3,25 @@
|
||||
|
||||
<data>
|
||||
|
||||
<record id="repair_order_view_activity" model="ir.ui.view">
|
||||
<field name="name">repair.order.view.activity</field>
|
||||
<field name="model">repair.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Activity view">
|
||||
<templates>
|
||||
<div t-name="activity-box">
|
||||
<field name="user_id" widget="many2one_avatar_user" domain="[('share', '=', False)]"/>
|
||||
<div>
|
||||
<field name="name" display="full" class="o_text_block o_text_bold"/>
|
||||
<field name="product_id" class="o_text_block"/>
|
||||
<field name="schedule_date" widget="date" class="d-block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
</activity>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_repair_order_tree" model="ir.ui.view">
|
||||
<field name="name">repair.tree</field>
|
||||
<field name="model">repair.order</field>
|
||||
|
||||
@@ -7,12 +7,20 @@
|
||||
<field name="name">sale.order.activity</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Sales Orders">
|
||||
<activity string="Sales Order">
|
||||
<field name="currency_id"/>
|
||||
<templates>
|
||||
<div t-name="activity-box">
|
||||
<div>
|
||||
<field name="name" display="full"/>
|
||||
<field name="partner_id" muted="1" display="full"/>
|
||||
<div t-name="activity-box" class="d-block">
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="name" display="full" class="o_text_block o_text_bold"/>
|
||||
<div class="m-1"/>
|
||||
<field name="amount_total" widget="monetary"/>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="partner_id" muted="1" display="full" class="o_text_block"/>
|
||||
<div class="m-1"/>
|
||||
<field name="state" widget="badge"
|
||||
decoration-info="state == 'draft'" decoration-success="state == 'sale'"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="stock_picking_view_activity" model="ir.ui.view">
|
||||
<field name="name">stock.picking.view.activity</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Activity view">
|
||||
<templates>
|
||||
<div t-name="activity-box" class="d-block">
|
||||
<field name="name" display="full" class="o_text_block o_text_bold"/>
|
||||
<field name="scheduled_date" widget="date"/>
|
||||
</div>
|
||||
</templates>
|
||||
</activity>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="stock_picking_calendar">
|
||||
<field name="name">stock.picking.calendar</field>
|
||||
<field name="model">stock.picking</field>
|
||||
|
||||
@@ -371,6 +371,24 @@
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="survey_survey_view_activity" model="ir.ui.view">
|
||||
<field name="name">survey.survey.view.activity</field>
|
||||
<field name="model">survey.survey</field>
|
||||
<field name="arch" type="xml">
|
||||
<activity string="Survey">
|
||||
<templates>
|
||||
<div t-name="activity-box" class="d-flex w-100">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
<div class="flex-grow-1">
|
||||
<field name="title" class="o_text_block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
</activity>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="survey_survey_view_search" model="ir.ui.view">
|
||||
<field name="name">survey.survey.search</field>
|
||||
<field name="model">survey.survey</field>
|
||||
|
||||
Reference in New Issue
Block a user