Search code examples
odooodoo-9

Extend css file point of sale odoo 9


I want add new class referenc-tag to point of sale

In mycss.css I have:

.referenc-tag {
    color: #FFF;
    background: #000;
    margin-bottom:10px;
}

In xml

<template id="assets" inherit_id="point_of_sale.assets">
    <xpath expr="." position="inside">
         <link rel="stylesheet" href="/pos_odoo/static/src/css/mycss.css"/>
    </xpath>
</template>

After add class to element and install module my element can't get style.


Solution

  • Your example is correct, try clear cache and add to openerp.py xml

    <template id="assets" name="pos_odoo assets" inherit_id="point_of_sale.assets">
            <xpath expr="." position="inside">
                <link rel="stylesheet" href="/pos_odoo/static/src/css/mycss.css" />
            </xpath>
    </template>
    

    to openerp.py

    'data':[ 'your xml' ],