helpdesk_ticket_views.xml 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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_code" invisible="1"/>
  16. <field name="stage_id" invisible="1"/>
  17. <field name="request_type_id" required="1"/>
  18. <field name="affected_module_id"/>
  19. <field name="affected_user_email" widget="email" placeholder="email@example.com"/>
  20. <field name="business_impact"/>
  21. </group>
  22. <group string="Details">
  23. <field name="reproduce_steps"
  24. invisible="request_type_code != 'incident'"
  25. placeholder="Describe step by step how to reproduce the issue..."/>
  26. <field name="business_goal"
  27. invisible="request_type_code != 'improvement'"
  28. placeholder="Describe the business objective for this improvement..."/>
  29. </group>
  30. </group>
  31. <group string="Approval &amp; Billing">
  32. <field name="client_authorization"/>
  33. <field name="estimated_hours"/>
  34. <field name="approval_status"/>
  35. <field name="customer_approval_status"
  36. invisible="not stage_id or not stage_id.requires_customer_approval"
  37. readonly="1"/>
  38. <field name="customer_rejection_reason"
  39. invisible="customer_approval_status != 'rejected'"
  40. readonly="1"/>
  41. </group>
  42. <group>
  43. <field name="attachment_ids" widget="many2many_binary" readonly="1"/>
  44. </group>
  45. <group string="Template Information" invisible="not has_template">
  46. <field name="team_id" invisible="1"/>
  47. <div class="alert alert-info" role="alert">
  48. <strong>Template Active:</strong> This ticket uses a template configured for the team.
  49. <br/>
  50. <small>Template fields are configured in Helpdesk > Configuration > Templates</small>
  51. <br/>
  52. <small>Template fields will be displayed in the web form when creating tickets.</small>
  53. </div>
  54. </group>
  55. </page>
  56. </xpath>
  57. </field>
  58. </record>
  59. <!-- Extend helpdesk.ticket tree view -->
  60. <record id="helpdesk_ticket_view_tree_inherit_helpdesk_extras" model="ir.ui.view">
  61. <field name="name">helpdesk.ticket.tree.inherit.helpdesk.extras</field>
  62. <field name="inherit_id" ref="helpdesk.helpdesk_tickets_view_tree"/>
  63. <field name="model">helpdesk.ticket</field>
  64. <field name="arch" type="xml">
  65. <xpath expr="//field[@name='name']" position="after">
  66. <field name="request_type_id" optional="show"/>
  67. <field name="affected_module_id" optional="show"/>
  68. <field name="approval_status" optional="show"/>
  69. <field name="customer_approval_status" optional="hide"/>
  70. </xpath>
  71. </field>
  72. </record>
  73. <!-- Extend helpdesk.ticket search view -->
  74. <record id="helpdesk_ticket_view_search_inherit_helpdesk_extras" model="ir.ui.view">
  75. <field name="name">helpdesk.ticket.search.inherit.helpdesk.extras</field>
  76. <field name="inherit_id" ref="helpdesk.helpdesk_tickets_view_search_base"/>
  77. <field name="model">helpdesk.ticket</field>
  78. <field name="arch" type="xml">
  79. <xpath expr="//field[@name='partner_id']" position="after">
  80. <field name="affected_module_id"/>
  81. </xpath>
  82. </field>
  83. </record>
  84. </odoo>