diff options
| author | Kinjal Mehta <kme@odoo.com> | 2016-01-18 16:52:13 +0530 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2016-03-23 16:35:34 +0100 |
| commit | a57592abe4e8ac3bac04cbd19eeac88a163aaf7e (patch) | |
| tree | 74684092ffee20e8a917f7a208200c4a09c612e3 /addons/analytic/models | |
| parent | 93da11a59c1a13324f1c7b179da56d498d84961e (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/models')
| -rw-r--r-- | addons/analytic/models/analytic.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/addons/analytic/models/analytic.py b/addons/analytic/models/analytic.py index e7fbb36f8f6..20b186c51a4 100644 --- a/addons/analytic/models/analytic.py +++ b/addons/analytic/models/analytic.py @@ -44,10 +44,7 @@ class account_analytic_account(models.Model): name = fields.Char(string='Analytic Account', index=True, required=True, track_visibility='onchange') code = fields.Char(string='Reference', index=True, track_visibility='onchange') # FIXME: we reused account_type to implement the closed accounts (feature removed by mistake on release of v9) without modifying the schemas on already released v9, but it would be more clean to rename it - account_type = fields.Selection([ - ('normal', 'Active'), - ('closed', 'Archived') - ], string='State', required=True, default='normal') + active = fields.Boolean('Active', help="If the active field is set to False, it will allow you to hide the account without removing it.", default=True) tag_ids = fields.Many2many('account.analytic.tag', 'account_analytic_account_tag_rel', 'account_id', 'tag_id', string='Tags', copy=True) line_ids = fields.One2many('account.analytic.line', 'account_id', string="Analytic Lines") |
