Key Shortcut for Searching Further in Odoo

In the dynamic realm of business management, time is of the essence. Maximizing productivity and seamlessly navigating your Odoo ERP system can be achieved by harnessing the efficiency of shortcut keys. This article explores a shortcut key dedicated to the search more feature in Odoo, enabling you to optimize time and enhance operational efficiency.

Odoo provides shortcut keys to enhance user productivity and foster a user-friendly interface. If you aim to reduce reliance on mouse interactions while performing tasks in Odoo, convenient shortcut keys are readily available. These shortcuts enable you to efficiently perform a range of operations such as creating, editing, discarding, and more, promoting swift and effective task execution.

Odoo Shortcut Keys: Unlocking Productivity

Odoo underscores the significance of user-friendly functionality, exemplified by its comprehensive collection of shortcut keys. These shortcuts not only enhance user productivity but also cater to individuals who prefer minimizing mouse interactions while performing tasks in Odoo, ensuring a seamless experience.

​Include a button to access additional search options.

Incorporate a "Search More" button within the designated model and assign a shortcut key to it using the data hot-key attribute.


Now, let's establish the "Search More" button in the sales order model and assign the shortcut key "W" to it.

<record id="sale_order_views_inherited" model="ir.ui.view">

<field name="name">sale.order.form.inherit</field>

<field name="model">sale.order</field>

<field name="inherit_id" ref="sale.view_order_form"/>

<field name="arch" type="xml">

<xpath expr="//button[@name='action_confirm']" position="after">

<button name="action_search_more" type="object" id="action_search_more" data-hotkey="W" string="Search More" class="btn-primary"/>

</xpath>

</field>

</record>

​In the backend view, you'll find the shortcut for "Search More" in the specified model.


When pressing ALT+W on the keyboard, it triggers the search more button function (action_search_more) in the sale order.
 

def action_search_more(self):

action = self.env.ref('product.product_template_action_all') return{

'name': 'Product',

'res_model': 'product.template', 'type': 'ir.actions.act_window', 'view_mode': 'tree',

'view_type': 'tree',

'views': [(self.env.ref('product.product_template_tree_view').id, 'list')], 'target': 'new',

}

 

After invoking the function in the backend, the interface will appear as follows.


We hope you found the blog informative! If you have any feedback, please feel free to share it in the comments section below.

Creating a Field Widget in Odoo