Add odoo fields
This commit is contained in:
parent
d8cc90188e
commit
1ed383ea10
2 changed files with 30 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 5.2 on 2025-05-26 05:08
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("core", "0003_alter_organization_namespace"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="billingentity",
|
||||
name="odoo_company_id",
|
||||
field=models.IntegerField(null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="billingentity",
|
||||
name="odoo_invoice_id",
|
||||
field=models.IntegerField(null=True),
|
||||
),
|
||||
]
|
|
@ -110,6 +110,13 @@ class BillingEntity(ServalaModelMixin, models.Model):
|
|||
max_length=100, blank=True, verbose_name=_("ERP reference")
|
||||
)
|
||||
|
||||
# Odoo IDs are nullable for creation, should never be null in practice
|
||||
# The company ID points at a record of type res.partner with company_type=company
|
||||
# The invoice ID points at a record of type res.partner with company_type=person,
|
||||
# type=invoic, parent_id=company_id (the invoice address).
|
||||
odoo_company_id = models.IntegerField(null=True)
|
||||
odoo_invoice_id = models.IntegerField(null=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("Billing entity")
|
||||
verbose_name_plural = _("Billing entities")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue