756 return self.maxrelitems + 1 |
756 return self.maxrelitems + 1 |
757 |
757 |
758 # autoform specific fields ################################################# |
758 # autoform specific fields ################################################# |
759 |
759 |
760 def _generic_relations_field(self): |
760 def _generic_relations_field(self): |
761 try: |
761 srels_by_cat = self.editable_relations() |
762 # pylint: disable=E1101 |
|
763 srels_by_cat = self.srelations_by_category('generic', 'add', strict=True) |
|
764 warn('[3.6] %s: srelations_by_category is deprecated, use uicfg or ' |
|
765 'override editable_relations instead' % classid(self), |
|
766 DeprecationWarning) |
|
767 except AttributeError: |
|
768 srels_by_cat = self.editable_relations() |
|
769 if not srels_by_cat: |
762 if not srels_by_cat: |
770 raise f.FieldNotFound('_cw_generic_field') |
763 raise f.FieldNotFound('_cw_generic_field') |
771 fieldset = u'%s :' % self._cw.__('This %s' % self.edited_entity.e_schema) |
764 fieldset = u'%s :' % self._cw.__('This %s' % self.edited_entity.e_schema) |
772 fieldset = fieldset.capitalize() |
765 fieldset = fieldset.capitalize() |
773 return GenericRelationsField(self.editable_relations(), |
766 return GenericRelationsField(self.editable_relations(), |
926 _AFS.tag_subject_of(('*', 'in_state', '*'), 'main', 'hidden') |
919 _AFS.tag_subject_of(('*', 'in_state', '*'), 'main', 'hidden') |
927 for rtype in ('creation_date', 'modification_date', 'cwuri', |
920 for rtype in ('creation_date', 'modification_date', 'cwuri', |
928 'owned_by', 'created_by', 'cw_source'): |
921 'owned_by', 'created_by', 'cw_source'): |
929 _AFS.tag_subject_of(('*', rtype, '*'), 'main', 'metadata') |
922 _AFS.tag_subject_of(('*', rtype, '*'), 'main', 'metadata') |
930 |
923 |
931 _AFS.tag_subject_of(('*', 'require_permission', '*'), 'main', 'hidden') |
|
932 _AFS.tag_subject_of(('*', 'by_transition', '*'), 'main', 'attributes') |
924 _AFS.tag_subject_of(('*', 'by_transition', '*'), 'main', 'attributes') |
933 _AFS.tag_subject_of(('*', 'by_transition', '*'), 'muledit', 'attributes') |
925 _AFS.tag_subject_of(('*', 'by_transition', '*'), 'muledit', 'attributes') |
934 _AFS.tag_object_of(('*', 'by_transition', '*'), 'main', 'hidden') |
926 _AFS.tag_object_of(('*', 'by_transition', '*'), 'main', 'hidden') |
935 _AFS.tag_object_of(('*', 'from_state', '*'), 'main', 'hidden') |
927 _AFS.tag_object_of(('*', 'from_state', '*'), 'main', 'hidden') |
936 _AFS.tag_object_of(('*', 'to_state', '*'), 'main', 'hidden') |
928 _AFS.tag_object_of(('*', 'to_state', '*'), 'main', 'hidden') |
937 _AFS.tag_subject_of(('*', 'wf_info_for', '*'), 'main', 'attributes') |
929 _AFS.tag_subject_of(('*', 'wf_info_for', '*'), 'main', 'attributes') |
938 _AFS.tag_subject_of(('*', 'wf_info_for', '*'), 'muledit', 'attributes') |
930 _AFS.tag_subject_of(('*', 'wf_info_for', '*'), 'muledit', 'attributes') |
939 _AFS.tag_object_of(('*', 'wf_info_for', '*'), 'main', 'hidden') |
931 _AFS.tag_object_of(('*', 'wf_info_for', '*'), 'main', 'hidden') |
940 _AFS.tag_subject_of(('CWPermission', 'require_group', '*'), 'main', 'attributes') |
|
941 _AFS.tag_subject_of(('CWPermission', 'require_group', '*'), 'muledit', 'attributes') |
|
942 _AFS.tag_attribute(('CWEType', 'final'), 'main', 'hidden') |
932 _AFS.tag_attribute(('CWEType', 'final'), 'main', 'hidden') |
943 _AFS.tag_attribute(('CWRType', 'final'), 'main', 'hidden') |
933 _AFS.tag_attribute(('CWRType', 'final'), 'main', 'hidden') |
944 _AFS.tag_attribute(('CWUser', 'firstname'), 'main', 'attributes') |
934 _AFS.tag_attribute(('CWUser', 'firstname'), 'main', 'attributes') |
945 _AFS.tag_attribute(('CWUser', 'surname'), 'main', 'attributes') |
935 _AFS.tag_attribute(('CWUser', 'surname'), 'main', 'attributes') |
946 _AFS.tag_attribute(('CWUser', 'last_login_time'), 'main', 'metadata') |
936 _AFS.tag_attribute(('CWUser', 'last_login_time'), 'main', 'metadata') |