如何在openerp 7中将javascript嵌入到act_window模型中

时间:2015-03-19 06:58:40

标签: javascript openerp

我有这样的动作配置:

<record id="view_rnd_compare_version_form" model="ir.ui.view">
    <field name="name">rnd.compare.version.form</field>
    <field name="model">pti.rnd.batch.record.version.compare</field>
    <field name="arch" type="xml">
        <form string="Compare Version" version="7.0">
            <group colspan="4" col="4">
                <field name="br_id"/>
                <field name="old_formula"/>
                <field name="old_version"/>
                <field name="new_formula"/>
                <field name="new_version"/>
            </group>
            <button name="compare" string="Compare"/>
        </form>
    </field>
</record>

<record model="ir.actions.act_window" id="action_rnd_compare1">
    <field name="name">Compare Version</field>
    <field name="res_model">pti.rnd.batch.record.version.compare</field>
    <field name="view_type">form</field>
    <field name="view_mode">form</field>
    <field name="view_id" ref="view_rnd_compare_version_form"/>
    <field name="target">new</field>
    <field name="nodestroy">True</field>
</record>

我的问题是如何将javascript嵌入到act_window中,因此我可以对任何字段执行任何操作并从openerp请求任何数据?谢谢。

0 个答案:

没有答案