콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
5009 화면

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

관련 게시물 답글 화면 활동
3
2월 25
2051
1
12월 24
2146
2
3월 24
2471
1
2월 24
2458
2
3월 24
2998