Hello everyone,
I created a simple project model, and linked it to res.partner model
I have added a page to res.partner, and listed the partner's projects there.
When the user click on add a new line in the tree, a new form will open, I want the partner_id field in the form to have by default the id of the partner the form opened from
I inherited the partner view and added the following but partner_id field doesn't get a default value:
<page name="internal_notes" position="before">
<page name="projects" string="Projects">
<field name="customer_project_ids" context="{'default_partner_id' : active_id, 'default_name' : active_id}">
<tree>
<field name="name"/>
<field name="subject"/>
</tree>
</field>
</page>
</page>
This is the project form view
<form>
<sheet>
<group>
<field name="name"/>
<field name="subject"/>
<field name="partner_id"/>
</group>
</sheet>
</form>
* setting a default value for others fields works fine, it doesn't work only for partner_id!!
* I even tried to give partner_id field a default value from py code, but it is also not working!
Thank you