跳至内容
菜单
此问题已终结
1 回复
7641 查看

I have created a new model called "car.services". Whenever i create a new record, it is not showing in tree view.


class car_services(orm.Model):

_name = 'car.services'

_columns = {

      'name': fields.char('Name'),

     'active': fields.boolean('Active'),

     'car_no': fields.char('Car Number')

     'start_date': fields.date('Start Date'),

     'end_date':fields.date('End Date'),

     'type':fields.selection([('normal', 'Normal'), ('priority', 'Priority'), ('disc', 'Discount')], 'Type',                     required=True),

  }

形象
丢弃
最佳答案

Odoo uses some special reserved fields. A few field names are reserved for pre-defined behaviors beyond that of automated fields. They should be defined on a model when the related behavior is desired. Field "active" is one of them. If you don't set it as true, record will automatically goes invisible. You can find it through advanced search -> active is not set.

形象
丢弃