【发布时间】:2015-05-15 06:19:39
【问题描述】:
在我的模块中,我想通过单击按钮查看表单。
这是我的按钮与其他工作流程按钮“推迟”
<header>
<button string="Planned" type="workflow" name="action_planned" class="" icon="gtk-undo" states="postponed"/>
<button string="Complete" type="workflow" name="action_complete" class="" icon="gtk-apply" states="planned, postponed"/>
<button string="Postponed" type="action" name="%(timetable_postponed)d" class="" icon="gtk-jump-to"/>
<button string="Cancel" type="workflow" name="action_cancel" class="" icon="gtk-cancel" states="planned, postponed"/>
<field name="state" widget="statusbar" readonly="True" statusbar_visible="planned, completed, postponed, cancelled"/>
</header>
这是我的表单视图和操作
<record id="timetable_postponed_view" model="ir.ui.view">
<field name="name">op.timetable.postponed</field>
<field name="model">op.timetable</field>
<field name="arch" type="xml">
<form string="Time Table Postponed" version="7.0">
<field name="classroom_id" />
<field name="period_id" />
<field name="date" />
</form>
</field>
</record>
<act_window id="timetable_postponed"
name="Postponed Timetable"
res_model="op.timetable"
view_mode="form"
view_id="timetable_postponed_view"
target="new"
/>
更新时出现此错误
raise ValueError('External ID not found in the system: %s' % (xmlid))
ParseError: "External ID not found in the system: myschool.timetable_postponed" while parsing file:///E:/Development/MySchool-Src/OSBT_0374/myschool/op_timetable/op_timetable_view.xml:111, near
<record id="view_op_timetable_form" model="ir.ui.view">
<field name="name">op.timetable.form</field>
<field name="model">op.timetable</field>
<field name="priority" eval="8"/>
<field name="sequence" eval="4"/>
<field name="arch" type="xml">
<form string="Time Table" version="7.0">
<header>
<button string="Planned" type="workflow" name="action_planned" class="" icon="gtk-undo" states="postponed"/>
<button string="Complete" type="workflow" name="action_complete" class="" icon="gtk-apply" states="planned, postponed"/>
<button string="Postponed" type="action" name="%(timetable_postponed)d" class="" icon="gtk-jump-to"/>
<button string="Cancel" type="workflow" name="action_cancel" class="" icon="gtk-cancel" states="planned, postponed"/>
<field name="state" widget="statusbar" readonly="True" statusbar_visible="planned, completed, postponed, cancelled"/>
</header>
<sheet>
<separator colspan="4" string="Time Table"/>
<group colspan="4" col="4">
<field name="lecturer_id"/>
<field name="standard_id"/>
<field name="period_id"/>
<field name="subject_id"/>
<field name="classroom_id"/>
<field name="start_datetime"/>
<field name="end_datetime"/>
<field name="type"/>
</group>
</sheet>
</form>
</field>
</record>
我应该怎么做才能在我的按钮单击事件中检索这个新窗口...?
【问题讨论】:
-
下面的答案对您有帮助,请提供反馈。
标签: python python-2.7 openerp openerp-8 odoo-8