Odoo Help


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.


How to remove province code on invoice

David Vandervoort
on 5/30/13, 9:51 AM 1,904 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
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).

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)


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