Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
997 views
in Technique[技术] by (71.8m points)

python - ReadOnly field saved with NULL value

On CRM opportunity form view, i added readonly="1" for probability field. When i saved, whatever the value of my probability, it's stored with NULL value. Is it a bug on OpenERP ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

We have two values like client side and server side. In Server side coding done like float value have 0.0 etc. Read only field doesn't take value from the Client side because it's read only. In View, we see that 0.0 for float value because of server side coding. If you remove read only attribute, you can get value from the Client side and that value pass to the Server and store into the Database. Field with read only attribute, can't get value from the client side and store NULL into the Database.

Hope this will help you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...