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.

60 lines
3.9 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_server_action_form" model="ir.ui.view">
  5. <field name="name">Server Action (sql_export_email)</field>
  6. <field name="model">ir.actions.server</field>
  7. <field name="inherit_id" ref="base_export_email.view_server_action_form"/>
  8. <field name="arch" type="xml">
  9. <field name="state" position="attributes">
  10. <attribute name="on_change">onchange_state(state, context)</attribute>
  11. </field>
  12. <field name="model_id" position="attributes">
  13. <attribute name="attrs">{'invisible': [('state', '=', 'sql_export_email')]}</attribute>
  14. </field>
  15. <field name="srcmodel_id" position="attributes">
  16. <attribute name="attrs">{'required': [('state','!=','sql_export_email'),
  17. ('state','!=','export_email'),
  18. ('state','!=','dummy'),
  19. ('state','!=','sms'),
  20. ('state','!=','code'),
  21. ('state','!=','loop'),
  22. ('state','!=','trigger'),
  23. ('state','!=','object_copy'),
  24. ('state','!=','client_action'),
  25. ('state','!=','email'),
  26. ('state','!=','sms'),
  27. ('state','!=','other')]}</attribute>
  28. </field>
  29. <page string="Export data by email configuration" position="attributes">
  30. <attribute name="attrs">{'invisible':[('state','!=','export_email'),
  31. ('state','!=','sql_export_email')]}</attribute>
  32. </page>
  33. <xpath expr="//page[@string='Export data by email configuration']/group" position='inside'>
  34. <field name ="sql_export_id" attrs="{'required': [('state', '=', 'sql_export_email')],
  35. 'invisible': [('state', '!=', 'sql_export_email')]}" />
  36. </xpath>
  37. <field name="email_template_id" position="attributes">
  38. <attribute name="attrs">{'required':['|', ('state','=','export_email'),
  39. ('state','=','sql_export_email')]}</attribute>
  40. </field>
  41. <field name="export_format" position="attributes">
  42. <attribute name="attrs">{'invisible':[('state','!=','export_email')],
  43. 'required':[('state','=','export_email')]}</attribute>
  44. </field>
  45. <field name="filter_id" position="attributes">
  46. <attribute name="attrs">{'invisible':[('state','!=','export_email')]}</attribute>
  47. </field>
  48. <field name ="fields_to_export" position="attributes">
  49. <attribute name="attrs">{'invisible':[('state','!=','export_email')],
  50. 'required': [('state', '=', 'export_email'), ('saved_export_id', '=', False)]}</attribute>
  51. </field>
  52. <field name ="saved_export_id" position="attributes">
  53. <attribute name="attrs">{'invisible':[('state','!=','export_email')],
  54. 'required': [('state', '=', 'export_email'), ('fields_to_export', '=', False)]}</attribute>
  55. </field>
  56. </field>
  57. </record>
  58. </data>
  59. </openerp>