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 have a Patient view, in which I can create an evaluation for that patient, when i create a new item (evaluation) I want the Patient field to be filled automatically using context.
I don't find how to use context in order to fill that field when filling up the evaluation from the Patient view and not externally.
Here is a part of the code of the evaluation class :
# many other attributes
'patient_id' : lambda self, cr, uid, context : context['patient_id'] if context and 'patient_id' in context else None
And this is a part of the evaluation view :
<field name="patient_id" />
<!-- many other fields -->
What to add and how to do in order to fill automatically the patient_id field in the child (pop up) evaluation.
Thanks in advance.
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: 8/8/14, 11:57 AM|
|Seen: 1386 times|
|Last updated: 3/16/15, 8:10 AM|