Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
7638 Zobrazení

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

  }

Avatar
Zrušit
Nejlepší odpověď

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.

Avatar
Zrušit