The bug was caused because of on_cahgne methods which are triggering on
the load of the record, so this is not actually a bug, the server is
just not responging fast and that's why it wasn't evaluating the attrs,
if i wait about 1:30 min or so attrs works well.

** Changed in: openobject-client-web
       Status: New => Invalid

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/894357

Title:
  Problems with attrs in web client 6.0.3

Status in OpenERP Web Client:
  Invalid

Bug description:
  I have some boolean fields in a view, there are about 20, but i only
  want a max of 6 fields checked to true, so i created an onchange
  method to count how many of them are checked and store the value in an
  invisible non storable field, so i use attrs and set readonly in false
  fields when the counter field is 6, this is an example of one of my
  fields:

  Code:
  <field name="f400" on_change="onchange_finalidad('400',f400, n_fin, 
finalidad)" attrs="{'readonly':[('n_fin','>=',6),('f400','=',0)]}" />

  
  The boolean fields are also nonstorable fields created with the fields_get 
mehotd.

  In gtk client is working as intended, but in web client, the attrs are
  totally ignored and also when i am not editing the record the boolean
  fields are 'active' and i can check and unchek them.

  
  I noticed that multiple conditions are ignored also in web client 

  While the next attr work in gtk client:

  Code:
  attrs="{'invisible':['|', ('fa','!=',True), ('fc','!=',True), '|', 
('fb','!=',True), ('fc','!=',True), '|', ('fa','!=',True), ('fd','!=',True), 
'|', ('fb','!=',True), ('fd','!=',True)]"

  
  In web client it only evaluates the 'fa','!=',True

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client-web/+bug/894357/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to