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.

5

why not value is added on onchange if field is readonly [Closed]

By
Sandeep
on 5/6/13, 5:51 AM 5,074 views

The Question has been closed for reason: duplicate question

by
Sudhir Arya (SA)
on 05/07/2013 04:19:26

Hi all there is a readonly field , but i need to add value into that field from onchange. unfortuanatly openerp have no clue

1

Vasiliy Birukov

--Vasiliy Birukov--
3446
| 6 6 8
Russian Federation
--Vasiliy Birukov--

Help develop and implement any project on base Odoo.

Vasiliy Birukov
On 5/7/13, 4:00 AM

Use functional field for this purpose.

this is just different not for this purpose

Sandeep
on 5/7/13, 4:08 AM

but it work as you want

Vasiliy Birukov
on 5/9/13, 5:41 AM

Functional field is working but in my case i want to shows output value before saving record so i used both function and on_change used for the particular field. But in the list value not shows the output value before saving the record. How to fix ?...

Prakash
on 8/16/13, 5:11 AM

If you use x2m field then please see similar ask.

Vasiliy Birukov
on 8/16/13, 9:23 AM
Prakash
on 8/17/13, 3:59 AM
1

Sudhir Arya (SA)

--Sudhir Arya (SA)--
10150
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

Sudhir Arya (SA)
On 5/7/13, 4:19 AM

This is a duplicate question.

See Readonly fields are not working in onchange for original question.

ok man,,,,,,,,,,,,,

Sandeep
on 5/7/13, 4:23 AM
0

patrick

--patrick--
1958
| 5 4 7
Baarn, Netherlands
--patrick--
patrick
On 5/7/13, 4:17 AM

Somehow when a field is set as readonly, you can add/change the value, but it will not be stored in the database, or used in a calculation.

According to this link, it was on purpose and the behaviour won't change.

So If you want to use or store the value of the readonly-field, you have to add another field to the view, and make that field invisible. You can use and store the data from the hidden field to do the calculation or just store it in the database.

""" Somehow when a field is set as readonly, you can add/change the value, but it will not be stored in the database, or used in a calculation. """ Totally wrong,, man

Sandeep
on 5/7/13, 4:25 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 5/6/13, 5:51 AM
Seen: 5074 times
Last updated: 3/16/15, 8:10 AM