Skip to content

Commit cde575c

Browse files
authored
Remove categary id linking to old Odoo 8 "roleaccount" (#208)
This should fix BE creation in Odoo 16.
1 parent 73a7e02 commit cde575c

File tree

1 file changed

+0
-6
lines changed
  • apiserver/billing/odoostorage/odoo/odoo16

1 file changed

+0
-6
lines changed

apiserver/billing/odoostorage/odoo/odoo16/odoo16.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ const VSHNAccountingContactNameKey = "billing.appuio.io/vshn-accounting-contact-
2525
// Used to identify the accounting contact of a company.
2626
const invoiceType = "invoice"
2727

28-
// TODO(bastjan) test if still needed in odoo16
29-
const companyCategory = 2
30-
3128
// Used to generate the UUID for the .metadata.uid field.
3229
var metaUIDNamespace = uuid.MustParse("7550b1ae-7a2a-485e-a75d-6f931b2cd73f")
3330

@@ -442,15 +439,12 @@ func mapBillingEntityToPartners(be billingv1.BillingEntity, countryIDs map[strin
442439
}
443440

444441
func setStaticAccountingContactFields(conf Config, a *odooclient.ResPartner) {
445-
a.CategoryId = odooclient.NewRelation()
446442
a.Lang = odooclient.NewSelection(conf.LanguagePreference)
447443
a.Type = odooclient.NewSelection(invoiceType)
448444
a.PropertyPaymentTermId = odooclient.NewMany2One(int64(conf.PaymentTermID), "")
449445
}
450446

451447
func setStaticCompanyFields(conf Config, a *odooclient.ResPartner) {
452-
a.CategoryId = odooclient.NewRelation()
453-
a.CategoryId.AddRecord(int64(companyCategory))
454448
a.Lang = odooclient.NewSelection(conf.LanguagePreference)
455449
a.PropertyPaymentTermId = odooclient.NewMany2One(int64(conf.PaymentTermID), "")
456450
}

0 commit comments

Comments
 (0)