@@ -20,7 +20,7 @@ type AccountAnalyticAccount struct {
2020	DisplayName               * String    `xmlrpc:"display_name,omptempty"` 
2121	Id                        * Int       `xmlrpc:"id,omptempty"` 
2222	LineIds                   * Relation  `xmlrpc:"line_ids,omptempty"` 
23- 	MachineProjectName         * String    `xmlrpc:"machine_project_name ,omptempty"` 
23+ 	MachineInitiativeName     * String    `xmlrpc:"machine_initiative_name ,omptempty"` 
2424	MessageChannelIds         * Relation  `xmlrpc:"message_channel_ids,omptempty"` 
2525	MessageFollowerIds        * Relation  `xmlrpc:"message_follower_ids,omptempty"` 
2626	MessageIds                * Relation  `xmlrpc:"message_ids,omptempty"` 
@@ -34,7 +34,6 @@ type AccountAnalyticAccount struct {
3434	Name                      * String    `xmlrpc:"name,omptempty"` 
3535	PartnerId                 * Many2One  `xmlrpc:"partner_id,omptempty"` 
3636	ProjectCount              * Int       `xmlrpc:"project_count,omptempty"` 
37- 	ProjectCreated            * Bool      `xmlrpc:"project_created,omptempty"` 
3837	ProjectIds                * Relation  `xmlrpc:"project_ids,omptempty"` 
3938	TagIds                    * Relation  `xmlrpc:"tag_ids,omptempty"` 
4039	WebsiteMessageIds         * Relation  `xmlrpc:"website_message_ids,omptempty"` 
@@ -55,7 +54,23 @@ func (aaa *AccountAnalyticAccount) Many2One() *Many2One {
5554
5655// CreateAccountAnalyticAccount creates a new account.analytic.account model and returns its id. 
5756func  (c  * Client ) CreateAccountAnalyticAccount (aaa  * AccountAnalyticAccount ) (int64 , error ) {
58- 	return  c .Create (AccountAnalyticAccountModel , aaa )
57+ 	ids , err  :=  c .Create (AccountAnalyticAccountModel , []interface {}{aaa })
58+ 	if  err  !=  nil  {
59+ 		return  - 1 , err 
60+ 	}
61+ 	if  len (ids ) ==  0  {
62+ 		return  - 1 , nil 
63+ 	}
64+ 	return  ids [0 ], nil 
65+ }
66+ 
67+ // CreateAccountAnalyticAccount creates a new account.analytic.account model and returns its id. 
68+ func  (c  * Client ) CreateAccountAnalyticAccounts (aaas  []* AccountAnalyticAccount ) ([]int64 , error ) {
69+ 	var  vv  []interface {}
70+ 	for  _ , v  :=  range  aaas  {
71+ 		vv  =  append (vv , v )
72+ 	}
73+ 	return  c .Create (AccountAnalyticAccountModel , vv )
5974}
6075
6176// UpdateAccountAnalyticAccount updates an existing account.analytic.account record. 
0 commit comments