over 9 years ago
This action ask the upgrade platform to process your database dump.
The process method is below
Use the below link to download the Dump Database
https://upgrade.odoo.com/database/v1/process
To process a database dump
Below are the Parameters
1-key (str) -- (required) your private key
2-request (str) -- (required) your request id
Below are the predefined keywords in dump database
Returns
request result
Return type
json dictionary
Example code is below-
- from urllib import urlencode
- from io import BytesIO
- import pycurl
- import json
- PROCESS_URL = "https://upgrade.odoo.com/database/v1/process"
- fields = dict([
- ('request', '10534'),
- ('key', 'Aw7pItGVKFuZ_FOR3U8VFQ=='),
- ])
- postfields = urlencode(fields)
- c = pycurl.Curl()
- c.setopt(pycurl.URL, PROCESS_URL)
- c.setopt(c.POSTFIELDS, postfields)
- data = BytesIO()
- c.setopt(c.WRITEFUNCTION, data.write)
- c.perform()
- # transform output into a dict:
- response = json.loads(data.getvalue())
- # get http status:
- http_code = c.getinfo(pycurl.HTTP_CODE)
- c.close()
from urllib import urlencode from io import BytesIO import pycurl import json PROCESS_URL = "https://upgrade.odoo.com/database/v1/process" fields = dict([ ('request', '10534'), ('key', 'Aw7pItGVKFuZ_FOR3U8VFQ=='), ]) postfields = urlencode(fields) c = pycurl.Curl() c.setopt(pycurl.URL, PROCESS_URL) c.setopt(c.POSTFIELDS, postfields) data = BytesIO() c.setopt(c.WRITEFUNCTION, data.write) c.perform() # transform output into a dict: response = json.loads(data.getvalue()) # get http status: http_code = c.getinfo(pycurl.HTTP_CODE) c.close()
Note-The request id and the private key are obtained using the process your request in Odoo server .
0 Comment(s)