Odoo Help

1

How is some fields are automatically disabled when saving the record in odoo10?

By
acha aslam
on 5/29/17, 12:06 AM 545 views

I have a module with some fields are readonly.I use onchange function in  this module.The onchange is based on partner_id.
I selected partner_id and some fields are automatically loaded in my form.

phone,email,mobile fields are readonly in my module.When i save the module these fields are automatically disabled. 
I changed these fields readonly =False then it is working properly.The fields do not disabled.
Question

What  are the phenomena behind this concept?

2

Anil R. Kesariya (Jupical Technologies)

--Anil R. Kesariya (Jupical Technologies)--
6117
| 7 6 8
Rajkot, India
--Anil R. Kesariya (Jupical Technologies)--

Odoo Techno Functional Expert

* Engaged with odoo since May - 2012.

* Customise existing module or develop new module base on customer requirement.

* Played key developer role in many past and running projects.

* Expert in requirement gathering of business and transforming requirement into odoo platform.

* Major expertise in core modules, database, report development and theme development.

* Integration expert.


Linkedin  : https://in.linkedin.com/in/anil-kesariya-97b20a66


Anil R. Kesariya (Jupical Technologies)
On 5/29/17, 1:33 AM

Hi  Aslam,

The word "Read-only" itself said this cannot be write simply. it is only Readable.

The values of read-only fields  will be display when if there is onchange() method written for thosefields, but values of those fields will not be saved because the field is only in Read mode (Read only).

If you want to write the data inside the Readonly field. you need to override the write() and create() method of ORM.

Hope this will clear your idea about read-only  fields.

Happy Odooing.

Regards,

Anil.

Thanks, Anil, I understand the concept behind readonly

acha aslam
on 5/29/17, 1:55 AM

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

2 follower(s)

Stats

Asked: 5/29/17, 12:06 AM
Seen: 545 times
Last updated: 9/14/17, 2:53 AM