from idempierewsc.net import WebServiceConnection from idempierewsc.base import Field from ui.models import * import pymssql import time ad_url = 'http://apps.sisierp.id/' login = LoginRequest() login.client_id = 1000003 login.org_id = 1000006 login.role_id = 1000196 login.password = '******' login.user = '******' login.warehouse_id = 1000009 if True: ws = UpdateDataRequest() ws.web_service_type = 'ActivateEBatchLoadLine' ws.record_id = 1033324 ws.login = login ws.data_row = [Field('IsActive', 'Y')] wsc = WebServiceConnection() wsc.url = ad_url wsc.attempts = 1 wsc.app_name = 'ActivateEBatchLoadLine' response = wsc.send_request(ws)
from idempierewsc.request import CompositeOperationRequest from idempierewsc.enums import WebServiceResponseStatus from idempierewsc.net import WebServiceConnection from random import randint import traceback url = 'https://test.idempiere.org' urls = 'https://test.idempiere.org' # CREATE LOGIN login = LoginRequest() login.client_id = 11 login.org_id = 0 login.role_id = 102 login.warehouse_id = 50002 # CREATE WEBSERVICE FOR IMAGE path_image = '../documents/idempiere-logo.png' ws1 = CreateDataRequest() ws1.web_service_type = 'CreateImageTest' ws1.data_row.append(Field('Name', 'idempiere-logo.png')) ws1.data_row.append( Field('Description', 'Test Create BPartner and Logo with Python')) # CREATE BINARY FIELD binary_field = Field('BinaryData') with open(path_image, 'rb') as file: binary_field.set_byte_value(file.read()) ws1.data_row.append(binary_field)