<type_roles>
  <role id='Auditor'>
   <property id='title'>ReadOnly for Accountant</property>
   <property id='condition'>python: context.getLedger("") == "automated"</property>
   <multi_property id='categories'>local_role_group/function</multi_property>
   <multi_property id='category'>function/accounting*</multi_property>
   <multi_property id='base_category'>function</multi_property>
  </role>
  <role id='Auditor'>
   <property id='title'>Shadow User</property>
   <property id='description'>Destination Section has shadow rights on the document</property>
   <property id='condition'>python: (here.getDestination('', portal_type='Person') != "") and (here.getLedger("") == "automated")</property>
   <property id='base_category_script'>Base_getSecurityCategoryAsShadowUser</property>
   <multi_property id='categories'>local_role_group/shadow</multi_property>
   <multi_property id='base_category'>destination</multi_property>
  </role>
  <role id='Auditor'>
   <property id='title'>User</property>
   <property id='condition'>python: (here.getDestination('', portal_type='Person') != '') and (context.getLedger("") == "automated")</property>
   <property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property>
   <multi_property id='categories'>local_role_group/user</multi_property>
   <multi_property id='base_category'>destination</multi_property>
  </role>
  <role id='Assignee'>
   <property id='title'>Writable for Accountant Agent</property>
   <property id='condition'>python: context.getLedger("") != "automated"</property>
   <multi_property id='categories'>local_role_group/function</multi_property>
   <multi_property id='category'>function/accounting/agent</multi_property>
   <multi_property id='base_category'>function</multi_property>
  </role>
  <role id='Assignor'>
   <property id='title'>Writable for Accountant Manager</property>
   <property id='condition'>python: context.getLedger("") != "automated"</property>
   <multi_property id='categories'>local_role_group/function</multi_property>
   <multi_property id='category'>function/accounting/manager</multi_property>
   <multi_property id='base_category'>function</multi_property>
  </role>
</type_roles>