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

selected value directly

By
B.hind
on 7/29/16, 10:39 AM 216 views

hi ,


i have to "selected fields " in the table account.invoice i want that when i select one the other value display directly the second field depend to the first

what would i do ? 

I have two fields ' selected ' in the table 'account.invoice' 'district ' , "common" , I want when I select'common' the other one is displayed directly without the select


Maybe you want to enhance your chance to get an answer by using meaningful question titles, use some more words to make yourself understandable and maybe to post some code.

Ermin Trevisan
on 7/29/16, 10:43 AM
0
yousif Mobark
On 7/30/16, 2:50 AM

you can use onchange decorator .

its make you able to make a change to your GUI.

@api.onchange('field1') # if these fields are changed, call method
def check_change(self):
    if self.field1 == somevalue:
        self.field2=yourValue

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: 7/29/16, 10:39 AM
Seen: 216 times
Last updated: 7/30/16, 2:50 AM