Odoo Help


how to show "incative" field in historical data?

on 12/5/14, 5:14 AM 1,059 views

I  make the two fields inactive in the Book master table by usiong "active" field.

Python code is -

class book_master(osv.osv):

 _name =""
    _order = "name asc"
    _columns = {
        'book_no' : fields.char('Book  ID', size=30, readonly=True),
        'name'             : fields.char('Procedure Type', size=60),
        'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the Facility without removing it."),
    _defaults = {
         'active': 1,       

Xml code is

 <record id="view_book_master_form" model="ir.ui.view">
        <field name="name">book.master.form</field>
        <field name="model">book.master</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
         <form string="Book  Details">
          <field name="book_no"/>
          <field name="name"/>
          <field name="active"/>

I don't want to lose historical data associated with these books, just need them to not be visible in our book list.

Please help me





| 5 4 6
Zagreb | Karlovac, Croatia

there is only 10 kind of people the ones that understand binary ... and others

On 12/5/14, 6:34 AM

Field named "active" has a special behavior... (in fact it is a 'reserved word')
if it is set True, is hides the record in tree views... this applies to any model...

If you don't want that type of behaivor just rename field active  to activ or something else, except "active"
f you have field named "active" to show those records in tree view, you need to set a custom filter on tree view,
and show fileds where active = False ... 

that should do the trick.. 

hope it helps


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/5/14, 5:14 AM
Seen: 1059 times
Last updated: 3/16/15, 8:10 AM