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.

56 lines
2.4 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <record id="view_attachment_queue_form" model="ir.ui.view">
  4. <field name="model">attachment.queue</field>
  5. <field name="inherit_id" ref="attachment_queue.view_attachment_queue_form" />
  6. <field name="arch" type="xml">
  7. <!-- Add Related Task and Backend -->
  8. <xpath expr="//field[@name='url']" position="after">
  9. <field name="method_type" invisible="1"/>
  10. <field
  11. name="task_id"
  12. domain="[('method_type', '!=', 'import')]"
  13. attrs="{'required': [('file_type', '=', 'export')], 'readonly': [('method_type', '=', 'import')]}"
  14. />
  15. <field name="storage_backend_id"/>
  16. </xpath>
  17. </field>
  18. </record>
  19. <record id="view_attachment_queue_tree" model="ir.ui.view">
  20. <field name="model">attachment.queue</field>
  21. <field name="inherit_id" ref="attachment_queue.view_attachment_queue_tree" />
  22. <field name="arch" type="xml">
  23. <xpath expr="//tree" position="attributes">
  24. <attribute name="decoration-muted">state == 'done'</attribute>
  25. </xpath>
  26. <xpath expr="//field[@name='file_type']" position="after">
  27. <field name="task_id"/>
  28. <field name="storage_backend_id"/>
  29. </xpath>
  30. </field>
  31. </record>
  32. <record id="attachment_queue_view_search" model="ir.ui.view">
  33. <field name="model">attachment.queue</field>
  34. <field name="inherit_id" ref="attachment_queue.view_attachment_queue_search"/>
  35. <field name="arch" type="xml">
  36. <field name="type" position="after">
  37. <field name="task_id" filter_domain="[('task_id.name','ilike',self)]"/>
  38. </field>
  39. </field>
  40. </record>
  41. <record id="action_attachment_queue_related" model="ir.actions.act_window">
  42. <field name="name">Attachments Queue</field>
  43. <field name="type">ir.actions.act_window</field>
  44. <field name="res_model">attachment.queue</field>
  45. <field name="view_type">form</field>
  46. <field name="view_mode">tree,form</field>
  47. <field name="view_id" eval="False"/>
  48. <field name="domain">[('task_id', '=', active_id)]</field>
  49. <field name="search_view_id" ref="attachment_queue.view_attachment_queue_search"/>
  50. </record>
  51. </odoo>