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

How can i change the text of a field by button click?

By
herbert6453
on 10/20/14, 10:27 AM 718 views

I want change the company name field back to a default value if the user press my added button in edit mode of the form.

Changes should only writen to database if the orginal save button on the form pressed.

If i change the value via self.name = "default"  there is no update in the browser.

I dont't want use self.write.

Thanks

 

0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 10/21/14, 3:33 AM

What Odoo version are you using? That would make a difference in the code used.

However, I think your best bet is to look at on_change methods and how they work. I don't know if a button is going to help you out here. Especially since that usually checks for a write method for its changes and you have already mentioned you do not want to use that method.

Thanks, but the syntax of the return value for on_change methods like don't work in openerp 7 for buttons, as temporary solution i used a boolean field instead of a button

herbert6453
on 10/21/14, 7:29 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: 10/20/14, 10:27 AM
Seen: 718 times
Last updated: 3/16/15, 8:10 AM