Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
7618 Lượt xem

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),

  }

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ