You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

157 lines
5.6 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_res_partner_changeset_tree" model="ir.ui.view">
  4. <field name="name">res.partner.changeset.tree</field>
  5. <field name="model">res.partner.changeset</field>
  6. <field name="arch" type="xml">
  7. <tree string="Partner Changeset" delete="false" create="false">
  8. <field name="partner_id"/>
  9. <field name="date"/>
  10. <field name="state"/>
  11. </tree>
  12. </field>
  13. </record>
  14. <record id="view_res_partner_changeset_form" model="ir.ui.view">
  15. <field name="name">res.partner.changeset.form</field>
  16. <field name="model">res.partner.changeset</field>
  17. <field name="arch" type="xml">
  18. <form string="Partner Changeset" delete="false" create="false">
  19. <header>
  20. <button name="apply"
  21. string="Apply pending changes" type="object"
  22. class="oe_highlight"
  23. states="draft"/>
  24. <button name="cancel"
  25. string="Reject pending changes" type="object"
  26. class="oe_highlight"
  27. states="draft"/>
  28. <field name="state" widget="statusbar"
  29. statusbar_visible="draft,done"/>
  30. </header>
  31. <sheet string="Partner Changeset">
  32. <group>
  33. <field name="partner_id"/>
  34. <field name="source"/>
  35. <field name="date"/>
  36. </group>
  37. <group string="Changes">
  38. <field name="change_ids" nolabel="1">
  39. <tree string="Partner Changeset Change">
  40. <field name="field_id" context="{'no_open': true}"/>
  41. <field name="field_type" invisible="1"/>
  42. <field name="origin_value_display" string="Previous"/>
  43. <field name="new_value_display"/>
  44. <field name="state"/>
  45. <button name="apply"
  46. string="Apply" type="object"
  47. icon="gtk-apply"
  48. states="draft"/>
  49. <button name="cancel"
  50. string="Reject" type="object"
  51. icon="gtk-close"
  52. states="draft"/>
  53. </tree>
  54. </field>
  55. </group>
  56. <group>
  57. <field name="note"/>
  58. </group>
  59. </sheet>
  60. </form>
  61. </field>
  62. </record>
  63. <record id="view_res_partner_changeset_change_form" model="ir.ui.view">
  64. <field name="name">res.partner.changeset.change.form</field>
  65. <field name="model">res.partner.changeset.change</field>
  66. <field name="arch" type="xml">
  67. <form string="Partner Changeset Change" delete="false" create="false">
  68. <header>
  69. <button name="apply"
  70. string="Apply" type="object"
  71. class="oe_highlight"
  72. states="draft"/>
  73. <button name="cancel"
  74. string="Reject" type="object"
  75. class="oe_highlight"
  76. states="draft"/>
  77. <field name="state" widget="statusbar"
  78. statusbar_visible="draft,done"/>
  79. </header>
  80. <sheet>
  81. <group>
  82. <field name="field_id" options="{'no_open': true}"/>
  83. <field name="field_type" invisible="1"/>
  84. <!-- attrs are added in fields_view_get -->
  85. <field name="origin_value_char"/>
  86. <field name="new_value_char"/>
  87. <field name="origin_value_date"/>
  88. <field name="new_value_date"/>
  89. <field name="origin_value_datetime"/>
  90. <field name="new_value_datetime"/>
  91. <field name="origin_value_float"/>
  92. <field name="new_value_float"/>
  93. <field name="origin_value_integer"/>
  94. <field name="new_value_integer"/>
  95. <field name="origin_value_text"/>
  96. <field name="new_value_text"/>
  97. <field name="origin_value_boolean"/>
  98. <field name="new_value_boolean"/>
  99. <field name="origin_value_reference"/>
  100. <field name="new_value_reference"/>
  101. </group>
  102. </sheet>
  103. </form>
  104. </field>
  105. </record>
  106. <record id="view_res_partner_changeset_search" model="ir.ui.view">
  107. <field name="name">res.partner.changeset.search</field>
  108. <field name="model">res.partner.changeset</field>
  109. <field name="arch" type="xml">
  110. <search string="Partner Changeset">
  111. <field name="partner_id"/>
  112. <filter string="Pending" name="draft"
  113. domain="[('state','=','draft')]"/>
  114. <filter string="Done" name="done"
  115. domain="[('state','=','done')]"/>
  116. <group expand="0" string="Group By">
  117. <filter string="Partner"
  118. name="groupby_partner_id"
  119. context="{'group_by': 'partner_id'}"/>
  120. <filter string="State"
  121. name="groupby_state"
  122. context="{'group_by': 'state'}"/>
  123. </group>
  124. </search>
  125. </field>
  126. </record>
  127. <record model="ir.actions.act_window" id="action_res_partner_changeset_view">
  128. <field name="name">Partner Changeset</field>
  129. <field name="type">ir.actions.act_window</field>
  130. <field name="res_model">res.partner.changeset</field>
  131. <field name="view_type">form</field>
  132. <field name="view_mode">tree,form</field>
  133. <field name="context">{'search_default_draft': 1}</field>
  134. <field name="search_view_id" ref="view_res_partner_changeset_search"/>
  135. </record>
  136. <menuitem id="menu_res_partner_changeset"
  137. parent="menu_changeset"
  138. sequence="20"
  139. name="Changesets"
  140. action="action_res_partner_changeset_view"/>
  141. </odoo>