[Trunk] Attrs readonly condition works not properly

Bug #985005 reported by Denis Karataev
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Won't Fix
Low
OpenERP R&D Web Team

Bug Description

If we have a field with attrs="{'readonly': [('name', '=', False)]}" it works properly only when "name" field didn't be not False. In other case (when "name" already was not False), field which has "attrs" condition will no longer be readonly.

In this case "name" field is many2one field. I didn't test this bug with other field types.

Related branches

summary: - Attrs readonly condition works not properly
+ [6.1.1] Attrs readonly condition works not properly
Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote : Re: [6.1.1] Attrs readonly condition works not properly

Hello Denis Karataev,

I have checked your issue and It's working fine with my end. I have tried with Boolean field and it's working correctly(weather it is false or true). Would you please give the proper steps or test case what you did at your end. So we can easily Identified your problem.

Thanks.

Changed in openerp-web:
status: New → Incomplete
Revision history for this message
Denis Karataev (dskarataev) wrote :

Vishal, try please with many2one field, not with boolean. This problem is with widget "selection".

Sorry that I didn't explain it right away

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello Denis Karataev,

I have checked again and put attrs in "jornal_id" field which on "account.invoice" object and it's behavior seem to be as expected.

Your description is rather insufficient to completely understand what you're trying to do and the result you're seeing. Please provide a complete example, if possible with screenshot which problem problem you did face ?

Thanks and waiting for your reply.

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

Hello Denis,

First of all please ignore the vishal's both above comment (Sorry for the inconvenience ). Your information is sufficient for reproduce this issue.

I have checked your issue with latest trunk well as latest 6.1, But I have faced the problem in only trunk version as you specified.
In 6.1 all are working as expected.

I have checked the attrs for many2one as well as related field (with type many2one) and in both cases I have faced the problem on trunk.

You have specified that 6.1.1 but it's not released yet, So I think you are also talking about the trunk version.

I have prepare a video for both version and attached with this bug, So kindly check it.

Thank you very much.

Revision history for this message
Amit Parik (amit-parik) wrote :
Revision history for this message
Amit Parik (amit-parik) wrote :
summary: - [6.1.1] Attrs readonly condition works not properly
+ [Trunk] Attrs readonly condition works not properly
Changed in openerp-web:
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
importance: Undecided → Low
status: Incomplete → Confirmed
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

This type of same attrs we have used on hr_recruitment module's hr_applicant form view.

  <button name="action_print_survey" string="Interview" type="object" icon="gtk-print" attrs="{'readonly':[('survey','=',False)]}"/>

And it's not working properly as I saw on video.

Thanks!

Revision history for this message
Denis Karataev (dskarataev) wrote :

Hello! I reproduced this error in my own module. I attached video with it. It isn't standart module, but it maybe helps you.

Revision history for this message
Denis Karataev (dskarataev) wrote :

I also attached the video with how I use attrs=readonly. Hope this helps

Revision history for this message
Denis Karataev (dskarataev) wrote :

Videos above belong to 6.1.1 version, not trunk.

Revision history for this message
Paramjit Singh Sahota(OpenERP) (psa-openerp) wrote :

Hello,

        It is fixed in lp:~openerp-commiter/openerp-web/trunk-bug-985005-psa branch.

Thanks,
PSA (Paramjit Singh).

Changed in openerp-web:
status: Confirmed → Fix Committed
Revision history for this message
Nicolas Vanhoren (OpenERP) (niv-openerp) wrote :

Thanks a lot for reporting this bug and contributing to OpenERP. We have double-checked this issue and we can confirm that it does not affect the latest development version of OpenERP (trunk), but only a stable version.
The official OpenERP bug management policy states that bugs reported on stable branches follow a much stricter qualification process, to limit the risk of regressions on these production-grade versions.
These are exclusively handled by the OpenERP Entreprise Team, and should be reported via the OpenERP Enterprise (OPW) maintenance service.
You can find more details about all of this in the FAQ of our Bug Management Policy documentation:
   http://bit.ly/openerp-bugs-faq (FAQ #2)

Thank you for your contributions and for your understanding!

Changed in openerp-web:
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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