Я могу помочь мне?Атрибут домена не работает на поле Ганта в OpenERP.Это мой код: файл .py:
class meeting_room_management(osv.osv):
_name = 'meeting.room.management'
_columns = {
'employee_id' : fields.char("code", size=4, readonly=True),
'start_time' : fields.datetime("Start", required=True),
'estimated_end_time' : fields.datetime("Estimated End Time"),
'state' : fields.selection([('draft','Requesting'),('approved','Approved'),('cancel','Cancel')], "Status", select=True, readonly=True),
'note' : fields.text("Note"),
}
файл XML:
<record id='gantt_meeting_room_manager' model='ir.ui.view'>
<field name="name">gantt.room.manager</field>
<field name="model">meeting.room.management</field>
<field name="type">gantt</field>
<field name="arch" type="xml">
<gantt color="employee_id" date_start="start_time" date_stop="estimated_end_time" string="Meeting Room Full" default_group_by="room_id" >
<level object="meeting.room.management" link="room_id" domain="[('state','=','approved')]">
<field name="employee_id"/>
<field name="state" />
</level>
</gantt>
</field>
</record>