Skip to content

Commit bdd9a88

Browse files
authored
fix: replace omptempty by omitempty in struct tag fields and fix some 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
1 parent 65da36b commit bdd9a88

File tree

357 files changed

+6851
-6851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

357 files changed

+6851
-6851
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ It is **highly recommanded** to not remove them, since you would not be able to
2727

2828
#### Custom skilld-labs models
2929

30-
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).
30+
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).
3131

3232
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.
3333

@@ -66,7 +66,7 @@ func main() {
6666
## Models
6767

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

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

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

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

175175
Here are available low level functions :
176176

account_abstract_payment.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ package odoo
22

33
// AccountAbstractPayment represents account.abstract.payment model.
44
type AccountAbstractPayment struct {
5-
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
6-
Amount *Float `xmlrpc:"amount,omptempty"`
7-
Communication *String `xmlrpc:"communication,omptempty"`
8-
CompanyId *Many2One `xmlrpc:"company_id,omptempty"`
9-
CurrencyId *Many2One `xmlrpc:"currency_id,omptempty"`
10-
DisplayName *String `xmlrpc:"display_name,omptempty"`
11-
HidePaymentMethod *Bool `xmlrpc:"hide_payment_method,omptempty"`
12-
Id *Int `xmlrpc:"id,omptempty"`
13-
JournalId *Many2One `xmlrpc:"journal_id,omptempty"`
14-
PartnerId *Many2One `xmlrpc:"partner_id,omptempty"`
15-
PartnerType *Selection `xmlrpc:"partner_type,omptempty"`
16-
PaymentDate *Time `xmlrpc:"payment_date,omptempty"`
17-
PaymentMethodCode *String `xmlrpc:"payment_method_code,omptempty"`
18-
PaymentMethodId *Many2One `xmlrpc:"payment_method_id,omptempty"`
19-
PaymentType *Selection `xmlrpc:"payment_type,omptempty"`
5+
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
6+
Amount *Float `xmlrpc:"amount,omitempty"`
7+
Communication *String `xmlrpc:"communication,omitempty"`
8+
CompanyId *Many2One `xmlrpc:"company_id,omitempty"`
9+
CurrencyId *Many2One `xmlrpc:"currency_id,omitempty"`
10+
DisplayName *String `xmlrpc:"display_name,omitempty"`
11+
HidePaymentMethod *Bool `xmlrpc:"hide_payment_method,omitempty"`
12+
Id *Int `xmlrpc:"id,omitempty"`
13+
JournalId *Many2One `xmlrpc:"journal_id,omitempty"`
14+
PartnerId *Many2One `xmlrpc:"partner_id,omitempty"`
15+
PartnerType *Selection `xmlrpc:"partner_type,omitempty"`
16+
PaymentDate *Time `xmlrpc:"payment_date,omitempty"`
17+
PaymentMethodCode *String `xmlrpc:"payment_method_code,omitempty"`
18+
PaymentMethodId *Many2One `xmlrpc:"payment_method_id,omitempty"`
19+
PaymentType *Selection `xmlrpc:"payment_type,omitempty"`
2020
}
2121

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

45-
// CreateAccountAbstractPayment creates a new account.abstract.payment model and returns its id.
45+
// CreateAccountAbstractPayments creates a new account.abstract.payment model and returns its id.
4646
func (c *Client) CreateAccountAbstractPayments(aaps []*AccountAbstractPayment) ([]int64, error) {
4747
var vv []interface{}
4848
for _, v := range aaps {

account_account.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@ package odoo
22

33
// AccountAccount represents account.account model.
44
type AccountAccount struct {
5-
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
6-
Code *String `xmlrpc:"code,omptempty"`
7-
CompanyId *Many2One `xmlrpc:"company_id,omptempty"`
8-
CreateDate *Time `xmlrpc:"create_date,omptempty"`
9-
CreateUid *Many2One `xmlrpc:"create_uid,omptempty"`
10-
CurrencyId *Many2One `xmlrpc:"currency_id,omptempty"`
11-
Deprecated *Bool `xmlrpc:"deprecated,omptempty"`
12-
DisplayName *String `xmlrpc:"display_name,omptempty"`
13-
GroupId *Many2One `xmlrpc:"group_id,omptempty"`
14-
Id *Int `xmlrpc:"id,omptempty"`
15-
InternalType *Selection `xmlrpc:"internal_type,omptempty"`
16-
LastTimeEntriesChecked *Time `xmlrpc:"last_time_entries_checked,omptempty"`
17-
Name *String `xmlrpc:"name,omptempty"`
18-
Note *String `xmlrpc:"note,omptempty"`
19-
OpeningCredit *Float `xmlrpc:"opening_credit,omptempty"`
20-
OpeningDebit *Float `xmlrpc:"opening_debit,omptempty"`
21-
Reconcile *Bool `xmlrpc:"reconcile,omptempty"`
22-
TagIds *Relation `xmlrpc:"tag_ids,omptempty"`
23-
TaxIds *Relation `xmlrpc:"tax_ids,omptempty"`
24-
UserTypeId *Many2One `xmlrpc:"user_type_id,omptempty"`
25-
WriteDate *Time `xmlrpc:"write_date,omptempty"`
26-
WriteUid *Many2One `xmlrpc:"write_uid,omptempty"`
5+
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
6+
Code *String `xmlrpc:"code,omitempty"`
7+
CompanyId *Many2One `xmlrpc:"company_id,omitempty"`
8+
CreateDate *Time `xmlrpc:"create_date,omitempty"`
9+
CreateUid *Many2One `xmlrpc:"create_uid,omitempty"`
10+
CurrencyId *Many2One `xmlrpc:"currency_id,omitempty"`
11+
Deprecated *Bool `xmlrpc:"deprecated,omitempty"`
12+
DisplayName *String `xmlrpc:"display_name,omitempty"`
13+
GroupId *Many2One `xmlrpc:"group_id,omitempty"`
14+
Id *Int `xmlrpc:"id,omitempty"`
15+
InternalType *Selection `xmlrpc:"internal_type,omitempty"`
16+
LastTimeEntriesChecked *Time `xmlrpc:"last_time_entries_checked,omitempty"`
17+
Name *String `xmlrpc:"name,omitempty"`
18+
Note *String `xmlrpc:"note,omitempty"`
19+
OpeningCredit *Float `xmlrpc:"opening_credit,omitempty"`
20+
OpeningDebit *Float `xmlrpc:"opening_debit,omitempty"`
21+
Reconcile *Bool `xmlrpc:"reconcile,omitempty"`
22+
TagIds *Relation `xmlrpc:"tag_ids,omitempty"`
23+
TaxIds *Relation `xmlrpc:"tax_ids,omitempty"`
24+
UserTypeId *Many2One `xmlrpc:"user_type_id,omitempty"`
25+
WriteDate *Time `xmlrpc:"write_date,omitempty"`
26+
WriteUid *Many2One `xmlrpc:"write_uid,omitempty"`
2727
}
2828

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

52-
// CreateAccountAccount creates a new account.account model and returns its id.
52+
// CreateAccountAccounts creates a new account.account model and returns its id.
5353
func (c *Client) CreateAccountAccounts(aas []*AccountAccount) ([]int64, error) {
5454
var vv []interface{}
5555
for _, v := range aas {

account_account_tag.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ package odoo
22

33
// AccountAccountTag represents account.account.tag model.
44
type AccountAccountTag struct {
5-
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
6-
Active *Bool `xmlrpc:"active,omptempty"`
7-
Applicability *Selection `xmlrpc:"applicability,omptempty"`
8-
Color *Int `xmlrpc:"color,omptempty"`
9-
CreateDate *Time `xmlrpc:"create_date,omptempty"`
10-
CreateUid *Many2One `xmlrpc:"create_uid,omptempty"`
11-
DisplayName *String `xmlrpc:"display_name,omptempty"`
12-
Id *Int `xmlrpc:"id,omptempty"`
13-
Name *String `xmlrpc:"name,omptempty"`
14-
WriteDate *Time `xmlrpc:"write_date,omptempty"`
15-
WriteUid *Many2One `xmlrpc:"write_uid,omptempty"`
5+
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
6+
Active *Bool `xmlrpc:"active,omitempty"`
7+
Applicability *Selection `xmlrpc:"applicability,omitempty"`
8+
Color *Int `xmlrpc:"color,omitempty"`
9+
CreateDate *Time `xmlrpc:"create_date,omitempty"`
10+
CreateUid *Many2One `xmlrpc:"create_uid,omitempty"`
11+
DisplayName *String `xmlrpc:"display_name,omitempty"`
12+
Id *Int `xmlrpc:"id,omitempty"`
13+
Name *String `xmlrpc:"name,omitempty"`
14+
WriteDate *Time `xmlrpc:"write_date,omitempty"`
15+
WriteUid *Many2One `xmlrpc:"write_uid,omitempty"`
1616
}
1717

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

41-
// CreateAccountAccountTag creates a new account.account.tag model and returns its id.
41+
// CreateAccountAccountTags creates a new account.account.tag model and returns its id.
4242
func (c *Client) CreateAccountAccountTags(aats []*AccountAccountTag) ([]int64, error) {
4343
var vv []interface{}
4444
for _, v := range aats {

account_account_template.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ package odoo
22

33
// AccountAccountTemplate represents account.account.template model.
44
type AccountAccountTemplate struct {
5-
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
6-
ChartTemplateId *Many2One `xmlrpc:"chart_template_id,omptempty"`
7-
Code *String `xmlrpc:"code,omptempty"`
8-
CreateDate *Time `xmlrpc:"create_date,omptempty"`
9-
CreateUid *Many2One `xmlrpc:"create_uid,omptempty"`
10-
CurrencyId *Many2One `xmlrpc:"currency_id,omptempty"`
11-
DisplayName *String `xmlrpc:"display_name,omptempty"`
12-
GroupId *Many2One `xmlrpc:"group_id,omptempty"`
13-
Id *Int `xmlrpc:"id,omptempty"`
14-
Name *String `xmlrpc:"name,omptempty"`
15-
Nocreate *Bool `xmlrpc:"nocreate,omptempty"`
16-
Note *String `xmlrpc:"note,omptempty"`
17-
Reconcile *Bool `xmlrpc:"reconcile,omptempty"`
18-
TagIds *Relation `xmlrpc:"tag_ids,omptempty"`
19-
TaxIds *Relation `xmlrpc:"tax_ids,omptempty"`
20-
UserTypeId *Many2One `xmlrpc:"user_type_id,omptempty"`
21-
WriteDate *Time `xmlrpc:"write_date,omptempty"`
22-
WriteUid *Many2One `xmlrpc:"write_uid,omptempty"`
5+
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
6+
ChartTemplateId *Many2One `xmlrpc:"chart_template_id,omitempty"`
7+
Code *String `xmlrpc:"code,omitempty"`
8+
CreateDate *Time `xmlrpc:"create_date,omitempty"`
9+
CreateUid *Many2One `xmlrpc:"create_uid,omitempty"`
10+
CurrencyId *Many2One `xmlrpc:"currency_id,omitempty"`
11+
DisplayName *String `xmlrpc:"display_name,omitempty"`
12+
GroupId *Many2One `xmlrpc:"group_id,omitempty"`
13+
Id *Int `xmlrpc:"id,omitempty"`
14+
Name *String `xmlrpc:"name,omitempty"`
15+
Nocreate *Bool `xmlrpc:"nocreate,omitempty"`
16+
Note *String `xmlrpc:"note,omitempty"`
17+
Reconcile *Bool `xmlrpc:"reconcile,omitempty"`
18+
TagIds *Relation `xmlrpc:"tag_ids,omitempty"`
19+
TaxIds *Relation `xmlrpc:"tax_ids,omitempty"`
20+
UserTypeId *Many2One `xmlrpc:"user_type_id,omitempty"`
21+
WriteDate *Time `xmlrpc:"write_date,omitempty"`
22+
WriteUid *Many2One `xmlrpc:"write_uid,omitempty"`
2323
}
2424

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

48-
// CreateAccountAccountTemplate creates a new account.account.template model and returns its id.
48+
// CreateAccountAccountTemplates creates a new account.account.template model and returns its id.
4949
func (c *Client) CreateAccountAccountTemplates(aats []*AccountAccountTemplate) ([]int64, error) {
5050
var vv []interface{}
5151
for _, v := range aats {

account_account_type.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ package odoo
22

33
// AccountAccountType represents account.account.type model.
44
type AccountAccountType struct {
5-
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
6-
CreateDate *Time `xmlrpc:"create_date,omptempty"`
7-
CreateUid *Many2One `xmlrpc:"create_uid,omptempty"`
8-
DisplayName *String `xmlrpc:"display_name,omptempty"`
9-
Id *Int `xmlrpc:"id,omptempty"`
10-
IncludeInitialBalance *Bool `xmlrpc:"include_initial_balance,omptempty"`
11-
Name *String `xmlrpc:"name,omptempty"`
12-
Note *String `xmlrpc:"note,omptempty"`
13-
Type *Selection `xmlrpc:"type,omptempty"`
14-
WriteDate *Time `xmlrpc:"write_date,omptempty"`
15-
WriteUid *Many2One `xmlrpc:"write_uid,omptempty"`
5+
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
6+
CreateDate *Time `xmlrpc:"create_date,omitempty"`
7+
CreateUid *Many2One `xmlrpc:"create_uid,omitempty"`
8+
DisplayName *String `xmlrpc:"display_name,omitempty"`
9+
Id *Int `xmlrpc:"id,omitempty"`
10+
IncludeInitialBalance *Bool `xmlrpc:"include_initial_balance,omitempty"`
11+
Name *String `xmlrpc:"name,omitempty"`
12+
Note *String `xmlrpc:"note,omitempty"`
13+
Type *Selection `xmlrpc:"type,omitempty"`
14+
WriteDate *Time `xmlrpc:"write_date,omitempty"`
15+
WriteUid *Many2One `xmlrpc:"write_uid,omitempty"`
1616
}
1717

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

41-
// CreateAccountAccountType creates a new account.account.type model and returns its id.
41+
// CreateAccountAccountTypes creates a new account.account.type model and returns its id.
4242
func (c *Client) CreateAccountAccountTypes(aats []*AccountAccountType) ([]int64, error) {
4343
var vv []interface{}
4444
for _, v := range aats {

account_aged_trial_balance.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ package odoo
22

33
// AccountAgedTrialBalance represents account.aged.trial.balance model.
44
type AccountAgedTrialBalance struct {
5-
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
6-
CompanyId *Many2One `xmlrpc:"company_id,omptempty"`
7-
CreateDate *Time `xmlrpc:"create_date,omptempty"`
8-
CreateUid *Many2One `xmlrpc:"create_uid,omptempty"`
9-
DateFrom *Time `xmlrpc:"date_from,omptempty"`
10-
DateTo *Time `xmlrpc:"date_to,omptempty"`
11-
DisplayName *String `xmlrpc:"display_name,omptempty"`
12-
Id *Int `xmlrpc:"id,omptempty"`
13-
JournalIds *Relation `xmlrpc:"journal_ids,omptempty"`
14-
PeriodLength *Int `xmlrpc:"period_length,omptempty"`
15-
ResultSelection *Selection `xmlrpc:"result_selection,omptempty"`
16-
TargetMove *Selection `xmlrpc:"target_move,omptempty"`
17-
WriteDate *Time `xmlrpc:"write_date,omptempty"`
18-
WriteUid *Many2One `xmlrpc:"write_uid,omptempty"`
5+
LastUpdate *Time `xmlrpc:"__last_update,omitempty"`
6+
CompanyId *Many2One `xmlrpc:"company_id,omitempty"`
7+
CreateDate *Time `xmlrpc:"create_date,omitempty"`
8+
CreateUid *Many2One `xmlrpc:"create_uid,omitempty"`
9+
DateFrom *Time `xmlrpc:"date_from,omitempty"`
10+
DateTo *Time `xmlrpc:"date_to,omitempty"`
11+
DisplayName *String `xmlrpc:"display_name,omitempty"`
12+
Id *Int `xmlrpc:"id,omitempty"`
13+
JournalIds *Relation `xmlrpc:"journal_ids,omitempty"`
14+
PeriodLength *Int `xmlrpc:"period_length,omitempty"`
15+
ResultSelection *Selection `xmlrpc:"result_selection,omitempty"`
16+
TargetMove *Selection `xmlrpc:"target_move,omitempty"`
17+
WriteDate *Time `xmlrpc:"write_date,omitempty"`
18+
WriteUid *Many2One `xmlrpc:"write_uid,omitempty"`
1919
}
2020

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

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

0 commit comments

Comments
 (0)