From 68e8b6bd4cd75eaee537d5a588ceb4c2f9508c8e Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:42:44 +0100 Subject: [PATCH] feat: allow setting a default e-invoice profile per Customer --- eu_einvoice/custom_fields.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eu_einvoice/custom_fields.py b/eu_einvoice/custom_fields.py index 2e98ba2..e3a1056 100644 --- a/eu_einvoice/custom_fields.py +++ b/eu_einvoice/custom_fields.py @@ -30,6 +30,14 @@ def get_custom_fields(): "insert_after": "language", "fieldtype": "Data", }, + { + "fieldname": "einvoice_profile", + "label": _("E Invoice Profile"), + "insert_after": "buyer_reference", + "fieldtype": "Select", + "options": PROFILE_OPTIONS, + "default": "EXTENDED", + }, ], "Sales Order": [ { @@ -63,6 +71,8 @@ def get_custom_fields(): "insert_after": "e_invoice_validation_section", "fieldtype": "Select", "options": PROFILE_OPTIONS, + "fetch_from": "customer.einvoice_profile", + "fetch_if_empty": 1, "print_hide": 1, }, {