addons14/project_role/models/project_assignment.py
def _check(self):
        """
        Check if assignment conflicts with any already-existing assignment and
        if specific role can be assigned at all (extension hook).
        """
        for assignment in self:
            conflicting_assignment = self.search(
                assignment._get_conflicting_domain(),
                limit=1,
            )
            if conflicting_assignment:
                raise ValidationError(
                    _("Assignment %s conflicts with another assignment: %s")
                    % (
                        assignment.name,
                        conflicting_assignment.name,
                    )
                )
            if not assignment.role_id.can_assign(
                assignment.user_id, assignment.project_id
            ):
                if assignment.project_id:
                    error = _("User %s can not be assigned to role %s on %s.") % (
                        assignment.user_id.name,
                        assignment.role_id.name,
                        assignment.project_id.name,
                    )
                else:
                    error = _("User %s can not be assigned to role %s.") % (
                        assignment.user_id.name,
                        assignment.role_id.name,
                    )
                raise ValidationError(error)

        Check if assignment conflicts with any already-existing assignment and
        if specific role can be assigned at all (extension hook).
        
Check if assignment conflicts with any already-existing assignment and
if specific role can be assigned at all (extension hook).
Check if assignment conflicts with any already - existing assignment and if specific role can be assigned at all ( extension hook ) .
def _check(self):
        for assignment in self:
            conflicting_assignment = self.search(
                assignment._get_conflicting_domain(),
                limit=1,
            )
            if conflicting_assignment:
                raise ValidationError(
                    _("Assignment %s conflicts with another assignment: %s")
                    % (
                        assignment.name,
                        conflicting_assignment.name,
                    )
                )
            if not assignment.role_id.can_assign(
                assignment.user_id, assignment.project_id
            ):
                if assignment.project_id:
                    error = _("User %s can not be assigned to role %s on %s.") % (
                        assignment.user_id.name,
                        assignment.role_id.name,
                        assignment.project_id.name,
                    )
                else:
                    error = _("User %s can not be assigned to role %s.") % (
                        assignment.user_id.name,
                        assignment.role_id.name,
                    )
                raise ValidationError(error)
def _check ( self ) : for assignment in self : conflicting_assignment = self . search ( assignment . _get_conflicting_domain ( ) , limit = 1 , ) if conflicting_assignment : raise ValidationError ( _ ( "Assignment %s conflicts with another assignment: %s" ) % ( assignment . name , conflicting_assignment . name , ) ) if not assignment . role_id . can_assign ( assignment . user_id , assignment . project_id ) : if assignment . project_id : error = _ ( "User %s can not be assigned to role %s on %s." ) % ( assignment . user_id . name , assignment . role_id . name , assignment . project_id . name , ) else : error = _ ( "User %s can not be assigned to role %s." ) % ( assignment . user_id . name , assignment . role_id . name , ) raise ValidationError ( error )
Check if assignment conflicts with any already-existing assignment and
if specific role can be assigned at all (extension hook).
Check if assignment conflicts with any already - existing assignment and if specific role can be assigned at all ( extension hook ) .
"""
        Check if assignment conflicts with any already-existing assignment and
        if specific role can be assigned at all (extension hook).
        """
self