Compare commits
No commits in common. "54998ab9d0f6265297afb17ba6330380cc9eef26" and "8ba9787d4bc68b360d6bc789d38f447b68f18189" have entirely different histories.
54998ab9d0
...
8ba9787d4b
2 changed files with 11 additions and 1 deletions
|
|
@ -73,6 +73,16 @@ class OrganizationAdmin(admin.ModelAdmin):
|
||||||
|
|
||||||
return readonly_fields
|
return readonly_fields
|
||||||
|
|
||||||
|
def get_form(self, request, obj=None, **kwargs):
|
||||||
|
form = super().get_form(request, obj, **kwargs)
|
||||||
|
|
||||||
|
if obj and obj.has_inherited_billing_entity:
|
||||||
|
form.base_fields["billing_entity"].help_text = _(
|
||||||
|
"This billing entity is inherited from the organization's origin and cannot be modified."
|
||||||
|
)
|
||||||
|
|
||||||
|
return form
|
||||||
|
|
||||||
|
|
||||||
@admin.register(BillingEntity)
|
@admin.register(BillingEntity)
|
||||||
class BillingEntityAdmin(admin.ModelAdmin):
|
class BillingEntityAdmin(admin.ModelAdmin):
|
||||||
|
|
|
||||||
|
|
@ -485,7 +485,7 @@ class OrganizationInvitation(ServalaModelMixin, models.Model):
|
||||||
def is_accepted(self):
|
def is_accepted(self):
|
||||||
# We check both accepted_by and accepted_at to avoid a deleted user
|
# We check both accepted_by and accepted_at to avoid a deleted user
|
||||||
# freeing up an invitation
|
# freeing up an invitation
|
||||||
return bool(self.accepted_by or self.accepted_at)
|
return self.accepted_by or self.accepted_at
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def can_be_accepted(self):
|
def can_be_accepted(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue