analytic_account_views.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_account_analytic_account_form" model="ir.ui.view">
  4. <field name="name">analytic.analytic.account.form</field>
  5. <field name="model">account.analytic.account</field>
  6. <field name="arch" type="xml">
  7. <form string="Analytic Account">
  8. <field name="company_id" invisible="1"/>
  9. <sheet string="Analytic Account">
  10. <div class="oe_button_box" name="button_box">
  11. <button class="oe_stat_button" type="action" name="%(account_analytic_line_action)d" icon="fa-usd">
  12. <div class="o_form_field o_stat_info">
  13. <span class="o_stat_text">Gross Margin</span>
  14. <span class="o_stat_value">
  15. <field name="balance" widget='monetary'/>
  16. </span>
  17. </div>
  18. </button>
  19. </div>
  20. <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
  21. <div class="oe_title">
  22. <label for="name"/>
  23. <h1>
  24. <field name="name" class="oe_inline" placeholder="e.g. Project XYZ"/>
  25. </h1>
  26. </div>
  27. <div name="project"/>
  28. <group name="main">
  29. <group>
  30. <field name="active" invisible="1"/>
  31. <field name="partner_id"/>
  32. <field name="code"/>
  33. </group>
  34. <group>
  35. <field name="plan_id" options="{'no_quick_create': True}"/>
  36. <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
  37. <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
  38. </group>
  39. </group>
  40. </sheet>
  41. <div class="oe_chatter">
  42. <field name="message_follower_ids"/>
  43. <field name="message_ids"/>
  44. </div>
  45. </form>
  46. </field>
  47. </record>
  48. <record id="view_account_analytic_account_list" model="ir.ui.view">
  49. <field name="name">account.analytic.account.list</field>
  50. <field name="model">account.analytic.account</field>
  51. <field eval="8" name="priority"/>
  52. <field name="arch" type="xml">
  53. <tree string="Analytic Accounts" multi_edit="1">
  54. <field name="company_id" invisible="1"/>
  55. <field name="currency_id" invisible="1"/>
  56. <field name="name" string="Name"/>
  57. <field name="code"/>
  58. <field name="partner_id"/>
  59. <field name="plan_id"/>
  60. <field name="active" invisible="1"/>
  61. <field name="company_id" groups="base.group_multi_company"/>
  62. <field name="debit" sum="Debit"/>
  63. <field name="credit" sum="Credit"/>
  64. <field name="balance" sum="Balance"/>
  65. </tree>
  66. </field>
  67. </record>
  68. <record id="view_account_analytic_account_list_select" model="ir.ui.view">
  69. <field name="name">account.analytic.account.list.select</field>
  70. <field name="model">account.analytic.account</field>
  71. <field name="mode">primary</field>
  72. <field eval="18" name="priority"/>
  73. <field name="inherit_id" ref="analytic.view_account_analytic_account_list"/>
  74. <field name="arch" type="xml">
  75. <tree position="attributes">
  76. <attribute name="multi_edit">0</attribute>
  77. </tree>
  78. </field>
  79. </record>
  80. <record id="view_account_analytic_account_kanban" model="ir.ui.view">
  81. <field name="name">account.analytic.account.kanban</field>
  82. <field name="model">account.analytic.account</field>
  83. <field name="arch" type="xml">
  84. <kanban class="o_kanban_mobile">
  85. <field name="display_name"/>
  86. <field name="balance"/>
  87. <field name="currency_id"/>
  88. <templates>
  89. <t t-name="kanban-box">
  90. <div t-attf-class="oe_kanban_card oe_kanban_global_click">
  91. <div t-attf-class="#{!selection_mode ? 'text-center' : ''}">
  92. <strong><span><field name="display_name"/></span></strong>
  93. </div>
  94. <hr class="mt8 mb8"/>
  95. <div class="row">
  96. <div t-attf-class="col-12 #{!selection_mode ? 'text-center' : ''}">
  97. <span>
  98. Balance: <field name="balance" widget="monetary"/>
  99. </span>
  100. </div>
  101. </div>
  102. </div>
  103. </t>
  104. </templates>
  105. </kanban>
  106. </field>
  107. </record>
  108. <record id="view_account_analytic_account_search" model="ir.ui.view">
  109. <field name="name">account.analytic.account.search</field>
  110. <field name="model">account.analytic.account</field>
  111. <field name="arch" type="xml">
  112. <search string="Analytic Account">
  113. <field name="name" filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]" string="Analytic Account"/>
  114. <field name="partner_id"/>
  115. <separator/>
  116. <filter string="Archived" domain="[('active', '=', False)]" name="inactive"/>
  117. <group expand="0" string="Group By...">
  118. <filter string="Associated Partner" name="associatedpartner" domain="[]" context="{'group_by': 'partner_id'}"/>
  119. </group>
  120. </search>
  121. </field>
  122. </record>
  123. <record id="action_analytic_account_form" model="ir.actions.act_window">
  124. <field name="name">Chart of Analytic Accounts</field>
  125. <field name="res_model">account.analytic.account</field>
  126. <field name="view_mode">tree,kanban,form</field>
  127. <field name="search_view_id" ref="view_account_analytic_account_search"/>
  128. <field name="context">{'search_default_active':1}</field>
  129. <field name="view_id" ref="view_account_analytic_account_list"/>
  130. <field name="help" type="html">
  131. <p class="o_view_nocontent_smiling_face">
  132. Add a new analytic account
  133. </p>
  134. </field>
  135. </record>
  136. <record id="action_account_analytic_account_form" model="ir.actions.act_window">
  137. <field name="name">Analytic Accounts</field>
  138. <field name="type">ir.actions.act_window</field>
  139. <field name="res_model">account.analytic.account</field>
  140. <field name="search_view_id" ref="view_account_analytic_account_search"/>
  141. <field name="context">{'search_default_active':1}</field>
  142. <field name="view_mode">tree,kanban,form</field>
  143. <field name="help" type="html">
  144. <p class="o_view_nocontent_smiling_face">
  145. Add a new analytic account
  146. </p>
  147. </field>
  148. </record>
  149. </odoo>