Compare commits
No commits in common. "b3ecae6fd995e71bb20be94f9e39d1507dd180dd" and "21102f30c794006b476d1210734d806ae76c91bf" have entirely different histories.
b3ecae6fd9
...
21102f30c7
4 changed files with 62 additions and 136 deletions
|
|
@ -86,13 +86,7 @@ class BillingEntityAdmin(admin.ModelAdmin):
|
||||||
|
|
||||||
@admin.register(OrganizationOrigin)
|
@admin.register(OrganizationOrigin)
|
||||||
class OrganizationOriginAdmin(admin.ModelAdmin):
|
class OrganizationOriginAdmin(admin.ModelAdmin):
|
||||||
list_display = (
|
list_display = ("name", "billing_entity", "default_odoo_sale_order_id")
|
||||||
"name",
|
|
||||||
"billing_entity",
|
|
||||||
"default_odoo_sale_order_id",
|
|
||||||
"hide_billing_address",
|
|
||||||
)
|
|
||||||
list_filter = ("hide_billing_address",)
|
|
||||||
search_fields = ("name",)
|
search_fields = ("name",)
|
||||||
autocomplete_fields = ("billing_entity",)
|
autocomplete_fields = ("billing_entity",)
|
||||||
filter_horizontal = ("limit_cloudproviders",)
|
filter_horizontal = ("limit_cloudproviders",)
|
||||||
|
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
# Generated by Django 5.2.8 on 2025-11-12 09:31
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("core", "0013_add_form_config"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="organizationorigin",
|
|
||||||
name="billing_message",
|
|
||||||
field=models.TextField(
|
|
||||||
blank=True,
|
|
||||||
help_text="Optional message to display instead of billing address (e.g., 'You will be invoiced by Exoscale').",
|
|
||||||
verbose_name="Billing Message",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="organizationorigin",
|
|
||||||
name="hide_billing_address",
|
|
||||||
field=models.BooleanField(
|
|
||||||
default=False,
|
|
||||||
help_text="If enabled, the billing address will not be shown in the organization details view.",
|
|
||||||
verbose_name="Hide Billing Address",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="controlplane",
|
|
||||||
name="user_info",
|
|
||||||
field=models.JSONField(
|
|
||||||
blank=True,
|
|
||||||
help_text='Array of info objects: [{"title": "…", "content": "…", "help_text": "…"}]. The help_text field is optional and will be shown as a hover popover on an info icon.',
|
|
||||||
null=True,
|
|
||||||
verbose_name="User Information",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
@ -419,20 +419,6 @@ class OrganizationOrigin(ServalaModelMixin, models.Model):
|
||||||
"If set, this sale order will be used for new organizations with this origin."
|
"If set, this sale order will be used for new organizations with this origin."
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
hide_billing_address = models.BooleanField(
|
|
||||||
default=False,
|
|
||||||
verbose_name=_("Hide Billing Address"),
|
|
||||||
help_text=_(
|
|
||||||
"If enabled, the billing address will not be shown in the organization details view."
|
|
||||||
),
|
|
||||||
)
|
|
||||||
billing_message = models.TextField(
|
|
||||||
blank=True,
|
|
||||||
verbose_name=_("Billing Message"),
|
|
||||||
help_text=_(
|
|
||||||
"Optional message to display instead of billing address (e.g., 'You will be invoiced by Exoscale')."
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("Organization origin")
|
verbose_name = _("Organization origin")
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if not form.instance.origin.hide_billing_address %}
|
|
||||||
{% if form.instance.billing_entity and form.instance.billing_entity.odoo_data.invoice_address %}
|
{% if form.instance.billing_entity and form.instance.billing_entity.odoo_data.invoice_address %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
|
@ -227,18 +226,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif form.instance.origin.billing_message %}
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<h4 class="card-title">{% translate "Billing Information" %}</h4>
|
|
||||||
</div>
|
|
||||||
<div class="card-content">
|
|
||||||
<div class="card-body">
|
|
||||||
<p>{{ form.instance.origin.billing_message }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% if can_manage_members %}
|
{% if can_manage_members %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue