Skip to Content
Menu
This question has been flagged
2 Replies
1560 Views

Hi everybody,

in helpdesk module, there is the view  helpdesk.helpdesk_ticket_view_form with an inherited view  helpdesk_timesheet.helpdesk_ticket_view_form_inherit_helpdesk_timesheet  which add a notebook with 2 tabs (description and timesheets) in the parent view.


I want to add a other inherited view to add a new tab

I tried to inherit the first view and add a priority superior to the the priority of the inherited view but it doesn't works

I tried whith this followings xpath :

But each time, i've got the error that the element cannot be located in the parent view


Do you know how to do that ?

Avatar
Discard
Best Answer

Hi  Vincent DUBREIL ,

Try,

<record id="helpdesk_ticket_view_form_inherit_helpdesk_custom_timesheet" model="ir.ui.view">
<field name='name'>helpdesk.ticket.form.inherit.timesheet.customfield>
<
field name="model">helpdesk.ticketfield>
<
field name="inherit_id" ref="helpdesk_timesheet.helpdesk_ticket_view_form_inherit_helpdesk_timesheet"/>
<
field name="arch" type="xml">
<xpath expr="//page[@name='description']" position="after">
<page string="New Page" name="new_page"/>
xpath>
field>
record>


Avatar
Discard
Author

Yes it works with helpdesk_timesheet in the depends of manifest file.
Thank you Kiran K :)

Author Best Answer

Hi Kiran,

Error with your solution :

Error while validating view near:





Field `display_timer` does not exist

View error context:
{'file': '/home/odoo/src/user/nidek_module/views/helpdesk_ticket.xml',
'line': 1,
'name': 'helpdesk\.ticket\.form\.inherit\.timesheet\.custom',
\ 'view':\ ir\.ui\.view\(2146,\),
\ 'view\.model':\ 'helpdesk\.ticket',
\ 'view\.parent':\ ir.ui.view(2021,),
'xmlid': 'helpdesk_ticket_view_form_inherit_helpdesk_custom_timesheet2'}
Avatar
Discard

Did you added "helpdesk_timesheet" to the depends section of the manifest file?