helpdesk_ticket_views.xml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Extend helpdesk.ticket form view -->
  4. <record id="helpdesk_ticket_view_form_inherit_helpdesk_extras" model="ir.ui.view">
  5. <field name="name">helpdesk.ticket.form.inherit.helpdesk.extras</field>
  6. <field name="inherit_id" ref="helpdesk.helpdesk_ticket_view_form"/>
  7. <field name="model">helpdesk.ticket</field>
  8. <field name="priority">20</field>
  9. <field name="arch" type="xml">
  10. <!-- Add Extras page with all custom fields -->
  11. <xpath expr="//notebook" position="inside">
  12. <page string="Extras" name="extras">
  13. <group>
  14. <group string="Request Information">
  15. <field name="request_type_id" required="1"/>
  16. <field name="affected_module_id"/>
  17. <field name="affected_user_id" widget="many2one_avatar_user"/>
  18. <field name="affected_user_email" widget="email" placeholder="email@example.com"/>
  19. <field name="business_impact"/>
  20. </group>
  21. <group string="Details">
  22. <field name="reproduce_steps"
  23. invisible="request_type_code != 'incident'"
  24. placeholder="Describe step by step how to reproduce the issue..."/>
  25. <field name="business_goal"
  26. invisible="request_type_code != 'improvement'"
  27. placeholder="Describe the business objective for this improvement..."/>
  28. </group>
  29. </group>
  30. <group string="Approval &amp; Billing">
  31. <field name="client_authorization"/>
  32. <field name="estimated_hours"/>
  33. <field name="approval_status"/>
  34. </group>
  35. <group string="Attachments">
  36. <field name="attachment_ids"/>
  37. </group>
  38. <group string="Template Information" invisible="not has_template">
  39. <field name="team_id" invisible="1"/>
  40. <div class="alert alert-info" role="alert">
  41. <strong>Template Active:</strong> This ticket uses a template configured for the team.
  42. <br/>
  43. <small>Template fields are configured in Helpdesk > Configuration > Templates</small>
  44. <br/>
  45. <small>Template fields will be displayed in the web form when creating tickets.</small>
  46. </div>
  47. </group>
  48. </page>
  49. </xpath>
  50. </field>
  51. </record>
  52. <!-- Extend helpdesk.ticket tree view -->
  53. <record id="helpdesk_ticket_view_tree_inherit_helpdesk_extras" model="ir.ui.view">
  54. <field name="name">helpdesk.ticket.tree.inherit.helpdesk.extras</field>
  55. <field name="inherit_id" ref="helpdesk.helpdesk_tickets_view_tree"/>
  56. <field name="model">helpdesk.ticket</field>
  57. <field name="arch" type="xml">
  58. <xpath expr="//field[@name='name']" position="after">
  59. <field name="request_type_id" optional="show"/>
  60. <field name="affected_module_id" optional="show"/>
  61. <field name="approval_status" optional="show"/>
  62. </xpath>
  63. </field>
  64. </record>
  65. <!-- Extend helpdesk.ticket search view -->
  66. <record id="helpdesk_ticket_view_search_inherit_helpdesk_extras" model="ir.ui.view">
  67. <field name="name">helpdesk.ticket.search.inherit.helpdesk.extras</field>
  68. <field name="inherit_id" ref="helpdesk.helpdesk_tickets_view_search_base"/>
  69. <field name="model">helpdesk.ticket</field>
  70. <field name="arch" type="xml">
  71. <xpath expr="//field[@name='partner_id']" position="after">
  72. <field name="affected_module_id" string="Affected Module"/>
  73. </xpath>
  74. </field>
  75. </record>
  76. </odoo>