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.

35 lines
1.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. </odoo>