1
project.issue模型的timesheet_ids字段是one2Many至account.analytic.line。我正在爲project_issue.project_issue_form_view創建嚮導。表格有時間表頁面:Odoo v10「Field timeheet_ids does not exist」
<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>
您正確地抓住它。大多數時候,開發人員在繼承任何視圖時忽略這些屬性。 –