Odoo Help

0

When readonly=True :======= the data doesn't appear in the screen after save

By
Karan Gupta
on 10/26/16, 3:52 AM 277 views

Why I cant able to store the particular value in the grid table after making that field as readonly

Since I gave that field as store=True

Thanks,,, ayman mohammed adam

Karan Gupta
on 10/26/16, 6:56 AM
1

deep

--deep--
1695
| 5 5 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 10/27/16, 2:05 AM

You want the field to be Readonly, but trying to add value through Onchange or so, then you need to under-go hassle of updating for the same again in the Create/Write ORM methods.

Instead the feasible alternate solution would be you to use Compute/functional fields.

Api decorator lets you add depends(dependency) field, which acts as both onchange and computational method, that way you don't have to worry about manually re-updating the same in ORM methods.


Note:

If a field is marked as Readonly, odoo will explicitly omit retrieving data for the same from UI, hence in such case its best to use computational/related fields.


0
Karan Gupta
On 10/26/16, 6:55 AM

 

0
ayman mohammed adam
On 10/26/16, 6:37 AM

dear Karan Gupta

you need to override create and write method and assign the value again by calling your onchange function and then update the vals.

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 10/26/16, 3:52 AM
Seen: 277 times
Last updated: 10/27/16, 2:05 AM