2

看看这个奇怪的东西。我的代码在这里运行良好。

<openerp>
    <data>

        <template id="index" inherit_id='point_of_sale.index' name="Restaurant Index">&lt;!DOCTYPE html&gt;
            <xpath expr="//title" position="after">
                <title>Odoo POS - AS</title>
            </xpath>
            <xpath expr="//link[@id='pos-stylesheet']" position="after">
                <link rel="stylesheet" href="/pos_lapagept/static/src/css/pos_as.css" />
            </xpath>
        </template>


    </data>
</openerp>

但是如果我用这段代码替换:

                <xpath expr="//title" position="replace">
                    <title>Odoo POS - AS</title>
                </xpath>

它不会取代标题。它什么都不做……你明白吗?

4

1 回答 1

2

尝试跟随,

<xpath expr="//title" position="attributes">
    <attribute name="title">Odoo POS - AS</attribute>
</xpath>
于 2015-04-04T13:19:01.957 回答