La Page PT
La Page PT

Reputation: 621

How to replace with xpath rather than put after in odoo 8?

Look at this strange thing. My code here works well.

<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>

But if I replace by this code :

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

It DOESN'T replace the title. It does nothing... Do you understand this?

Upvotes: 2

Views: 4217

Answers (1)

Try following,

<xpath expr="//title" position="attributes">
    <attribute name="title">Odoo POS - AS</attribute>
</xpath>

Upvotes: 2

Related Questions