Skip to content

Commit

Permalink
[MERGE] various: improve menus, search filters and some labels.
Browse files Browse the repository at this point in the history
Impacted applications: hr, maintenance, mass mailing, survey, base
(attachment), product, stock (and dependencies), project (and dependencies),
event (and dependencies).

This commit is related to task #1875881 and closes PR #26938 .
  • Loading branch information
tde-banana-odoo committed Sep 19, 2018
2 parents a1572fe + b091a11 commit d8be813
Show file tree
Hide file tree
Showing 24 changed files with 71 additions and 83 deletions.
17 changes: 14 additions & 3 deletions addons/event/views/event_views.xml
Expand Up @@ -140,6 +140,17 @@
</field>
</record>

<record id="event_type_view_search" model="ir.ui.view">
<field name="name">event.type.search</field>
<field name="model">event.type</field>
<field name="arch" type="xml">
<search string="Event Categories">
<field name="name"/>
<filter string="Online Event" name="online_event" help="Online Event" domain="[('is_online', '=', True)]"/>
</search>
</field>
</record>

<record model="ir.actions.act_window" id="action_event_type">
<field name="name">Event Categories</field>
<field name="res_model">event.type</field>
Expand Down Expand Up @@ -366,15 +377,15 @@
<field name="arch" type="xml">
<search string="Events">
<field name="name" string="Events"/>
<filter string="My Events" name="myevents" help="My Events" domain="[('user_id', '=', uid)]"/>
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
<separator/>
<filter string="Unconfirmed" name="draft" domain="[('state','=','draft')]" help="Events in New state"/>
<filter name="confirm" string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed events"/>
<separator/>
<filter string="My Events" name="myevents" help="My Events" domain="[('user_id','=',uid)]"/>
<filter string="Unconfirmed" name="draft" domain="[('state', '=', 'draft')]" help="Events in New state"/>
<separator/>
<filter string="Upcoming/Running" name="upcoming"
domain="['&amp;', ('state', '!=', 'cancel'), ('date_end','&gt;=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]" help="Upcoming events from today" />
<filter string="Online Events" name="online_events" help="Online Events" domain="[('is_online', '=', True)]"/>
<field name="event_type_id"/>
<field name="user_id"/>
<separator/>
Expand Down
3 changes: 2 additions & 1 deletion addons/hr/views/hr_views.xml
Expand Up @@ -180,8 +180,9 @@
<field name="department_id"/>
<field name="category_ids" groups="hr.group_hr_user"/>
<field name="job_id" />
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<separator/>
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction', '=', True)]"/>
<group expand="0" string="Group By">
<filter name="group_manager" string="Manager" domain="[]" context="{'group_by':'parent_id'}"/>
<filter name="group_coach" string="Coach" domain="[]" context="{'group_by':'coach_id'}"/>
Expand Down
7 changes: 4 additions & 3 deletions addons/hr_attendance/views/hr_attendance_view.xml
Expand Up @@ -68,14 +68,15 @@
<search string="Hr Attendance Search">
<field name="employee_id"/>
<field name="department_id"/>
<filter string="My Attendances" name="myattendances" domain="[('employee_id.user_id.id', '=', uid)]" />
<separator/>
<filter name="check_in_filter" string="Check In Date" date="check_in"/>
<filter string="No Check Out" name="nocheckout" domain="[('check_out', '=', False)]" />
<separator/>
<filter string="My Attendances" name="myattendances" domain="[('employee_id.user_id.id', '=', uid)]" />
<group expand="0" string="Group By">
<filter name="employee" string="Employee" context="{'group_by':'employee_id'}"/>
<separator/>
<filter name="groupby_name" string="Date" context="{'group_by':'check_in'}"/>
<filter name="groupby_name" string="Check In Date" context="{'group_by': 'check_in'}"/>
<filter name="groupby_check_out" string="Check Out Date" context="{'group_by': 'check_out'}"/>
</group>
</search>
</field>
Expand Down
3 changes: 2 additions & 1 deletion addons/hr_attendance/views/hr_employee_view.xml
Expand Up @@ -35,9 +35,10 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_filter"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='inactive']" position="after">
<xpath expr="//filter[@name='inactive']" position="before">
<filter string="Signed In" name="signed_in" domain="[('last_attendance_id.check_out', '=', False)]"/>
<filter string="Signed Out" name="signed_out" domain="['|', ('last_attendance_id', '=', False), ('last_attendance_id.check_out', '!=', False)]"/>
<separator/>
</xpath>
</field>
</record>
Expand Down
4 changes: 2 additions & 2 deletions addons/hr_contract/views/hr_contract_views.xml
Expand Up @@ -60,10 +60,10 @@
<separator />
<filter string="Current Employee" name="current_employee" domain="[('employee_id.active','=',True)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<separator/>
<filter string="To Report to Social Secretariat" name="to_report" domain="[('reported_to_secretariat', '=', False)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<separator/>
<filter string="Important Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
<group expand="0" string="Group By">
<filter string="Employee" name="employee" domain="[]" context="{'group_by':'employee_id'}"/>
Expand Down
14 changes: 6 additions & 8 deletions addons/hr_expense/views/hr_expense_views.xml
Expand Up @@ -195,14 +195,15 @@
<field name="employee_id"/>
<field name="product_id"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<filter string="My Team Expenses" name="my_team_expenses" domain="[('employee_id.parent_id.user_id', '=', uid)]" groups="hr_expense.group_hr_expense_manager" help="Expenses of Your Team Member"/>
<filter string="My Expenses" name="my_expenses" domain="[('employee_id.user_id', '=', uid)]"/>
<separator />
<filter domain="[('sheet_id', '=', False)]" string="To report" name="no_report"/>
<filter domain="[('sheet_id', '!=', False)]" string="Reported" name="submitted" help="Confirmed Expenses"/>
<filter domain="[('state', '=', 'refused')]" string="Refused" name="refused" help="Refused Expenses"/>
<filter domain="['|', ('state', '=', 'approved'), ('state', '=', 'done')]" string="Approved" name="approved" help="Actual expense sheets, not the refused ones"/>
<separator />
<filter string="My Team Expenses" name="my_team_expenses" domain="[('employee_id.parent_id.user_id', '=', uid)]" groups="hr_expense.group_hr_expense_manager" help="Expenses of Your Team Member"/>
<filter string="My Expenses" name="my_expenses" domain="[('employee_id.user_id', '=', uid)]"/>
<filter domain="[('employee_id.active', '=', False)]" string="Former Employees" name="inactive" groups="hr_expense.group_hr_expense_user,hr_expense.group_hr_expense_manager"/>
<separator/>
<filter string="Late Activities" name="activities_overdue"
domain="[('activity_ids.date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]"
Expand All @@ -221,8 +222,6 @@
<filter string="Date" name="expensesmonth" domain="[]" context="{'group_by': 'date'}" help="Expense Date"/>
<filter string="Status" name="status" domain="[]" context="{'group_by': 'state'}"/>
</group>
<separator />
<filter domain="[('employee_id.active', '=', False)]" string="Former Employees" name="inactive" groups="hr_expense.group_hr_expense_user,hr_expense.group_hr_expense_manager"/>
</search>
</field>
</record>
Expand Down Expand Up @@ -581,15 +580,16 @@
<field name="employee_id"/>
<field name="department_id" string="Department"/>
<field name="journal_id"/>
<filter string="My Reports" name="my_reports" domain="[('employee_id.user_id', '=', uid)]"/>
<filter string="My Team Reports" name="my_team_reports" domain="[('employee_id.parent_id.user_id', '=', uid)]" groups="hr_expense.group_hr_expense_manager" help="Expenses of Your Team Member"/>
<separator />
<filter domain="[('state', '=', 'draft')]" string="Draft" name="draft" help="Expenses in Draft"/>
<filter domain="[('state', '=', 'submit')]" string="To Approve" name="submitted" help="Confirmed Expenses"/>
<filter domain="[('state', '=', 'approve')]" string="To Post" name="to_post" help="Approved Expenses"/>
<filter domain="['|', ('state', '=', 'approve'), ('state', '=', 'post')]" string="To Pay" name="approved" help="Expenses to Invoice"/>
<filter domain="[('state', '=', 'cancel')]" string="Refused" name="canceled"/>
<separator/>
<filter string="My Reports" name="my_reports" domain="[('employee_id.user_id', '=', uid)]"/>
<filter string="My Team Reports" name="my_team_reports" domain="[('employee_id.parent_id.user_id', '=', uid)]" groups="hr_expense.group_hr_expense_manager" help="Expenses of Your Team Member"/>
<filter domain="[('employee_id.active', '=', False)]" string="Former Employees" name="inactive" groups="hr_expense.group_hr_expense_user,hr_expense.group_hr_expense_manager"/>
<separator/>
<filter string="Late Activities" name="activities_overdue"
domain="[('activity_ids.date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]"
Expand All @@ -606,8 +606,6 @@
<filter string="Date" name="expenses_month" domain="[]" context="{'group_by': 'accounting_date'}" help="Expenses by Date"/>
<filter string="State" domain="[]" context="{'group_by': 'state'}" name="state"/>
</group>
<separator />
<filter domain="[('employee_id.active', '=', False)]" string="Former Employees" name="inactive" groups="hr_expense.group_hr_expense_user,hr_expense.group_hr_expense_manager"/>
</search>
</field>
</record>
Expand Down
2 changes: 1 addition & 1 deletion addons/hr_recruitment/views/hr_recruitment_views.xml
Expand Up @@ -881,7 +881,7 @@
<field name="inherit_id" ref="hr.view_employee_filter"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='department_id']" position="after">
<filter name="newly_hired_employee" string="New Hired" domain="[('newly_hired_employee', '=', True)]" groups="hr_recruitment.group_hr_recruitment_user"/>
<filter name="newly_hired_employee" string="Newly Hired" domain="[('newly_hired_employee', '=', True)]" groups="hr_recruitment.group_hr_recruitment_user"/>
</xpath>
</field>
</record>
Expand Down
3 changes: 1 addition & 2 deletions addons/maintenance/views/maintenance_views.xml
Expand Up @@ -14,6 +14,7 @@
<field name="owner_user_id"/>
<field name="stage_id"/>
<field name="maintenance_team_id"/>
<filter string="My Requests" name="my_requests" domain="[('user_id', '=', uid)]"/>
<separator/>
<filter string="To do" domain="[('stage_id.done', '=', False)]" name="todo"/>
<filter string="Blocked" name="kanban_state_block" domain="[('kanban_state', '=', 'blocked')]"/>
Expand All @@ -23,8 +24,6 @@
<separator/>
<filter string="Unscheduled Maintenance" domain="[('schedule_date', '=', False)]" name="unscheduled"/>
<separator/>
<filter string="My Requests" name="my_requests" domain="[('user_id', '=', uid)]"/>
<separator/>
<filter string="My Activities" name="activities_my"
domain="[('activity_ids.user_id', '=', uid)]"/>
<separator/>
Expand Down
7 changes: 2 additions & 5 deletions addons/mass_mailing/views/mass_mailing_views.xml
Expand Up @@ -3,8 +3,6 @@

<!-- Marketing / Mailing -->
<menuitem name="Email Marketing" id="mass_mailing_menu_root" sequence="60" web_icon="mass_mailing,static/description/icon.png"/>
<menuitem name="Mailings" id="mass_mailing_menu"
parent="mass_mailing_menu_root" sequence="1" groups="mass_mailing.group_mass_mailing_user"/>
<menuitem name="Mailing Lists" id="mass_mailing_mailing_list_menu"
parent="mass_mailing_menu_root" sequence="2" groups="mass_mailing.group_mass_mailing_user"/>
<!-- Marketing / Configuration -->
Expand Down Expand Up @@ -825,9 +823,8 @@
</field>
</record>

<menuitem name="Mailings" id="menu_email_mass_mailings"
parent="mass_mailing_menu" sequence="2"
action="action_view_mass_mailings"/>
<menuitem name="Mailings" id="mass_mailing_menu" parent="mass_mailing_menu_root"
sequence="1" action="action_view_mass_mailings" groups="mass_mailing.group_mass_mailing_user"/>

<!-- MAILING CAMPAIGN STAGE !-->
<record model="ir.ui.view" id="view_mail_mass_mailing_stage_search">
Expand Down
2 changes: 1 addition & 1 deletion addons/product_expiry/views/production_lot_views.xml
Expand Up @@ -54,7 +54,7 @@
<field name="inherit_id" ref="stock.search_product_lot_filter"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='product_id']" position="after">
<filter string="Expiration alerts" name="expiration_alerts" domain="[('alert_date', '&lt;=', time.strftime('%Y-%m-%d %H:%M:%S'))]"/>
<filter string="Expiration Alerts" name="expiration_alerts" domain="[('alert_date', '&lt;=', time.strftime('%Y-%m-%d %H:%M:%S'))]"/>
</xpath>
</field>
</record>
Expand Down
33 changes: 4 additions & 29 deletions addons/project/views/project_views.xml
Expand Up @@ -8,11 +8,6 @@
web_icon="project,static/description/icon.png"
sequence="50"/>

<menuitem name="Search"
id="menu_project_management"
parent="menu_main_pm"
sequence="2" groups="base.group_no_one,group_project_user"/>

<menuitem id="menu_project_config" name="Configuration" parent="menu_main_pm"
sequence="100" groups="project.group_project_manager"/>

Expand Down Expand Up @@ -197,8 +192,8 @@
<field name="user_id" string="Project Manager"/>
<field name="partner_id" string="Contact" filter_domain="[('partner_id', 'child_of', self)]"/>
<group expand="0" string="Group By">
<filter string="Manager" name="Manager" context="{'group_by':'user_id'}"/>
<filter string="Contact" name="Partner" context="{'group_by':'partner_id'}"/>
<filter string="Project Manager" name="Manager" context="{'group_by': 'user_id'}"/>
<filter string="Customer" name="Partner" context="{'group_by': 'partner_id'}"/>
</group>
</search>
</field>
Expand Down Expand Up @@ -696,22 +691,8 @@
<field name="act_window_id" ref="action_view_task"/>
</record>

<record id="project_task_action_activity" model="ir.actions.act_window">
<field name="name">My Next Activities</field>
<field name="res_model">project.task</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,kanban,calendar</field>
<field name="view_id" ref="project_task_view_tree_activity"/>
<field name="context">{'search_default_activities_my':1}</field>
<field name="domain">[('activity_date_deadline', '!=', False)]</field>
<field name="help" type="html">
<p class="o_view_nocontent_empty_folder">
No scheduled activity at the moment
</p>
</field>
</record>

<menuitem action="action_view_task" id="menu_action_view_task" parent="project.menu_project_management" sequence="5"/>
<menuitem name="All Tasks" id="menu_project_management" parent="menu_main_pm"
action="action_view_task" sequence="2" groups="base.group_no_one,group_project_user"/>

<record id="project_task_action_from_partner" model="ir.actions.act_window">
<field name="name">Tasks</field>
Expand All @@ -720,12 +701,6 @@
<field name="search_view_id" ref="view_task_search_form"/>
</record>

<menuitem id="project_task_menu_activity"
name="Next Activities"
parent="project.menu_project_management"
action="project_task_action_activity"
sequence="25"/>

<record id="action_view_task_overpassed_draft" model="ir.actions.act_window">
<field name="name">Overpassed Tasks</field>
<field name="res_model">project.task</field>
Expand Down
Expand Up @@ -64,7 +64,7 @@
</record>

<menuitem id="menu_project_profitability_analysis"
parent="hr_timesheet.menu_timesheets_reports"
parent="project.menu_project_report"
action="project_profitability_report_action"
name="Project Costs and Revenues"
sequence="50"/>
Expand Down
4 changes: 2 additions & 2 deletions addons/sale_timesheet/views/hr_timesheet_views.xml
Expand Up @@ -6,13 +6,13 @@
<field name="model">account.analytic.line</field>
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='month']" position="after">
<xpath expr="//filter[@name='month']" position="before">
<field name="timesheet_invoice_type"/>
<field name="timesheet_invoice_id"/>
<separator/>
<filter name="billable_time" string="Billable Hours" domain="[('timesheet_invoice_type', '=', 'billable_time')]"/>
<filter name="billable_fixed" string="Fixed Price Projects" domain="[('timesheet_invoice_type', '=', 'billable_fixed')]"/>
<filter name="non_billable" string="Non Billable Hours" domain="[('timesheet_invoice_type', '=', 'non_billable')]"/>
<separator/>
</xpath>
</field>
</record>
Expand Down
3 changes: 3 additions & 0 deletions addons/stock/views/stock_inventory_views.xml
Expand Up @@ -58,6 +58,9 @@
<field name="date"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="product_id" string="Inventory Product" filter_domain="['|', ('product_id', 'ilike', self), ('line_ids.product_id','ilike',self)]"/>
<filter string="Draft" name="draft" domain="[('state', '=', 'draft')]"/>
<filter string="In Progress" name="confirm" domain="[('state', '=', 'confirm')]"/>
<filter string="Validated" name="done" domain="[('state', '=', 'done')]"/>
<group expand="0" string="Group By">
<filter string="Status" name="status" domain="[]" context="{'group_by':'state'}"/>
<filter string="Inventories Date" name="inventories_month" domain="[]" context="{'group_by':'date'}" help="Physical Inventories by Date"/>
Expand Down

0 comments on commit d8be813

Please sign in to comment.