I am not sure this will help, as It is not just about user groups, as you can see I looking at both user groups and also workflow state. I am ending up repeating the attrs value across everyline. Is there a way to set this in a variable once and reuse it in each of the lines:
<tr><th nowrap="true">Division Code</th><td><field name="divisionAU" attrs="{'readonly':['&','|','&',('groupEngineering','!=','YES'),('groupMarketing','!=','YES'),('state','=','Completed'),('state','!=','draft')]}"/> Australia | <field name="divisionNZ" attrs="{'readonly':['&','|','&',('groupEngineering','!=','YES'),('groupMarketing','!=','YES'),('state','=','Completed'),('state','!=','draft')]}"/>New Zealand</td></tr> <tr><th nowrap="true">Product Status</th><td><field name="itemStatus" attrs="{'readonly':['&','|','&',('groupEngineering','!=','YES'),('groupMarketing','!=','YES'),('state','=','Completed'),('state','!=','draft')]}"/></td></tr>
Second issue that I am hoping to resolve with the availability of a variable is as follows:
If a certain value is selected in a "type" field it should display the following state line with the appropriate states:
<field name="state" widget="statusbar" statusbar_visible="draft,PendingEng,PendingMan,PendingFinance,PendingApproval,Completed" />
However if the other value is selected, it should use the following:
<field name="state" widget="statusbar" statusbar_visible="draft,PendingEng,,Completed" />
Thoughts?
Damien