跳至內容
選單
此問題已被標幟
3263 瀏覽次數

i hava a model like this hav 1 fileld

class customer_number(models.Model):
    _inherit = "res.partner"

    customer_number= fields.Char(string='Custom Number')

how to get that data each user login website and put to xml file

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <template id="custom_number" inherit_id="web._assets_primary_variables" name="Website Login Layout" priority="20">
            <xpath expr="//link[last()]" poision="after">
                <t t-if="customer_number==0">
                    <link rel="stylesheet" type="text/scss" href="/customer_number/statis/css/custom_variables_bla.scss"/>
                </t>
                <t t-if="customer_number==1">
                    <link rel="stylesheet" type="text/scss" href="/customer_number/statis/css/custom_variables_blu.scss"/>
                </t>
            </xpath>
        </template>
    </data>
</odoo>
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
12月 23
11999
3
7月 22
22204
2
6月 21
17938
0
5月 16
3664
1
8月 15
9086