中国本土应用
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.

75 lines
3.7KB

  1. <?xml version="1.0"?>
  2. <odoo>
  3. <data>
  4. <record model="ir.ui.view" id="wecom_material_form">
  5. <field name="name">wecom.material.form</field>
  6. <field name="model">wecom.material</field>
  7. <field name="arch" type="xml">
  8. <form>
  9. <sheet>
  10. <div class="oe_button_box" name="button_box">
  11. <button class="oe_stat_button" name="upload_media" string="Upload media files" type="object" icon="fa-upload" attrs="{'invisible': ['|',('id','=',False),('company_id', '=', False)]}"/>
  12. </div>
  13. <group col="4">
  14. <field name="company_id" widget="selection" />
  15. </group>
  16. <group>
  17. <group>
  18. <field name="name" />
  19. <field name="media_type" attrs="{'readonly': ['|',('media_id', '!=', False),('img_url', '!=', False)]}"/>
  20. <field name="temporary" force_save="1" attrs="{'readonly': [('media_type', '!=', 'image')],'invisible': ['|',('media_id','!=',False),('img_url','!=',False)]}"/>
  21. <field name="media_file" filename="media_filename" widget="binary" attrs="{'invisible': [('media_type','=','image')],'readonly': ['|',('media_id', '!=', False),('img_url', '!=', False)]}"/>
  22. <field name="media_file" filename="media_filename" widget="image" attrs="{'invisible': [('media_type','!=','image')]}"/>
  23. <field name="media_filename" invisible="1"/>
  24. </group>
  25. <group>
  26. <field name="media_id" widget="CopyClipboardChar"/>
  27. <field name="img_url" widget="CopyClipboardChar" attrs="{'invisible': [('media_type','!=','image')]}"/>
  28. <field name="created_at"/>
  29. </group>
  30. </group>
  31. </sheet>
  32. </form>
  33. </field>
  34. </record>
  35. <record id="wecom_material_filter" model="ir.ui.view">
  36. <field name="name">wecom.material.search</field>
  37. <field name="model">wecom.material</field>
  38. <field name="arch" type="xml">
  39. <search>
  40. <field name="company_id" />
  41. <group expand="0" string="Group By">
  42. <filter string="Companies" name="Companies" domain="" context="{'group_by':'company_id'}"/>
  43. </group>
  44. </search>
  45. </field>
  46. </record>
  47. <record model="ir.ui.view" id="wecom_material_tree">
  48. <field name="name">wecom.material.tree</field>
  49. <field name="model">wecom.material</field>
  50. <field name="arch" type="xml">
  51. <tree expand="1">
  52. <field name="company_id"/>
  53. <field name="name"/>
  54. <field name="media_type"/>
  55. <field name="temporary"/>
  56. <field name="media_id"/>
  57. <field name="img_url"/>
  58. <field name="created_at"/>
  59. </tree>
  60. </field>
  61. </record>
  62. <record id="action_view_wecom_material" model="ir.actions.act_window">
  63. <field name="name">Wecom Material</field>
  64. <field name="res_model">wecom.material</field>
  65. <field name="view_mode">tree,form</field>
  66. <field name="context">{'group_by':['company_id']}</field>
  67. </record>
  68. </data>
  69. </odoo>
上海开阖软件有限公司 沪ICP备12045867号-1