Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Location for css files that have some specific classes

By
Tomas Parnarauskas
on 9/11/13, 9:24 AM 1,473 views

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

2

AJ Schrafel Paper Corp

--AJ Schrafel Paper Corp--
2050
| 4 5 8
Bronx, United States
--AJ Schrafel Paper Corp--

Exploring OpenERP for business

AJ Schrafel Paper Corp
On 9/11/13, 11:18 AM

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.

NOD Baltic, UAB, Tomas Parnarauskas
on 9/12/13, 5:11 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 9/11/13, 9:24 AM
Seen: 1473 times
Last updated: 3/16/15, 8:10 AM