Skip to main content

Integration Sap

Project description

django-sap

Starting

These instructions will allow you to install the library in your python project.

Current features

  • Send invoice reserve.
  • Send incoming payment.

Pre-requisitos

  • Python >= 3.7
  • Django >= 3
  • requests >= 2

Installation

  1. To get the latest stable release from PyPi:
pip install django-sap

or

  1. From a build
git clone https://gitlab.com/linets/ecommerce/oms/integrations/oms-sap
cd {{project}}
python setup.py sdist

and, install in your project django

pip install {{path}}/oms-sap/dist/{{tar.gz file}}
  1. Settings in django project
DJANGO_SAP = {
    'SAP': {
        'BASE_URL': '<SAP_BASE_URL>',
        'USERNAME': '<SAP_USERNAME>',
        'PASSWORD': '<SAP_PASSWORD>',
        'COMPANY_DB': '<SAP_COMPANY_DB>',
        'SERIE': '<SAP_SERIE>',
        'CARD_CODE': '<SAP_CARD_CODE>',
        'WAREHOUSE_CODE': '<SAP_WAREHOUSE_CODE>',
        'TAX_CODE': '<SAP_TAX_CODE>',
        'COSTING_CODE': '<SAP_COSTING_CODE>',
        'COSTING_CODE2': '<SAP_COSTING_CODE2>',
        'COSTING_CODE3': '<SAP_COSTING_CODE3>',
        'INDICATOR': '<SAP_INDICATOR>',
        'RESERVE_INVOICE': '<SAP_RESERVE_INVOICE>',
        'U_TIPO_PED_WMS': '<SAP_U_TIPO_PED_WMS>',
    }
}

Usage

  1. Send invoice reserve:
from sap.handler import SapHandler

handler = SapHandler()

default_data = handler.default_payload_invoice_reserve(instance)
response = handler.send_invoice_reserve(default_data)
  1. Send incoming payment:
from sap.handler import SapHandler

handler = SapHandler()

default_data = handler.default_payload_incoming_payment(instance)
response = handler.send_incoming_payment(default_data)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-sap-1.0.0.tar.gz (5.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page