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

Odoo v8 - Sales Order - How to disable auto-fill for Invoice Address and Delivery Address

By
John Doe
on 6/27/16, 4:57 PM 176 views

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?

0
John Doe
On 6/28/16, 9:26 AM

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!

0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 6/28/16, 1:10 AM

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?

John Doe
on 6/28/16, 9:07 AM

You have to do it in Python code

deep
on 6/29/16, 4:30 AM

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: 6/27/16, 4:57 PM
Seen: 176 times
Last updated: 6/28/16, 9:26 AM