Skip to content
Snippets Groups Projects
Commit 278518cf62d1 authored by alorimier's avatar alorimier
Browse files

Fix #2 Add column active to show/hide code

parent efb590aba19e
No related branches found
Tags 16.0.0
No related merge requests found
......@@ -19,7 +19,6 @@
##############################################################################
from openerp.osv import fields, osv
from openerp.tools.translate import _
class analytic_code(osv.Model):
......@@ -29,7 +28,8 @@
name=fields.char("Name", size=128, translate=True, required=True),
nd_id=fields.many2one(
"analytic.dimension", ondelete="restrict"),
active=fields.boolean('Active'),
nd_name=fields.related('nd_id', 'name', type="char",
string="Dimension Name", store=False),
description=fields.char('Description', size=512),
)
......@@ -32,4 +32,7 @@
nd_name=fields.related('nd_id', 'name', type="char",
string="Dimension Name", store=False),
description=fields.char('Description', size=512),
)
_defaults = {
'active': 1,
}
......@@ -16,7 +16,8 @@
<newline />
<field name="nc_ids" string="ANCs">
<tree string="Analysis Codes" editable="bottom">
<field name="active"/>
<field name="name"/>
<field name="description"/>
</tree>
<form string="Analysis Codes" version="7.0">
......@@ -19,7 +20,8 @@
<field name="name"/>
<field name="description"/>
</tree>
<form string="Analysis Codes" version="7.0">
<field name="active"/>
<field name="name"/>
<field name="description"/>
</form>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment