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

What is happening with <div class="addres_format">

By
Jairo Llopis
on 12/4/14, 7:17 AM 1,054 views

On an Odoo server, fully updated, in language es_ES, the Leads view renders this inside the address_format part:

<div class="address_format">
  <span title="" data-original-title="" class="oe_form_field oe_form_field_char" style="width: 40%%">
    <input maxlength="24" placeholder="ZIP" type="text">
  </span>
  <span title="" data-original-title="" class="oe_form_field oe_form_field_char" style="width: 57%%">
    <input placeholder="City" type="text">
  </span>
  <br>
  <span title="" data-original-title="" class="oe_form_field oe_form_field_many2one oe_form_field_with_button oe_no_button">
    <div>
      <input autocomplete="off" class="ui-autocomplete-input" placeholder="State" type="text">
      <span class="ui-helper-hidden-accessible" aria-live="polite" role="status"></span>
      <span class="oe_m2o_drop_down_button">
        <img draggable="false" src="https://example.com/web/static/src/img/down-arrow.png">
      </span>
    </div>
  </span>
</div>

That's wrong because:

  1. It's in English (see placeholders?) and should be in Spanish.
  2. Percentage width values have two symbols like %%.
  3. It's not what the form view says!
  4. Any changes I make in the view inside the <div class="addres_format"> tag don't render at all.

But another empty server, with no data but with the same modules installed, renders this:

<div class="address_format">
  <span title="" data-original-title="" class="oe_form_field oe_form_field_char  oe_form_important" style="width: 40%">
    <input placeholder="Ciudad" type="text">
  </span>
  <span title="" data-original-title="" class="oe_form_field oe_form_field_many2one oe_form_field_with_button" style="width: 24%">
    <div>
      <input autocomplete="off" class="ui-autocomplete-input" placeholder="Estado" type="text">
      <span class="ui-helper-hidden-accessible" aria-live="polite" role="status"></span>
      <span class="oe_m2o_drop_down_button">
        <img draggable="false" src="http://localhost:8069/web/static/src/img/down-arrow.png">
      </span>
    </div>
  </span>
  <span title="" data-original-title="" class="oe_form_field oe_form_field_char" style="width: 34%">
    <input maxlength="24" placeholder="C.P." type="text">
  </span>
</div>

This time it's fine, all errors are fixed, but I cannot make the server 1 behave as the server 2 unles I remove the class from the div. What is happening there?

0
Jairo Llopis
On 12/5/14, 4:51 AM

Looking at the code, seems like those divs get replaced depending on the user's company's country, and seems to have a bug.

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

1 follower(s)

Stats

Asked: 12/4/14, 7:17 AM
Seen: 1054 times
Last updated: 3/16/15, 8:10 AM