summaryrefslogtreecommitdiff
path: root/addons/analytic/views/analytic_view.xml
diff options
context:
space:
mode:
authorKinjal Mehta <kme@odoo.com>2016-01-18 16:52:13 +0530
committerYannick Tivisse <yti@odoo.com>2016-03-23 16:35:34 +0100
commita57592abe4e8ac3bac04cbd19eeac88a163aaf7e (patch)
tree74684092ffee20e8a917f7a208200c4a09c612e3 /addons/analytic/views/analytic_view.xml
parent93da11a59c1a13324f1c7b179da56d498d84961e (diff)
[IMP] analytic: Replaced account_type field by active field
Currently there is a selection field 'account_type' on the account.analytic.account model with 2 values : Active or Archived Let's use an active field instead and add a Archive stat button on the form. That way, we can remove all the domain ('account_type','=','normal') which are implicit with the generic active field behavior
Diffstat (limited to 'addons/analytic/views/analytic_view.xml')
-rw-r--r--addons/analytic/views/analytic_view.xml11
1 files changed, 7 insertions, 4 deletions
diff --git a/addons/analytic/views/analytic_view.xml b/addons/analytic/views/analytic_view.xml
index c6bea569973..ee769474347 100644
--- a/addons/analytic/views/analytic_view.xml
+++ b/addons/analytic/views/analytic_view.xml
@@ -76,6 +76,10 @@
<form string="Analytic Account">
<sheet string="Analytic Account">
<div class="oe_button_box" name="button_box">
+ <button class="oe_stat_button" type="object" name="toggle_active" icon="fa-archive">
+ <field name="active" widget="boolean_button"
+ options='{"terminology": "archive"}'/>
+ </button>
<button class="oe_stat_button" type="action" name="%(account_analytic_line_action)d"
icon="fa-usd" string="Cost/Revenue" widget="statinfo"/>
</div>
@@ -93,7 +97,6 @@
</group>
<group>
<field name="tag_ids" widget="many2many_tags"/>
- <field name="account_type"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
</group>
@@ -118,7 +121,7 @@
<field name="display_name"/>
<field name="code"/>
<field name="partner_id"/>
- <field name="account_type" invisible="1"/>
+ <field name="active" invisible="1"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="debit"/>
<field name="credit"/>
@@ -135,7 +138,7 @@
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/>
<field name="tag_ids"/>
<field name="partner_id"/>
- <filter string="Active" domain="[('account_type','=','normal')]" name="active"/>
+ <filter string="Archived" domain="[('active', '=', False)]" name="inactive"/>
<group expand="0" string="Group By...">
<filter string="Associated Partner" domain="[]" context="{'group_by':'partner_id'}"/>
</group>
@@ -179,7 +182,7 @@
<group>
<group>
<field name="name"/>
- <field name="account_id" domain="[('account_type', '=', 'normal')]"/>
+ <field name="account_id"/>
<field name="date"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>