Reputation: 3
I'm developping a new module and I have a small question. In the purchase orders, I added two fields : project_id and phase_id, who respectively associate the PO to a project and a project phase. The thing is, once the project is chosen, the phase field still displays all the phases existing in the database. Is there a way to display only the phases from the chosen project? Maybe with on_change ? But I'm new to OpenERP development and I have no clue how to use it...
Thank you in advance.
PS : By the way, I'm using the 6.1 version if it changes anything to my problem.
Upvotes: 0
Views: 315
Reputation: 5044
You can use domain condition in the xml for the field phase_id
<field name="project_id"/>
<field name="phase_id" domain="[('project_id','=',project_id)]"/>
this will solve your problem
Upvotes: 0