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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký