属性域在OpenERP中的字段甘特图视图上不起作用

时间:2018-09-21 07:57:40

标签: python odoo openerp-7

我可以帮我吗?属性域不适用于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>

0 个答案:

没有答案