Odoo Help


This community 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.


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

Sebastien Alix
on 11/21/13, 6:44 AM 948 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?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 11/21/13, 6:44 AM
Seen: 948 times
Last updated: 3/16/15, 8:10 AM