Script to extract sales invoices from Openbravo and submit them via the Banqup API by Unifiedpost.
This repo is mirrored at https://gitlab.com/kikobar/org.openbravo.kikobar.banqup and https://github.com/kikobar/org.openbravo.kikobar.banqup
cache | ||
.gitignore | ||
__init__.py | ||
api.py | ||
authhandler.py | ||
cachehandler.py | ||
config-sample.py | ||
extract_invoice.py | ||
get_token.py | ||
LICENSE | ||
README.md | ||
retrieve_debtor.py |
Objective
This project attempts to extract data from Openbravo to generate a JSON to submit to the Banqup API of Unifiedpost.
Requirements
- Python installed on the machine running this application
- Credentials for accessing an Openbravo 3+ instance running with the REST API enabled
- The role in Openbravo used for the extraction/integration must have read access to 'Sales Invoices' and 'Product' via web services.
- Credentials for accessing the Banqup API by Unifiedpost
- Add the businessPartner id to the 'Customer code' of the customer on the 'Customers & Suppliers' section of the Banqup portal - This is critical, this programs requires this field to extract some parameters that only exist in the Banqup platform
How to run this application
- Copy the file
config-sample.py
toconfig.py
- Edit
config.py
with your credentials for Openbravo and Banqup - Run
python3 extract_invoice.py <documentNo>
Where <documentNo>
is the human readable invoice number in Openbravo.