You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

37 lines
1.8 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="manager_approval_view_list" model="ir.ui.view">
<!--Create a new tree view-->
<field name="name">manager.approval.view.list</field>
<field name="model">manager.approval</field>
<field name="arch" type="xml">
<tree string="Manager Approval" editable="top" create="false">
<!--Add certain fields to tree view-->
<field name="task"/>
<field name="project_id"/>
<field name="user_ids" widget="many2many_avatar_user"/>
<field name="planned_hours"/>
<field name="button_view_boolean" invisible="1"/>
<field name="button_view_boolean_cancel" invisible="1"/>
<button name="action_approve" string="Approve"
class="oe_highlight" type="object"
attrs="{'invisible': [
('button_view_boolean', '=', True)]}"/>
<button name="action_manager_cancel" string="Cancel"
class="oe_highlight" type="object"
attrs="{'invisible': [
('button_view_boolean_cancel', '=', True)]}"/>
</tree>
</field>
</record>
<!--Action for Allocation Time Approval-->
<record id="manager_approval_action" model="ir.actions.act_window">
<field name="name">Allocation Time Approval</field>
<field name="res_model">manager.approval</field>
<field name="view_mode">tree</field>
</record>
<!--Add a menu in Timesheet module-->
<menuitem name="Allocated Hour Approval" id="allocated_hour_approval"
action="manager_approval_action"
parent="hr_timesheet.menu_hr_time_tracking"/>
</odoo>