Hello! I am new to odoo.. here is the situation.. i have a menu that will list all the doctors.. but what i want is that.. when clicking the menu.. it will redirect to the specific doctor not the list of doctors.. do you have any idea to achieve this?
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
This question has been flagged
Hi,
Either you can give domain for the action of the menu item or you can call the python function on clicking menu item and then return the necessary view with filtered records from there.
See the sample of how the domain is given for a menu item,
<record id="rating_rating_action_task" model="ir.actions.act_window">
<field name="name">Customer Ratings</field>
<field name="res_model">rating.rating</field>
<field name="view_mode">kanban,tree,pivot,graph,form</field>
<field name="domain">[('res_model', '=', 'project.task'), ('res_id', '=', active_id), ('consumed', '=', True)]</field>
<field name="search_view_id" ref="rating_rating_view_search_project"/>
<field name="help" type="html">
<p class="o_view_nocontent_empty_folder">
No customer ratings yet
</p><p>
Customer ratings on tasks. If you have no rating, change your project Settings to activate it.
</p>
</field>
</record>
For calling python function from menu item and to return filtered records see this video : How To Call Python Function From Menu Item in Odoo
Thanks
A doctor's record needs to be selected by the user before it is displayed. In your scenario, how will the system know which doctor's record to display?
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up