Billing Entity Management #66
4 changed files with 1 additions and 12 deletions
|
@ -154,8 +154,6 @@ class BillingEntity(ServalaModelMixin, models.Model):
|
||||||
"name": odoo_data.get("company_name", name),
|
"name": odoo_data.get("company_name", name),
|
||||||
"company_type": "company",
|
"company_type": "company",
|
||||||
}
|
}
|
||||||
if vat := odoo_data.get("invoice_vat"):
|
|
||||||
company_payload["vat"] = vat
|
|
||||||
company_id = CLIENT.execute("res.partner", "create", [company_payload])
|
company_id = CLIENT.execute("res.partner", "create", [company_payload])
|
||||||
instance.odoo_company_id = company_id
|
instance.odoo_company_id = company_id
|
||||||
|
|
||||||
|
@ -199,7 +197,7 @@ class BillingEntity(ServalaModelMixin, models.Model):
|
||||||
"invoice_address": None,
|
"invoice_address": None,
|
||||||
}
|
}
|
||||||
|
|
||||||
company_fields = ["name", "company_type", "vat"]
|
company_fields = ["name", "company_type"]
|
||||||
invoice_address_fields = [
|
invoice_address_fields = [
|
||||||
"name",
|
"name",
|
||||||
"company_type",
|
"company_type",
|
||||||
|
|
|
@ -40,7 +40,6 @@ class OrganizationCreateForm(OrganizationForm):
|
||||||
)
|
)
|
||||||
invoice_email = forms.EmailField(label=_("Billing Email"), required=False)
|
invoice_email = forms.EmailField(label=_("Billing Email"), required=False)
|
||||||
invoice_phone = forms.CharField(label=_("Phone"), required=False, max_length=30)
|
invoice_phone = forms.CharField(label=_("Phone"), required=False, max_length=30)
|
||||||
invoice_vat = forms.CharField(label=_("VAT ID"), required=False, max_length=50)
|
|
||||||
|
|
||||||
class Meta(OrganizationForm.Meta):
|
class Meta(OrganizationForm.Meta):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -42,8 +42,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-body card-body">
|
<div class="form-body card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ form.invoice_vat.as_field_group }}
|
|
||||||
<hr>
|
|
||||||
{{ form.invoice_street.as_field_group }}
|
{{ form.invoice_street.as_field_group }}
|
||||||
{{ form.invoice_street2.as_field_group }}
|
{{ form.invoice_street2.as_field_group }}
|
||||||
<div class="col-md-2">{{ form.invoice_zip.as_field_group }}</div>
|
<div class="col-md-2">{{ form.invoice_zip.as_field_group }}</div>
|
||||||
|
|
|
@ -116,12 +116,6 @@
|
||||||
</th>
|
</th>
|
||||||
<td>{{ odoo_data.invoice_address.country_id.1|default:"" }}</td>
|
<td>{{ odoo_data.invoice_address.country_id.1|default:"" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<th class="w-25">
|
|
||||||
<span class="d-flex mt-2">{% translate "VAT ID" %}</span>
|
|
||||||
</th>
|
|
||||||
<td>{{ odoo_data.company.vat|default:"" }}</td>
|
|
||||||
</tr>
|
|
||||||
<th class="w-25">
|
<th class="w-25">
|
||||||
<span class="d-flex mt-2">{% translate "Invoice Email" %}</span>
|
<span class="d-flex mt-2">{% translate "Invoice Email" %}</span>
|
||||||
</th>
|
</th>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue