From cde575ceb484b9a4c6a4c31dbde2469992347f43 Mon Sep 17 00:00:00 2001 From: Sebastian Widmer Date: Thu, 23 May 2024 16:59:37 +0200 Subject: [PATCH] Remove categary id linking to old Odoo 8 "roleaccount" (#208) This should fix BE creation in Odoo 16. --- apiserver/billing/odoostorage/odoo/odoo16/odoo16.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/apiserver/billing/odoostorage/odoo/odoo16/odoo16.go b/apiserver/billing/odoostorage/odoo/odoo16/odoo16.go index 9a7a68cf..b0ec391e 100644 --- a/apiserver/billing/odoostorage/odoo/odoo16/odoo16.go +++ b/apiserver/billing/odoostorage/odoo/odoo16/odoo16.go @@ -25,9 +25,6 @@ const VSHNAccountingContactNameKey = "billing.appuio.io/vshn-accounting-contact- // Used to identify the accounting contact of a company. const invoiceType = "invoice" -// TODO(bastjan) test if still needed in odoo16 -const companyCategory = 2 - // Used to generate the UUID for the .metadata.uid field. var metaUIDNamespace = uuid.MustParse("7550b1ae-7a2a-485e-a75d-6f931b2cd73f") @@ -442,15 +439,12 @@ func mapBillingEntityToPartners(be billingv1.BillingEntity, countryIDs map[strin } func setStaticAccountingContactFields(conf Config, a *odooclient.ResPartner) { - a.CategoryId = odooclient.NewRelation() a.Lang = odooclient.NewSelection(conf.LanguagePreference) a.Type = odooclient.NewSelection(invoiceType) a.PropertyPaymentTermId = odooclient.NewMany2One(int64(conf.PaymentTermID), "") } func setStaticCompanyFields(conf Config, a *odooclient.ResPartner) { - a.CategoryId = odooclient.NewRelation() - a.CategoryId.AddRecord(int64(companyCategory)) a.Lang = odooclient.NewSelection(conf.LanguagePreference) a.PropertyPaymentTermId = odooclient.NewMany2One(int64(conf.PaymentTermID), "") }