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.

51 lines
2.9 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record id="ir_filters_view_form" model="ir.ui.view">
  5. <field name="model">ir.filters</field>
  6. <field name="inherit_id" ref="base.ir_filters_view_form" />
  7. <field name="arch" type="xml">
  8. <sheet position="before">
  9. <header>
  10. <button type="object" string="Test filter" name="button_test" class="oe_highlight" />
  11. <button type="object" string="Freeze filter" name="button_freeze" attrs="{'invisible': [('is_frozen', '=', True)]}" help="Have this filter contain extly the records it currently contains, with no changes in the future. Be careful, you can&apos;t undo this operation!" confirm="Are you sure? You can&apos;t undo this operation!" />
  12. </header>
  13. </sheet>
  14. <group position="after">
  15. <field name="is_frozen" invisible="True" />
  16. <field name="id" invisible="True" />
  17. <group string="Add the result of following filters">
  18. <field name="union_filter_ids" nolabel="1" domain="[('user_id', 'in', [False, uid]), ('id', '!=', id), ('model_id', '=', model_id)]" />
  19. </group>
  20. <group string="Remove the result of following filters">
  21. <field name="complement_filter_ids" nolabel="1" domain="[('user_id', 'in', [False, uid]),('id', '!=', id), ('model_id', '=', model_id)]" />
  22. </group>
  23. </group>
  24. <field name="domain" position="attributes">
  25. <attribute name="attrs">{'readonly': ['|', ('union_filter_ids', '!=', [[6, False, []]]), ('complement_filter_ids', '!=', [[6, False, []]])]}</attribute>
  26. </field>
  27. <field name="domain" position="after">
  28. <field name="domain_this" attrs="{'invisible': [('union_filter_ids', '=', [[6, False, []]]), ('complement_filter_ids', '=', [[6, False, []]])]}" />
  29. </field>
  30. </field>
  31. </record>
  32. <record id="form_ir_filters_save_new" model="ir.ui.view">
  33. <field name="model">ir.filters</field>
  34. <field name="priority">999</field>
  35. <field name="arch" type="xml">
  36. <form string="Save filter" version="7.0">
  37. <group>
  38. <field name="name" />
  39. <field name="is_default"/>
  40. <field name="save_as_public" />
  41. </group>
  42. <footer>
  43. <button class="oe_highlight" type="object" name="button_save" string="Save" />
  44. or
  45. <button class="oe_link" special="cancel" string="Cancel" />
  46. </footer>
  47. </form>
  48. </field>
  49. </record>
  50. </data>
  51. </openerp>