Reputation: 1
I am converting OpenERP code from version 7 to version 8 and I have come across a weird structure. In version 7 we can use fields, function and one of the attributes is store. The store function allows current field to be updated when fields of other objects are changed.
In the new API, the store function only accepts 'True' or 'False'. I was wondering if I have inherit other models and modify their fields so they perform a value update of model in question using "onchange"
Upvotes: 0
Views: 176
Reputation: 6295
In v8 their is no fields.function
field and with that we also do not need store with fields pararms, but you can achieve same thing very easily by using [@depends][1]
decorator , which does same thing as store with field does.
```
@openerp.api.depends(*args)
Return a decorator that specifies the field dependencies of a "compute" method (for new-style function fields).
```
so you can say that you field to be calculated on change of some field change.
Upvotes: 0
Reputation:
Nope, in Odoo 8 store function is working fine. you can search add-ons and find some interesting examples, Understand from it.
Some example I found in online [http://www.odoo.yenthevg.com/saving-and-resizing-images-in-odoo-8/] go through it.
Upvotes: 1