Skip to content

Commit

Permalink
fix: replace omptempty by omitempty in struct tag fields and fix some…
Browse files Browse the repository at this point in the history
… typos (#54)

* fix: replace omptempty by omitempty in struct tag fields and fix some typos

* fix: add missing trailing 's' in comments for auto-documentation
  • Loading branch information
dragonis41 authored Feb 29, 2024
1 parent 65da36b commit bdd9a88
Show file tree
Hide file tree
Showing 357 changed files with 6,851 additions and 6,851 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ It is **highly recommanded** to not remove them, since you would not be able to

#### Custom skilld-labs models

All others models (not core one) are specific to skilld-labs usage. They use our own odoo instance which is **version 11**. (note that models structure changed between odoo major versions).
All other models (not core one) are specific to skilld-labs usage. They use our own odoo instance which is **version 11**. (note that models structure changed between odoo major versions).

If you're ok to work with those models, you can use this library instance, if not you should fork the repository and generate you own models by following steps above.

Expand Down Expand Up @@ -66,7 +66,7 @@ func main() {
## Models

Generated models contains high level functions to interact with models in an easy and golang way.
It covers the most common usage and contains for each models those functions :
It covers the most common usage and contains for each model those functions :

### Create
```go
Expand Down Expand Up @@ -170,7 +170,7 @@ cls, err := c.FindCrmLeads(odoo.NewCriteria().Add("user_id.name", "=", "John Doe

All high level functions are based on basic odoo webservices functions.

These functions give you more flexibility but less usability. We recommand you to use models functions (high level).
These functions give you more flexibility but less usability. We recommend you to use models functions (high level).

Here are available low level functions :

Expand Down
32 changes: 16 additions & 16 deletions account_abstract_payment.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ package odoo

// AccountAbstractPayment represents account.abstract.payment model.
type AccountAbstractPayment struct {
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
Amount *Float `xmlrpc:"amount,omptempty"`
Communication *String `xmlrpc:"communication,omptempty"`
CompanyId *Many2One `xmlrpc:"company_id,omptempty"`
CurrencyId *Many2One `xmlrpc:"currency_id,omptempty"`
DisplayName *String `xmlrpc:"display_name,omptempty"`
HidePaymentMethod *Bool `xmlrpc:"hide_payment_method,omptempty"`
Id *Int `xmlrpc:"id,omptempty"`
JournalId *Many2One `xmlrpc:"journal_id,omptempty"`
PartnerId *Many2One `xmlrpc:"partner_id,omptempty"`
PartnerType *Selection `xmlrpc:"partner_type,omptempty"`
PaymentDate *Time `xmlrpc:"payment_date,omptempty"`
PaymentMethodCode *String `xmlrpc:"payment_method_code,omptempty"`
PaymentMethodId *Many2One `xmlrpc:"payment_method_id,omptempty"`
PaymentType *Selection `xmlrpc:"payment_type,omptempty"`
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
Amount *Float `xmlrpc:"amount,omitempty"`
Communication *String `xmlrpc:"communication,omitempty"`
CompanyId *Many2One `xmlrpc:"company_id,omitempty"`
CurrencyId *Many2One `xmlrpc:"currency_id,omitempty"`
DisplayName *String `xmlrpc:"display_name,omitempty"`
HidePaymentMethod *Bool `xmlrpc:"hide_payment_method,omitempty"`
Id *Int `xmlrpc:"id,omitempty"`
JournalId *Many2One `xmlrpc:"journal_id,omitempty"`
PartnerId *Many2One `xmlrpc:"partner_id,omitempty"`
PartnerType *Selection `xmlrpc:"partner_type,omitempty"`
PaymentDate *Time `xmlrpc:"payment_date,omitempty"`
PaymentMethodCode *String `xmlrpc:"payment_method_code,omitempty"`
PaymentMethodId *Many2One `xmlrpc:"payment_method_id,omitempty"`
PaymentType *Selection `xmlrpc:"payment_type,omitempty"`
}

// AccountAbstractPayments represents array of account.abstract.payment model.
Expand All @@ -42,7 +42,7 @@ func (c *Client) CreateAccountAbstractPayment(aap *AccountAbstractPayment) (int6
return ids[0], nil
}

// CreateAccountAbstractPayment creates a new account.abstract.payment model and returns its id.
// CreateAccountAbstractPayments creates a new account.abstract.payment model and returns its id.
func (c *Client) CreateAccountAbstractPayments(aaps []*AccountAbstractPayment) ([]int64, error) {
var vv []interface{}
for _, v := range aaps {
Expand Down
46 changes: 23 additions & 23 deletions account_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@ package odoo

// AccountAccount represents account.account model.
type AccountAccount struct {
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
Code *String `xmlrpc:"code,omptempty"`
CompanyId *Many2One `xmlrpc:"company_id,omptempty"`
CreateDate *Time `xmlrpc:"create_date,omptempty"`
CreateUid *Many2One `xmlrpc:"create_uid,omptempty"`
CurrencyId *Many2One `xmlrpc:"currency_id,omptempty"`
Deprecated *Bool `xmlrpc:"deprecated,omptempty"`
DisplayName *String `xmlrpc:"display_name,omptempty"`
GroupId *Many2One `xmlrpc:"group_id,omptempty"`
Id *Int `xmlrpc:"id,omptempty"`
InternalType *Selection `xmlrpc:"internal_type,omptempty"`
LastTimeEntriesChecked *Time `xmlrpc:"last_time_entries_checked,omptempty"`
Name *String `xmlrpc:"name,omptempty"`
Note *String `xmlrpc:"note,omptempty"`
OpeningCredit *Float `xmlrpc:"opening_credit,omptempty"`
OpeningDebit *Float `xmlrpc:"opening_debit,omptempty"`
Reconcile *Bool `xmlrpc:"reconcile,omptempty"`
TagIds *Relation `xmlrpc:"tag_ids,omptempty"`
TaxIds *Relation `xmlrpc:"tax_ids,omptempty"`
UserTypeId *Many2One `xmlrpc:"user_type_id,omptempty"`
WriteDate *Time `xmlrpc:"write_date,omptempty"`
WriteUid *Many2One `xmlrpc:"write_uid,omptempty"`
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
Code *String `xmlrpc:"code,omitempty"`
CompanyId *Many2One `xmlrpc:"company_id,omitempty"`
CreateDate *Time `xmlrpc:"create_date,omitempty"`
CreateUid *Many2One `xmlrpc:"create_uid,omitempty"`
CurrencyId *Many2One `xmlrpc:"currency_id,omitempty"`
Deprecated *Bool `xmlrpc:"deprecated,omitempty"`
DisplayName *String `xmlrpc:"display_name,omitempty"`
GroupId *Many2One `xmlrpc:"group_id,omitempty"`
Id *Int `xmlrpc:"id,omitempty"`
InternalType *Selection `xmlrpc:"internal_type,omitempty"`
LastTimeEntriesChecked *Time `xmlrpc:"last_time_entries_checked,omitempty"`
Name *String `xmlrpc:"name,omitempty"`
Note *String `xmlrpc:"note,omitempty"`
OpeningCredit *Float `xmlrpc:"opening_credit,omitempty"`
OpeningDebit *Float `xmlrpc:"opening_debit,omitempty"`
Reconcile *Bool `xmlrpc:"reconcile,omitempty"`
TagIds *Relation `xmlrpc:"tag_ids,omitempty"`
TaxIds *Relation `xmlrpc:"tax_ids,omitempty"`
UserTypeId *Many2One `xmlrpc:"user_type_id,omitempty"`
WriteDate *Time `xmlrpc:"write_date,omitempty"`
WriteUid *Many2One `xmlrpc:"write_uid,omitempty"`
}

// AccountAccounts represents array of account.account model.
Expand All @@ -49,7 +49,7 @@ func (c *Client) CreateAccountAccount(aa *AccountAccount) (int64, error) {
return ids[0], nil
}

// CreateAccountAccount creates a new account.account model and returns its id.
// CreateAccountAccounts creates a new account.account model and returns its id.
func (c *Client) CreateAccountAccounts(aas []*AccountAccount) ([]int64, error) {
var vv []interface{}
for _, v := range aas {
Expand Down
24 changes: 12 additions & 12 deletions account_account_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ package odoo

// AccountAccountTag represents account.account.tag model.
type AccountAccountTag struct {
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
Active *Bool `xmlrpc:"active,omptempty"`
Applicability *Selection `xmlrpc:"applicability,omptempty"`
Color *Int `xmlrpc:"color,omptempty"`
CreateDate *Time `xmlrpc:"create_date,omptempty"`
CreateUid *Many2One `xmlrpc:"create_uid,omptempty"`
DisplayName *String `xmlrpc:"display_name,omptempty"`
Id *Int `xmlrpc:"id,omptempty"`
Name *String `xmlrpc:"name,omptempty"`
WriteDate *Time `xmlrpc:"write_date,omptempty"`
WriteUid *Many2One `xmlrpc:"write_uid,omptempty"`
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
Active *Bool `xmlrpc:"active,omitempty"`
Applicability *Selection `xmlrpc:"applicability,omitempty"`
Color *Int `xmlrpc:"color,omitempty"`
CreateDate *Time `xmlrpc:"create_date,omitempty"`
CreateUid *Many2One `xmlrpc:"create_uid,omitempty"`
DisplayName *String `xmlrpc:"display_name,omitempty"`
Id *Int `xmlrpc:"id,omitempty"`
Name *String `xmlrpc:"name,omitempty"`
WriteDate *Time `xmlrpc:"write_date,omitempty"`
WriteUid *Many2One `xmlrpc:"write_uid,omitempty"`
}

// AccountAccountTags represents array of account.account.tag model.
Expand All @@ -38,7 +38,7 @@ func (c *Client) CreateAccountAccountTag(aat *AccountAccountTag) (int64, error)
return ids[0], nil
}

// CreateAccountAccountTag creates a new account.account.tag model and returns its id.
// CreateAccountAccountTags creates a new account.account.tag model and returns its id.
func (c *Client) CreateAccountAccountTags(aats []*AccountAccountTag) ([]int64, error) {
var vv []interface{}
for _, v := range aats {
Expand Down
38 changes: 19 additions & 19 deletions account_account_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ package odoo

// AccountAccountTemplate represents account.account.template model.
type AccountAccountTemplate struct {
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
ChartTemplateId *Many2One `xmlrpc:"chart_template_id,omptempty"`
Code *String `xmlrpc:"code,omptempty"`
CreateDate *Time `xmlrpc:"create_date,omptempty"`
CreateUid *Many2One `xmlrpc:"create_uid,omptempty"`
CurrencyId *Many2One `xmlrpc:"currency_id,omptempty"`
DisplayName *String `xmlrpc:"display_name,omptempty"`
GroupId *Many2One `xmlrpc:"group_id,omptempty"`
Id *Int `xmlrpc:"id,omptempty"`
Name *String `xmlrpc:"name,omptempty"`
Nocreate *Bool `xmlrpc:"nocreate,omptempty"`
Note *String `xmlrpc:"note,omptempty"`
Reconcile *Bool `xmlrpc:"reconcile,omptempty"`
TagIds *Relation `xmlrpc:"tag_ids,omptempty"`
TaxIds *Relation `xmlrpc:"tax_ids,omptempty"`
UserTypeId *Many2One `xmlrpc:"user_type_id,omptempty"`
WriteDate *Time `xmlrpc:"write_date,omptempty"`
WriteUid *Many2One `xmlrpc:"write_uid,omptempty"`
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
ChartTemplateId *Many2One `xmlrpc:"chart_template_id,omitempty"`
Code *String `xmlrpc:"code,omitempty"`
CreateDate *Time `xmlrpc:"create_date,omitempty"`
CreateUid *Many2One `xmlrpc:"create_uid,omitempty"`
CurrencyId *Many2One `xmlrpc:"currency_id,omitempty"`
DisplayName *String `xmlrpc:"display_name,omitempty"`
GroupId *Many2One `xmlrpc:"group_id,omitempty"`
Id *Int `xmlrpc:"id,omitempty"`
Name *String `xmlrpc:"name,omitempty"`
Nocreate *Bool `xmlrpc:"nocreate,omitempty"`
Note *String `xmlrpc:"note,omitempty"`
Reconcile *Bool `xmlrpc:"reconcile,omitempty"`
TagIds *Relation `xmlrpc:"tag_ids,omitempty"`
TaxIds *Relation `xmlrpc:"tax_ids,omitempty"`
UserTypeId *Many2One `xmlrpc:"user_type_id,omitempty"`
WriteDate *Time `xmlrpc:"write_date,omitempty"`
WriteUid *Many2One `xmlrpc:"write_uid,omitempty"`
}

// AccountAccountTemplates represents array of account.account.template model.
Expand All @@ -45,7 +45,7 @@ func (c *Client) CreateAccountAccountTemplate(aat *AccountAccountTemplate) (int6
return ids[0], nil
}

// CreateAccountAccountTemplate creates a new account.account.template model and returns its id.
// CreateAccountAccountTemplates creates a new account.account.template model and returns its id.
func (c *Client) CreateAccountAccountTemplates(aats []*AccountAccountTemplate) ([]int64, error) {
var vv []interface{}
for _, v := range aats {
Expand Down
24 changes: 12 additions & 12 deletions account_account_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ package odoo

// AccountAccountType represents account.account.type model.
type AccountAccountType struct {
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
CreateDate *Time `xmlrpc:"create_date,omptempty"`
CreateUid *Many2One `xmlrpc:"create_uid,omptempty"`
DisplayName *String `xmlrpc:"display_name,omptempty"`
Id *Int `xmlrpc:"id,omptempty"`
IncludeInitialBalance *Bool `xmlrpc:"include_initial_balance,omptempty"`
Name *String `xmlrpc:"name,omptempty"`
Note *String `xmlrpc:"note,omptempty"`
Type *Selection `xmlrpc:"type,omptempty"`
WriteDate *Time `xmlrpc:"write_date,omptempty"`
WriteUid *Many2One `xmlrpc:"write_uid,omptempty"`
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
CreateDate *Time `xmlrpc:"create_date,omitempty"`
CreateUid *Many2One `xmlrpc:"create_uid,omitempty"`
DisplayName *String `xmlrpc:"display_name,omitempty"`
Id *Int `xmlrpc:"id,omitempty"`
IncludeInitialBalance *Bool `xmlrpc:"include_initial_balance,omitempty"`
Name *String `xmlrpc:"name,omitempty"`
Note *String `xmlrpc:"note,omitempty"`
Type *Selection `xmlrpc:"type,omitempty"`
WriteDate *Time `xmlrpc:"write_date,omitempty"`
WriteUid *Many2One `xmlrpc:"write_uid,omitempty"`
}

// AccountAccountTypes represents array of account.account.type model.
Expand All @@ -38,7 +38,7 @@ func (c *Client) CreateAccountAccountType(aat *AccountAccountType) (int64, error
return ids[0], nil
}

// CreateAccountAccountType creates a new account.account.type model and returns its id.
// CreateAccountAccountTypes creates a new account.account.type model and returns its id.
func (c *Client) CreateAccountAccountTypes(aats []*AccountAccountType) ([]int64, error) {
var vv []interface{}
for _, v := range aats {
Expand Down
30 changes: 15 additions & 15 deletions account_aged_trial_balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ package odoo

// AccountAgedTrialBalance represents account.aged.trial.balance model.
type AccountAgedTrialBalance struct {
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
CompanyId *Many2One `xmlrpc:"company_id,omptempty"`
CreateDate *Time `xmlrpc:"create_date,omptempty"`
CreateUid *Many2One `xmlrpc:"create_uid,omptempty"`
DateFrom *Time `xmlrpc:"date_from,omptempty"`
DateTo *Time `xmlrpc:"date_to,omptempty"`
DisplayName *String `xmlrpc:"display_name,omptempty"`
Id *Int `xmlrpc:"id,omptempty"`
JournalIds *Relation `xmlrpc:"journal_ids,omptempty"`
PeriodLength *Int `xmlrpc:"period_length,omptempty"`
ResultSelection *Selection `xmlrpc:"result_selection,omptempty"`
TargetMove *Selection `xmlrpc:"target_move,omptempty"`
WriteDate *Time `xmlrpc:"write_date,omptempty"`
WriteUid *Many2One `xmlrpc:"write_uid,omptempty"`
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
CompanyId *Many2One `xmlrpc:"company_id,omitempty"`
CreateDate *Time `xmlrpc:"create_date,omitempty"`
CreateUid *Many2One `xmlrpc:"create_uid,omitempty"`
DateFrom *Time `xmlrpc:"date_from,omitempty"`
DateTo *Time `xmlrpc:"date_to,omitempty"`
DisplayName *String `xmlrpc:"display_name,omitempty"`
Id *Int `xmlrpc:"id,omitempty"`
JournalIds *Relation `xmlrpc:"journal_ids,omitempty"`
PeriodLength *Int `xmlrpc:"period_length,omitempty"`
ResultSelection *Selection `xmlrpc:"result_selection,omitempty"`
TargetMove *Selection `xmlrpc:"target_move,omitempty"`
WriteDate *Time `xmlrpc:"write_date,omitempty"`
WriteUid *Many2One `xmlrpc:"write_uid,omitempty"`
}

// AccountAgedTrialBalances represents array of account.aged.trial.balance model.
Expand All @@ -41,7 +41,7 @@ func (c *Client) CreateAccountAgedTrialBalance(aatb *AccountAgedTrialBalance) (i
return ids[0], nil
}

// CreateAccountAgedTrialBalance creates a new account.aged.trial.balance model and returns its id.
// CreateAccountAgedTrialBalances creates a new account.aged.trial.balance model and returns its id.
func (c *Client) CreateAccountAgedTrialBalances(aatbs []*AccountAgedTrialBalance) ([]int64, error) {
var vv []interface{}
for _, v := range aatbs {
Expand Down
Loading

0 comments on commit bdd9a88

Please sign in to comment.