Public bug reported:

Hi!

I would like to change the attributes of some fields depending on
whether a many2one field, let us call it "parent_id" for the sake of the
example, is filled with a value or not.

I used to write something like this:

attrs="{'required':[('parent_id','!=',False)]}"

if I want the field to be mandatory whenever a parent_id is selected. It
does not work in the new web client ; however it seems the attrs are
well translated into modifiers:

modifiers="{"required": [["parent_id",
"!=", false]]}"

Cheers!

** Affects: openerp-web
     Importance: Undecided
         Status: New

** Summary changed:

- Use a many2one value in modifier/attrs
+ Use a many2one value in modifiers/attrs

-- 
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/898686

Title:
  Use a many2one value in modifiers/attrs

Status in OpenERP Web:
  New

Bug description:
  Hi!

  I would like to change the attributes of some fields depending on
  whether a many2one field, let us call it "parent_id" for the sake of
  the example, is filled with a value or not.

  I used to write something like this:

  attrs="{'required':[('parent_id','!=',False)]}"

  if I want the field to be mandatory whenever a parent_id is selected.
  It does not work in the new web client ; however it seems the attrs
  are well translated into modifiers:

  modifiers="{"required": [["parent_id",
  "!=", false]]}"

  Cheers!

To manage notifications about this bug go to:
https://bugs.launchpad.net/openerp-web/+bug/898686/+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