跳至内容
菜单
此问题已终结
1 回复
1459 查看

i am using default odoo time off module for leave management. i want when user login as a HR or ADMIN then it show the "Approve" and "Refuse" Button. if the user login as a employee then it can't show the "Approve" and "Refuse" Button.


and i also want when employee create a new time off and click on save&close button. the mail can be send to the related HR.

形象
丢弃
编写者 最佳答案

Create a HR Group..

<?xml version="1.0" encoding="utf-8"?>

<odoo>

<record id="hr_holidays_custom" model="ir.ui.view">

<field name="name">hr.holidays.custom<field>

<field name="model">hr.leave<field>

<field name="inherit_id" ref="hr_holidays.hr_leave_view_form">

<field name="arch" type="xml">

<xpath expr="""//button[@name='"action_approve']"" position="replace">

<button string="Approve" name="action_approve" states="confirm" type="object" class="oe_highlight" groups="hr_employee.group_hr_employee_hr,hr_employee.group_hr_employee_admin">

<xpath>

<xpath expr="""//button[@name='"action_refuse']"" position="replace">

<button string="Refuse" name="action_refuse" states="confirm" type="object" groups="hr_employee.group_hr_employee_hr,hr_employee.group_hr_employee_admin">

<xpath>

<field>

<record>

<odoo>




形象
丢弃