跳至内容
菜单
此问题已终结
1 回复
55937 查看

Hello, where can I find this css file that has this oe_container class or address_format? Is it in source code or it is located somewhere else? oe_container class I saw being used in description in index.html and address_format class being used in crm_lead_view.xml, but I couldn't find where these classes are located.

I tried to use command to look for files in source code containing such content:

find  -type f -name '*.css' | xargs grep 'address_format'

But it didn't find anything. So does anyone know where it is located and where for example in crm module is written for it to know where to look for this class?..

形象
丢弃
最佳答案

grep --include="*.css" -rl "address_format" * would be what i would try first but that didn't find anything so i tried.

grep -rl "address_format" * and found it in server/openerp/addons/base/res/res_partner.py

layouts = {
    '%(city)s %(state_code)s\n%(zip)s': """
        <div class="address_format">
            <field name="city" placeholder="City" style="width: 50%%"/>
            <field name="state_id" class="oe_no_button" placeholder="State" style="width: 47%%" options='{"no_open": true}'/>
            <br/>
            <field name="zip" placeholder="ZIP"/>
        </div>
    """,
    '%(zip)s %(city)s': """
        <div class="address_format">
            <field name="zip" placeholder="ZIP" style="width: 40%%"/>
            <field name="city" placeholder="City" style="width: 57%%"/>
            <br/>
            <field name="state_id" class="oe_no_button" placeholder="State" options='{"no_open": true}'/>
        </div>
    """,
    '%(city)s\n%(state_name)s\n%(zip)s': """
        <div class="address_format">
            <field name="city" placeholder="City"/>
            <field name="state_id" class="oe_no_button" placeholder="State" options='{"no_open": true}'/>
            <field name="zip" placeholder="ZIP"/>
        </div>
    """
}
形象
丢弃
编写者

Thanks for that.

相关帖文 回复 查看 活动
1
6月 25
3029
0
12月 23
1527
1
10月 22
2996
0
12月 17
3606
1
8月 16
4219