Odoo v10“字段timesheet_ids不存在”

时间:2017-07-21 07:44:12

标签: python xml openerp field project

project.issue模型有timesheet_ids字段,它是one2Many到account.analytic.line。我正在为project_issue.project_issue_form_view创建向导。表格有时间表页面:

<page string="Timesheets" attrs="{'invisible': [('project_id', '=', False)]}" modifiers="{'invisible': [['project_id', '=', false]]}">
            <field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : uid, 'default_project_id': project_id}" modifiers="{}"/>
        </page>

它是通过扩展视图创建的。当我尝试向向导添加字段时,我得到'字段timesheet_ids不存在。有人能指出我这里可能出现什么问题吗?

<record id="project_issue_wizard" model="ir.ui.view">
        <field name="name">project.task.wizard.name</field>
        <field name="model">project.issue</field>
        <field name="arch" type="xml">
            <form string="Project Issue Wizard">
                <group>
                    <field name="timesheet_ids"/>
                </group>
                <footer>
                    <button name="create_request"
                        string="Finished" type="object"
                        class="btn-primary"/>
                    <button string="Cancel"
                        class="btn-default"
                        special="cancel" />
                </footer>
            </form>
        </field>
    </record>

1 个答案:

答案 0 :(得分:2)

显然,我的视图优先,然后先加载创建timesheet_ids字段的视图。我只需要设置优先级字段......