Skip to content

Commit

Permalink
Remove categary id linking to old Odoo 8 "roleaccount" (#208)
Browse files Browse the repository at this point in the history
This should fix BE creation in Odoo 16.
  • Loading branch information
bastjan authored May 23, 2024
1 parent 73a7e02 commit cde575c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions apiserver/billing/odoostorage/odoo/odoo16/odoo16.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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), "")
}
Expand Down

0 comments on commit cde575c

Please sign in to comment.