Hi! I would like to have a link in the menu where the user can click on it and enter directly in his form. Now, when the user click on the menu link, he's thrown to a new form, not his form. I want to do this because there is only one record available by user.
Is it possible to specify the id of the form or is tree view is mandatory ?
tank you
There is my code:
<record id="view_parcours_fiche_form" model="ir.ui.view">
<field name="name">Ma fiche</field>
<field name="model">persons</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Persons" version="7.0">
<sheet>
<div>
<h1>
<field edit="false" default_focus="1" name="firstname"
placeholder="Prénom" style="width: 40%%"/>
<field name="lastname"
placeholder="Nom de famille" style="width: 40%%"/>
</h1>
</div>
<group>
<field name="phone1"
placeholder="1-888-123-8888" style="width: 50%%"/>
<field name="phone2"
placeholder="1-888-123-8888" style="width: 50%%"/>
<field name="email" style="width: 50%%"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="action_parcours_fiche_seq" model="ir.actions.act_window">
<field name="name">Ma fiche</field>
<field name="res_model">persons</field>
<field name="view_mode">form</field>
<field name="view_type">form</field>
<field name="domain">[('user_id','=',uid)]</field>
</record>
<record id="action_parcours_fiche_form" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_parcours_fiche_form"/>
<field name="act_window_id" ref="action_parcours_fiche_seq"/>
</record>
<menuitem
action="action_parcours_fiche_seq" id="menu_students"
name="Ma fiche" parent="section_main_menu" sequence="2"
groups="group_parcours2_etudiants"
/>
Do you have the field 'user_id' in model 'persons' set to the right user?
Seems like the window action domain is filtering all existing records.
Yes, when i'm adding tree view, user can see only one record, if he click on it he can see his record. If I remove the domain, the result is the same..