Remove odoo glue script
We're adding more internal logic to this script and obviously it is not suitable to keep it in this repo anymore. In the future, it would be nice if we can make the quote as an API endpoint and put the odoo glue script logic as a part of that when using odoo as backend. Change-Id: I09a2ec0459f14903f6ac5f2a01a25a2f494e0b84
This commit is contained in:
parent
f5fcea6c9f
commit
6c69d161e9
3
odoo/.gitignore
vendored
3
odoo/.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
glue.ini
|
||||
*.pyc
|
||||
failed_tenants.txt
|
57
odoo/README
57
odoo/README
@ -1,57 +0,0 @@
|
||||
odoo-glue
|
||||
=========
|
||||
|
||||
This script includes the following 2 functions:
|
||||
|
||||
- Pulls usage data from distil for a tenant, and creates a matching quote in OpenERP/Odoo.
|
||||
- Updates quotation status according to some criteria.
|
||||
|
||||
dependencies
|
||||
------------
|
||||
|
||||
- odoorpc==0.4.2
|
||||
- distilclient==0.4.2 (from this source tree, or deb from Catalyst repo)
|
||||
- OpenStack credentials in environment for an admin user.
|
||||
- glue.ini adapted to your environment (see glue.ini.example)
|
||||
|
||||
Genertate quotations for all tenants
|
||||
------------------------------------
|
||||
|
||||
**IMPORTANT: MAKE SURE DISTIL'S USAGE COLLECTION IS UP TO DATE.**
|
||||
|
||||
Replace the --start, --end and logfile names appropriately:
|
||||
`start` should be the first instant inside the billing period (midnight UTC on the first day).
|
||||
`end` should be the first instant after the end of the billing period (midnight UTC on the first day after the end)
|
||||
The output will be useful in case anything goes wrong. An example::
|
||||
|
||||
$ ./odoo-glue.py quote --start 2014-09-01T00:00:00 --end 2014-10-01T00:00:00 1>~/distil-odoo-201409 2>&1
|
||||
|
||||
Update quotation status
|
||||
-----------------------
|
||||
|
||||
Updates status of some quotations from draft to new status(can be chosen from manual/cancel/draft) according to order_id, company name and/or tenant_id, please see the following examples.
|
||||
|
||||
Update status of all the quotations of a specified tenant to manual::
|
||||
|
||||
$ ./odoo-glue.py --debug update-quote -s manual -t <tenant_id>
|
||||
|
||||
Update status of a specified quotation to cancel::
|
||||
|
||||
$ ./odoo-glue.py --debug update-quote -s cancel --id <order_id>
|
||||
|
||||
*NOTE*: The ID param is NOT quotation number(something like SO1955), updating quotation status using ID is just for recovery in case of executing this command erroneously. You can find order ID in log.
|
||||
|
||||
Please refer to more detailed description about this command by running::
|
||||
|
||||
$ ./odoo-glue.py help update-quote
|
||||
|
||||
Check quotation duplication
|
||||
---------------------------
|
||||
|
||||
It is always good habit(and important) to double check if there are quotation duplications in Odoo.
|
||||
|
||||
This new command is designed for that purpose, regardless of the order status. It is highly recommended running this command every time right after the quotations are generated.
|
||||
|
||||
For example, if you want to check if duplication exists for Feb, 2016, you need to run::
|
||||
|
||||
$ ./odoo-glue.py check-duplicate 2016-02
|
@ -1,11 +0,0 @@
|
||||
[odoo]
|
||||
version=8.0
|
||||
hostname=localhost
|
||||
port=443
|
||||
protocol=jsonrpc+ssl
|
||||
database=test
|
||||
user=admin
|
||||
password=admin
|
||||
|
||||
[windows]
|
||||
partner_ref = Catalyst Cloud Partnership (Somebody)
|
1112
odoo/odoo-glue.py
1112
odoo/odoo-glue.py
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
||||
argparse==1.2.1
|
||||
odoorpc==0.4.2
|
||||
retrying>=1.3.3
|
||||
wsgiref==0.1.2
|
Loading…
x
Reference in New Issue
Block a user