도움말

why not value is added on onchange if field is readonly

Closed

The question has been closed 이유 : duplicate post

작성자
Sudhir Arya (ERP Harbor Consulting Services)
작성일 2013년 05월 07일 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

Avatar
Discard
3 응답
1
Best Answer

Use functional field for this purpose.

5 의견
Avatar
Discard

this is just different not for this purpose

Avatar
Vasiliy Birukov
-

but it work as you want

Avatar
Prakash
-

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 ?...

Avatar
Vasiliy Birukov
-

If you use x2m field then please see similar ask.

Avatar
Prakash
-
1

This is a duplicate question.

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

2 의견
Avatar
Discard

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

Avatar
Prakash
-
0
Avatar
patrick
Best Answer

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.

1 코멘트
Avatar
Discard

""" 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