From 883390863a2ec0663590c9908423c698be32fca3 Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Tue, 15 Sep 2015 14:55:28 +0200 Subject: [PATCH] [FIX] doc: upgrade_api: slight fix small fix in example for creating a request DB_SOURCE was not defined. FILENAME was to be used. Also reordered the fields so as to have the most important ones at the beginning. --- doc/reference/upgrade_api.rst | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/doc/reference/upgrade_api.rst b/doc/reference/upgrade_api.rst index 0581e2bf614..d136ce8314b 100644 --- a/doc/reference/upgrade_api.rst +++ b/doc/reference/upgrade_api.rst @@ -71,7 +71,7 @@ The list of errors. A list of dictionaries, each dictionary giving information about one particular error. Each dictionary can contain various keys depending of the type of error -but you will always get the *reason* and the *message* keys: +but you will always get the ``reason`` and the ``message`` keys: * ``reason``: the error type * ``message``: a human friendly message @@ -150,19 +150,17 @@ Here are 2 examples of database upgrade request creation using: CREATE_URL = "https://upgrade.odoo.com/database/v1/create" CONTRACT = "M123456-abcdef" - AIM = "test" - TARGET = "8.0" EMAIL = "john.doe@example.com" + TARGET = "8.0" + AIM = "test" FILENAME = "db_name.dump" - fields = dict([ - ('aim', AIM), - ('email', EMAIL), - ('filename', DB_SOURCE), + postfields = urlencode([ ('contract', CONTRACT), + ('email', EMAIL), ('target', TARGET), - ]) - postfields = urlencode(fields) + ('aim', AIM), + ('filename', FILENAME)]) c = pycurl.Curl() c.setopt(pycurl.URL, CREATE_URL)