← Back to team overview

openerp-india team mailing list archive

[Bug 944080] Re: Default focus does not work in forms

 

** Project changed: openobject-addons => openerp-web

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/944080

Title:
  Default focus does not work in forms

Status in OpenERP Web:
  Confirmed

Bug description:
  1) Steps to reproduce the issue you have observed

  - as a user with administration rights, go to Settings -> Customization -> User Interface -> Views
  - select the sale.order.form view and modify it
  - give the default focus to a field in the sale order view by changing the last line of the following:
  ====
                        <notebook colspan="5">
                          <page string="Sales Order">
                              <field name="partner_id" options="{&quot;quick_create&quot;: false}" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" required="1"/>
  ====
  and adding  default_focus="1":
  ====
                              <field name="partner_id" options="{&quot;quick_create&quot;: false}" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" required="1" default_focus="1"/>
  ====
  - do the same for a field in the sale order line form by changing the last line of the following:
  ====
                                        <page string="Order Line">
                                          <group colspan="4" col="5">
                                              <field colspan="3" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}" name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, context)"/>
  ====
  and adding default-focus="1":
  ====
                                              <field colspan="3" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}" name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, context)" default_focus="1"/>
  ====
  - save the modifications
  - create a sale order (Sales -> Sales -> Sales order -> Create) and notice that the default focus is given to the customer field
  - create a sale order line and notice that there is no focus

  2) The result you observed
  No focus is given to the "product" field when creating a sale order line.

  3) The result you expected
  The initial focus should be given to that field, as specified in the XML description of the view.

  4) The platform your are using
  OpenERP Server: Linux
  OpenERP Webclient: Used under Windows

  5) The OpenERP version you are using
  OpenERP 6.1

  
  I did not try if this issue is the same for other forms, but I guess so.

  Thanks in advance !

To manage notifications about this bug go to:
https://bugs.launchpad.net/openerp-web/+bug/944080/+subscriptions


References