From 75d7bbb46e100b7ffda091a11183d4ed14d3bbed Mon Sep 17 00:00:00 2001 From: Mahendra barad Date: Thu, 14 May 2015 15:31:34 +0530 Subject: [REF]Account: Refactoring the account, Change some fields name according to new api guidelines code improvement code improvement payment_method to payment_method_id writeoff_account to writeoff_account_id property_account_receivable to property_account_receivable_id property_account_payable to property_account_payable_id property_account_expense_categ to property_account_expense_categ_id property_account_income_categ to property_account_income_categ_id property_account_expense to property_account_expense_id property_account_income to property_account_income_id property_account_expense_categ fix sale_tax to sale_tax_id and default_sale_tax to default_sale_tax_id purchase_tax to purchase_tax_id and default_purchase_tax to default_purchase_tax_id ref_companies to ref_companies_ids property_account_position to property_account_position_id property_payment_term to property_payment_term_id property_supplier_payment_term to property_supplier_payment_term_id bank_accounts_id to bank_accounts_ids payment_method fix after rebase user_type after rebase payment_method fix after rebase after rebase invoice to invoice_id fix payment_method_id after rebase code improvement [IMP]user_type to user_type_id [IMP]property_stock_account_input_categ, property_stock_account_output_categ to _id [IMP]improve after rebase [IMP]fix type [IMP]Account: code improvement --- doc/api_integration.rst | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'doc/api_integration.rst') diff --git a/doc/api_integration.rst b/doc/api_integration.rst index 8c0cec49581..b191a741d4e 100644 --- a/doc/api_integration.rst +++ b/doc/api_integration.rst @@ -620,7 +620,7 @@ updating a record): "help": "BarCode", "string": "EAN13" }, - "property_account_position": { + "property_account_position_id": { "type": "many2one", "help": "The fiscal position will determine taxes and accounts used for the partner.", "string": "Fiscal Position" @@ -635,7 +635,7 @@ updating a record): "help": "", "string": "Geo Localization Date" }, - "ref_companies": { + "ref_company_ids": { "type": "one2many", "help": "", "string": "Companies that refers to partner" @@ -1257,15 +1257,15 @@ the workflow instance associated with the record. 'res.partner', 'search_read', [[('customer', '=', True)]], {'limit': 1, 'fields': [ - 'property_account_receivable', - 'property_payment_term', - 'property_account_position'] + 'property_account_receivable_id', + 'property_payment_term_id', + 'property_account_position_id'] })[0] invoice_id = models.execute_kw( db, uid, password, 'account.invoice', 'create', [{ 'partner_id': client['id'], - 'account_id': client['property_account_receivable'][0], + 'account_id': client['property_account_receivable_id'][0], 'invoice_line_ids': [(0, False, {'name': "AAA"})] }]) @@ -1281,15 +1281,15 @@ the workflow instance associated with the record. array( 'limit' => 1, 'fields' => array( - 'property_account_receivable', - 'property_payment_term', - 'property_account_position' + 'property_account_receivable_id', + 'property_payment_term_id', + 'property_account_position_id' )))[0]; $invoice_id = $models->execute_kw( $db, $uid, $password, 'account.invoice', 'create', array(array( 'partner_id' => $client['id'], - 'account_id' => $client['property_account_receivable'][0], + 'account_id' => $client['property_account_receivable_id'][0], 'invoice_line_ids' => array(array(0, false, array('name' => "AAA"))) ))); @@ -1304,13 +1304,13 @@ the workflow instance associated with the record. db, uid, password, 'res.partner', 'search_read', [[['customer', '=', true]]], - {limit: 1, fields: %w(property_account_receivable property_payment_term property_account_position)} + {limit: 1, fields: %w(property_account_receivable_id property_payment_term_id property_account_position_id)} )[0] invoice_id = models.execute_kw( db, uid, password, 'account.invoice', 'create', [{ partner_id: client['id'], - account_id: client['property_account_receivable'][0], + account_id: client['property_account_receivable_id'][0], invoice_line_ids: [[0, false, {name: "AAA"}]] }]) @@ -1330,9 +1330,9 @@ the workflow instance associated with the record. new HashMap() {{ put("limit", 1); put("fields", asList( - "property_account_receivable", - "property_payment_term", - "property_account_position" + "property_account_receivable_id", + "property_payment_term_id", + "property_account_position_id" )); }} )))[0]; @@ -1342,7 +1342,7 @@ the workflow instance associated with the record. "account.invoice", "create", asList(new HashMap() {{ put("partner_id", c.get("id")); - put("account_id", ((Object[])c.get("property_account_receivable"))[0]); + put("account_id", ((Object[])c.get("property_account_receivable_id"))[0]); put("invoice_line_ids", asList( asList(0, false, new HashMap() {{ put("name", "AAA"); -- cgit v1.2.3