Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
5017 Переглядів

I use Odoo v8 and would like to know if it's possible disable auto-filling the fields "Invoice Adress" and "Delivery Adress" too.

These address types are automatically set on invoice when partner is selected, but I would like to not set automatically them, so I will force the user to search these values. Is it possible?

Аватар
Відмінити
Автор Найкраща відповідь

For documentation about my question, here is the solution:

Go through these steps:

  1. Locate Menu User Interface/Views [Setting->Technical->User Interface->Views]

  2. Search sale.order.form

  3. Edit this template 

  4. On current lines 27 until 32 there is a tag <group>:

  5.                             <field name="partner_id" on_change="onchange_partner_id(partner_id, context)" domain="[('customer','=',True)]" context="{'search_default_customer':1, 'show_address': 1}" options="{&quot;always_reload&quot;: True}"/>

    <field name="partner_invoice_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'invoice'}"/>

    <field name="partner_shipping_id" on_change="onchange_delivery_id(company_id, partner_id, partner_shipping_id, fiscal_position)" groups="sale.group_delivery_invoice_address" context="{'default_type':'delivery'}"/>

  6. I removed the two parameters above (on_change="onchange_partner_id(partner_id, context)" and on_change="onchange_delivery_id(company_id, partner_id, partner_shipping_id, fiscal_position)") and everithing is ok!

Аватар
Відмінити
Найкраща відповідь

Yes it is possible, just override the onchange method "onchange_partner_id" , and unset the values for those 2 fields.

Аватар
Відмінити
Автор

Hi Mr. Deep, thank you for your reply. I'm begginer, the method onchange_parther_id can be modified direct on configurations from interface web or I have to do it directly on pyhton code? Could you give me details?

You have to do it in Python code

Related Posts Відповіді Переглядів Дія
3
лют. 25
2056
1
груд. 24
2148
2
бер. 24
2478
1
лют. 24
2461
2
бер. 24
2999