res_company_views.xml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <data>
  4. <record id="view_company_form" model="ir.ui.view">
  5. <field name="name">res.company.form</field>
  6. <field name="model">res.company</field>
  7. <field name="arch" type="xml">
  8. <form string="Company">
  9. <sheet>
  10. <field name="logo" widget="image" class="oe_avatar"/>
  11. <div class="oe_title">
  12. <label for="name"/>
  13. <h1>
  14. <field name="name" placeholder="e.g. My Company"/>
  15. </h1>
  16. </div>
  17. <notebook colspan="4">
  18. <page string="General Information" name="general_info">
  19. <group>
  20. <group>
  21. <field name="partner_id" string="Contact" readonly="1" required="0" groups="base.group_no_one"/>
  22. <label for="street" string="Address"/>
  23. <div class="o_address_format">
  24. <field name="street" placeholder="Street..." class="o_address_street"/>
  25. <field name="street2" placeholder="Street 2..." class="o_address_street"/>
  26. <field name="city" placeholder="City" class="o_address_city"/>
  27. <field name="state_id" class="o_address_state" placeholder="State" options='{"no_open": True}'/>
  28. <field name="zip" placeholder="ZIP" class="o_address_zip"/>
  29. <field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
  30. </div>
  31. <field name="vat"/>
  32. <field name="company_registry"/>
  33. <field name="currency_id" options="{'no_create': True, 'no_open': True}" id="company_currency" context="{'active_test': False}"/>
  34. </group>
  35. <group>
  36. <field name="phone" class="o_force_ltr"/>
  37. <field name="mobile" class="o_force_ltr"/>
  38. <field name="email"/>
  39. <field name="website" string="Website" widget="url" placeholder="e.g. https://www.odoo.com"/>
  40. <field name="parent_id" groups="base.group_multi_company"/>
  41. <field name="sequence" invisible="1"/>
  42. <field name="favicon" widget="image" class="float-start oe_avatar" groups="base.group_no_one"/>
  43. </group>
  44. <group name="social_media"/>
  45. </group>
  46. </page>
  47. </notebook>
  48. </sheet>
  49. </form>
  50. </field>
  51. </record>
  52. <record id="view_company_tree" model="ir.ui.view">
  53. <field name="name">res.company.tree</field>
  54. <field name="model">res.company</field>
  55. <field name="arch" type="xml">
  56. <tree string="Companies">
  57. <field name="sequence" widget="handle"/>
  58. <field name="name"/>
  59. <field name="partner_id"/>
  60. </tree>
  61. </field>
  62. </record>
  63. <record id="view_res_company_kanban" model="ir.ui.view">
  64. <field name="name">res.company.kanban</field>
  65. <field name="model">res.company</field>
  66. <field name="arch" type="xml">
  67. <kanban>
  68. <field name="name"/>
  69. <field name="email"/>
  70. <field name="phone"/>
  71. <templates>
  72. <t t-name="kanban-box">
  73. <div t-attf-class="oe_kanban_global_click">
  74. <div t-attf-class="#{!selection_mode ? 'text-center' : ''}">
  75. <i class="fa fa-building" role="img" aria-label="Enterprise" title="Enterprise"></i> <strong><field name="name"/></strong>
  76. </div>
  77. <hr class="mt4 mb4"/>
  78. <div class="row" t-if="!selection_mode">
  79. <div t-if="record.email.value" class="col-6 text-center">
  80. <strong>Email:</strong>
  81. </div>
  82. <div t-if="record.phone.value" class="col-6 text-center">
  83. <strong>Phone</strong>
  84. </div>
  85. <div t-if="record.email.value" class="col-6 text-center">
  86. <field name="email"/>
  87. </div>
  88. <div t-if="record.phone.value" class="col-6 text-center o_force_ltr">
  89. <field name="phone"/>
  90. </div>
  91. </div>
  92. <div t-else="">
  93. <div t-if="record.email.value">
  94. <strong>Email:</strong>
  95. <field name="email"/>
  96. </div>
  97. <div t-if="record.phone.value" class="o_force_ltr">
  98. <strong>Phone:</strong>
  99. <field name="phone"/>
  100. </div>
  101. </div>
  102. </div>
  103. </t>
  104. </templates>
  105. </kanban>
  106. </field>
  107. </record>
  108. <record id="action_res_company_form" model="ir.actions.act_window">
  109. <field name="name">Companies</field>
  110. <field name="type">ir.actions.act_window</field>
  111. <field name="res_model">res.company</field>
  112. <field name="view_mode">tree,kanban,form</field>
  113. <field name="help" type="html">
  114. <p class="o_view_nocontent_smiling_face">
  115. Create a new company
  116. </p><p>
  117. Create and manage the companies that will be managed by Odoo from here. Shops or subsidiaries can be created and maintained from here.
  118. </p>
  119. </field>
  120. </record>
  121. <menuitem action="action_res_company_form" id="menu_action_res_company_form" parent="base.menu_users"/>
  122. </data>
  123. </odoo>