odoo继承修改源码翻译

2019-04-24  本文已影响0人  伟大的洪立

在项目我们会遇到修改odoo翻译的问题

        <record id="view_account_move_filter" model="ir.ui.view">
            <field name="name">account.move.select</field>
            <field name="model">account.move</field>
            <field name="inherit_id" ref="account.view_account_move_filter"/>
            <field name="arch" type="xml">
                <xpath expr="//filter[@name='journal']" position="attributes">
                    <attribute name="string">凭证类型</attribute>
                     <!--<filter string="Journal" name="journal" domain="[]" context="{'group_by':'journal_id'}"/>-->
                </xpath>
            </field>
        </record>
  <!-- 凭证录入动作视图 -->
        <record id="account.action_move_journal_line" model="ir.actions.act_window">
            <field name="name">凭证录入</field>
            <field name="res_model">account.move</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,kanban,form</field>
            <field name="view_id" ref="view_move_tree_new"/>
            <field name="search_view_id" ref="account.view_account_move_filter"/>
            <field name="context">{'search_default_misc_filter':0, 'view_no_maturity': True,'manual_move':'1'}</field>
            <field name="help" type="html">
                <p class="oe_view_nocontent_create">
                    点击以进行凭证录入
                </p>
            </field>
        </record>

如果遇到英文状态下翻译被修改,我们可以先删除原有的action视图,然后重写。
删除标签如下:

<delete id='动作ID',model_id='动作模型id'/>
上一篇 下一篇

猜你喜欢

热点阅读