analytic_plan_views.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="account_analytic_plan_form_view" model="ir.ui.view">
  4. <field name="name">account.analytic.plan.form</field>
  5. <field name="model">account.analytic.plan</field>
  6. <field name="arch" type="xml">
  7. <form string="Analytic Plans">
  8. <field name="company_id" invisible="1"/>
  9. <sheet>
  10. <div class="oe_button_box" name="button_box">
  11. <button name="action_view_children_plans" type="object" class="oe_stat_button" icon="fa-bars">
  12. <field string="Subplans" name="children_count" widget="statinfo"/>
  13. </button>
  14. <button name="action_view_analytical_accounts" type="object" class="oe_stat_button" icon="fa-bars">
  15. <div class="o_field_widget o_stat_info">
  16. <span class="o_stat_value"><field name="all_account_count"/></span>
  17. <span class="o_stat_text">Analytic Accounts</span>
  18. </div>
  19. </button>
  20. </div>
  21. <div class="oe_title">
  22. <h1>
  23. <field name="name"/>
  24. </h1>
  25. </div>
  26. <group>
  27. <group>
  28. <field name="parent_id"/>
  29. <field name="default_applicability"
  30. attrs="{'invisible': [('parent_id', '!=', False)]}"/>
  31. <field name="color" widget="color_picker"/>
  32. </group>
  33. <group>
  34. <field name="company_id" groups="base.group_multi_company"/>
  35. </group>
  36. </group>
  37. <notebook>
  38. <page string="Applicability" name="applicability"
  39. attrs="{'invisible': [('parent_id', '!=', False)]}">
  40. <field name="applicability_ids">
  41. <tree editable="bottom">
  42. <field name="business_domain"/>
  43. <field name="applicability"/>
  44. </tree>
  45. </field>
  46. </page>
  47. </notebook>
  48. </sheet>
  49. </form>
  50. </field>
  51. </record>
  52. <record id="account_analytic_plan_tree_view" model="ir.ui.view">
  53. <field name="name">account.analytic.plan.tree</field>
  54. <field name="model">account.analytic.plan</field>
  55. <field name="arch" type="xml">
  56. <tree string="Analytic Plans" multi_edit="1">
  57. <field name="name"/>
  58. <field name="default_applicability"/>
  59. <field name="color" widget="color_picker"/>
  60. <field name="company_id" groups="base.group_multi_company"/>
  61. </tree>
  62. </field>
  63. </record>
  64. <record id="account_analytic_plan_action" model="ir.actions.act_window">
  65. <field name="name">Analytic Plans</field>
  66. <field name="res_model">account.analytic.plan</field>
  67. <field name="view_mode">tree,form</field>
  68. <field name="view_ids" eval="[(5, 0, 0),
  69. (0, 0, {'view_mode': 'tree'}),
  70. (0, 0, {'view_mode': 'form', 'view_id': ref('account_analytic_plan_form_view')})]"/>
  71. <field name="domain">[('parent_id', '=', False)]</field>
  72. <field name="help" type="html">
  73. <p class="o_view_nocontent_smiling_face">
  74. Click to add a new analytic account plan.
  75. </p>
  76. </field>
  77. </record>
  78. </odoo>