diff options
Diffstat (limited to 'ishtar_common/models.py')
| -rw-r--r-- | ishtar_common/models.py | 19 | 
1 files changed, 19 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 6bfffd0cf..cb0da7ba7 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2910,6 +2910,25 @@ class Person(Address, Merge, OwnPerms, ValueGetter, MainItem):              for fle in self.general_contractor.all():                  fle.save()  # force update of raw_general_contractor +    def get_extra_actions(self, request): +        actions = super(Person, self).get_extra_actions(request) + +        can_create_person = self.can_do(request, "change_person") +        if not can_create_person: +            return actions +        actions += [ +            ( +                reverse("person_create", args=[self.pk]), +                _("Create new user"), +                "fa fa-user", +                "", +                "", +                False, +            ), +        ] +        return actions + +      @classmethod      def get_query_owns(cls, ishtaruser):          return (  | 
