fields set as readonly can receive focus in openerp6.1--web

Bug #941984 reported by William Beltrán
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP's Framework R&D

Bug Description

Fields set as readonly in form views can receive focus, I think if the field is readonly is not necesary to let it get focus, it is usefull in the moment to fill form and reduce time for users because you have not to pass throw fields that are inactive.

I am using openerp6.1 we client+firefox+ubuntu11.10.

Regards

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
William Beltrán (wigebeno) wrote :

I fix this bug, i edit the file:

/addons/web/static/src/js/view_form.js

in line 1467 i add this:

var disabled = (this.readonly || this.force_disabled || !this.view.is_interactible_record());
this.$element.find('input').prop('disabled', disabled);

just before:

this.$element.find('input').prop('readonly', this.readonly);

It will be important to include this in trunk i think what do you think??

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello William,

You can purpose a merge proposal for this, So If you want to contribute then please create a branch and put a merge proposal for this. Our core team will review it.

Thanks you!

Revision history for this message
William Beltrán (wigebeno) wrote : Re: [Bug 941984] Re: fields set as readonly can receive focus in openerp6.1--web

sure, I want to contribute, how can i do that?? How can create a mereg
proporsal or where can find information about this?

El 04/05/12 06:10, Amit Parik (OpenERP) escribió:
> Hello William,
>
> You can purpose a merge proposal for this, So If you want to contribute
> then please create a branch and put a merge proposal for this. Our core
> team will review it.
>
> Thanks you!
>

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Hello William, you can create a branch stacked over openerp-web project:

bzr branch lp:openerp-web this will create a branch (here make your changes) check how to commit e.g. to fix "[FIX] mi comment related" also check this[1] to link the related bug.

You can push the branch directly to Launchpad with the command:

bzr push lp:~wigebeno/openerp-web/openerp-web

So in your branch you get an opt to make the proposal and select the trunk.

Thanks for your fix.

Regards,

Revision history for this message
William Beltrán (wigebeno) wrote :

Hello, I check the code and i think works better whit this code:
var disabled = (this.readonly);
this.$element.find('input').prop('disabled', disabled);

instead:

var disabled = (this.readonly || this.force_disabled || !this.view.is_interactible_record());
this.$element.find('input').prop('disabled', disabled);

I also check the way of make a merge proporsal but in trunk i didnt find the function that I fix in 6.1 so i imagine that this part is not considered yet in trunk so I can't make a merge prporsal but works fine for 6.1.1.

Regards.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.