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 want to show a status feild on the user. i have a table for the payments the user made and have an invoice table. if there are pending payments then the account status need to be inactive and if no pending payment then the user is active. how this can be done?
Hi, you can use a functional field( a compute field in new api) for that. So in the function you can perform all the calculations based on the payments and return a status value, which will be displayed on the user profile.
_inherits = 'res.partner'
status = fields.Boolean(compute='_check_status', string="Status")
for rec in self:
if payment_done: // do your calculations based on payments
rec.status = False
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/6/15, 1:09 AM|
|Seen: 698 times|
|Last updated: 4/13/15, 6:57 AM|