Odoo Help


How to submit a form by pressing the return key in a field?

Sebastien Alix
on 11/21/13, 6:44 AM 1,486 views


We are running the version 7 of OpenERP (nightly 2013-11-21), and we can not found a way to submit a wizard form by scanning a barcode (it seems that the 'default_focus' attribute on a button does not work), as the old wizard.interface behaviour.

The wizard form:

    <record id="view_wizard_stock_barcode_scanner_form" model="ir.ui.view">
        <field name="name">wizard.stock.barcode.scanner.form</field>
        <field name="model">wizard.stock.barcode.scanner</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Barcode scanner" version="7.0">
                <group string="">
                    <field name="barcode"/>
                    <button name="validate" type="object" default_focus="1"
                        string="Validate" class="oe_highlight"/>
                    <button special="cancel" string="Close" default_focus="0"/>

Is there a way or a workaround to accomplish this kind of task?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 11/21/13, 6:44 AM
Seen: 1486 times
Last updated: 5/4/17, 1:59 PM