Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I just add a
fields.function(_myfunc, .... , store=True) on one OpenERP V7 model. This instance allready has some value in database.
How can I force openERP to compute the value for this field ? New data are ok (set when write method is launch) but for existing one nothing ...!
If a change
store=False, my data are ok, but I need to add this field on search filters.
thanks for your help,
I recently came across this kind of problem (needed to update computed values) and I created a module to add 2 methods to the ORM (compute and compute_all).
You can find it here if you want, and if you ever get a chance to test if on Odoo 8+, let me know (I'm using OpenERP 7.0)
Hope this helps.
You could remove the column from database, for example, for field 'margin' at sale.order model you could execute next SQL with psql:
your_database=> alter table sale_order drop column if exists margin;
Then update the addon in Configuration > Local modules
If you look at Odoo log file you will see one line like:
openerp.models: Storing computed values of sale.order fields margin
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
|Asked: 4/5/13, 12:09 PM|
|Seen: 12516 times|
|Last updated: 6/2/15, 6:24 PM|