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

Here this template in odoo 16 hr_holidays showing  a calendar in dashboard. i want to remove the dashboard in inherited custom mdule. how can I do that please help me. 
here is the default template 

xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">

<t t-name="hr_holidays.CalendarRenderer" owl="1">
<div class="o_timeoff_calendar">
<TimeOffDashboard t-if="showDashboard" employeeId="employeeId"/>
<t t-call="web.CalendarRenderer"/>
div>
t>

templates>
I inherit this view and remove calendar but its not working 
<templates xml:space="preserve">

<t t-name="hr_holidays.CalendarRenderer" t-extend="hr_holidays.CalendarRenderer">
<xpath expr="//div[@class='o_timeoff_calendar']" position="replace"/>
t>
templates>

I also add this template in manifest

'web.assets_backend': [
'custom_leave_management/static/src/views/inherit_calendar_view.xml',
],



形象
丢弃
最佳答案

Hi ,
Please try below working code in odoo 16.

<?xml version="1.0" encoding="UTF-8"?><templates xml:space="preserve"><t t-name="custom_leave_management.CalendarRenderer" t-inherit="hr_holidays.CalendarRenderer" t-inherit-mode="extension"   owl="1">    <xpath expr="//div[hasclass('o_timeoff_calendar')]" position="replace"/></t></templates>


Hope it helps

形象
丢弃
相关帖文 回复 查看 活动
2
8月 25
2305
1
7月 25
829
1
8月 25
1150
0
5月 25
1280
2
4月 25
3492