跳至內容
選單
此問題已被標幟
4 回覆
6407 瀏覽次數

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?

頭像
捨棄
最佳答案

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>
        </xpath>
    </field>
</record>

It's working on the V7.

頭像
捨棄

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

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

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

最佳答案

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

頭像
捨棄
最佳答案

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

頭像
捨棄
最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
6月 24
2194
1
11月 22
18784
4
8月 22
8030
1
2月 23
3442
3
12月 22
3409