Odoo Help


How to remove province code on invoice

David Vandervoort
on 5/30/13, 9:51 AM 2,510 views

When adding a Belgian province to the address of a contact, on the invoice it will be shown as a code between the city and the zip code. This looks a bit strange and confusing to the customer, how can I prevent this code from being displayed?

On 8/1/13, 7:46 AM

It's a little bit late, but it can be helpful for another person.

You can hide this field with an inherit on the XML view like that :

<record id="view_partner_form_inherit" model="ir.ui.view">
    <field name="name">res.partner.form.inherit</field>
    <field name="model">res.partner</field>
    <field name="inherit_id" ref="base.view_partner_form"/>
    <field eval="1" name="priority"/>
    <field name="arch" type="xml">
        <xpath expr="//field[@name='state_id']" position="attributes">
            <attribute name="invisible">True</attribute>

It's working on the V7.

Simply <field name="province_code" invisible="1"/> ...

on 8/1/13, 8:06 AM

Do you mean with a position="replace" or in the base code directly ?

on 8/1/13, 8:16 AM

Directly in base code is not recommended one, inherit that form and do it...

on 8/1/13, 8:20 AM
André Schenkels
On 2/21/14, 2:44 AM

The address format can be changed in the Country settings. Just change the format here.

wilson zauma
On 2/20/14, 2:21 PM

Thanks this solutions was the best because hide the field but dotn generate problem, but when you put replace the field the openerp genere the problem

Andreas Marpmann
On 8/2/13, 4:06 PM

Update your code, it works well at newer versions (Runbot).

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 5/30/13, 9:51 AM
Seen: 2510 times
Last updated: 3/16/15, 8:10 AM