please I'm looking for a simple example of fields.function
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Účetnictví
- Sklad
- PoS
- Project
- MRP
This question has been flagged
def _current_total(self, cr, uid, ids, name, context=None, *args): res = {} for task in self.browse(cr, uid, ids,context): res[task.id] = {'amount': 0.0, 'completion' : 0.0, 'actual_amount' : 0.0,} task.actual_amount = task.completion * task.amount_vatin / 100 res[task.id] = {'actual_amount': task.actual_amount} return res
you can refer at: https://doc.openerp.com/v6.0/developer/2_5_Objects_Fields_Methods/field_type.html/#functional-fields
Thank you :)
Your Welcome :D
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Přihlásit se