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.

0

Why data of computed field is not storing in database ?

By
nikesh
on 6/6/16, 1:05 AM 382 views

Hello,

Data of computed field is not storing in database . Is there any particular reason for making computed field so ?

What is the benefit of not storing value of computed field in database ? Can anyone explain it in detail ? Please give a complete explanation. 


Thanks & Regards

0

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


Ahmed M.Elmubarak
On 6/6/16, 3:08 AM

Hello

 [ By default, a computed field is not stored to the database, and is

computed on-the-fly. Adding the attribute ``store=True`` will store the

field's values in the database. The advantage of a stored field is that

searching on that field is done by the database itself. The disadvantage

is that it requires database updates when the field must be recomputed. ]

0

Baiju

--Baiju--
3154
| 5 4 8
Kochi, India
--Baiju--
ODOO technical and functional

        I like learning new thing, especially technical thing. I am a quick learner, I can learn technical things very fast. I have good logical skill,  I have immense interest in programming.

e-mail id : baijuks@hotmail.com

Baiju
On 6/6/16, 2:57 AM

Hi Nikesh,

We use computed fields, if the value of field is computed using some logic and depends on other fields. For example: Total in Sale order is computed from sum of line subtotal

Computed field compute its value every time we access its value instead of reading from database.

By default, a computed field is not stored to the database, and is computed on-the-fly. Adding the attribute store=True will store the field's values in the database. The advantage of a stored field is that searching on that field is done by the database itself. The disadvantage is that it requires database updates when the field must be recomputed.

For more please check Link


Hope this helps.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

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

Question tools

1 follower(s)

Stats

Asked: 6/6/16, 1:05 AM
Seen: 382 times
Last updated: 6/6/16, 4:49 AM