跳至內容
選單
此問題已被標幟
1 回覆
7639 瀏覽次數

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.

頭像
捨棄