19 lines
495 B
Python
19 lines
495 B
Python
import os
|
|
from sabatron_tryton_rpc_client.client import Client
|
|
import datetime
|
|
|
|
client = Client(
|
|
hostname=os.environ.get("TRYTON_HOSTNAME", "localhost"),
|
|
database=os.environ.get("TRYTON_DATABASE", "tryton"),
|
|
username=os.environ.get("TRYTON_USERNAME", "admin"),
|
|
password=os.environ.get("TRYTON_PASSWORD", ""),
|
|
port=int(os.environ.get("TRYTON_PORT", 8000)),
|
|
)
|
|
|
|
client.connect()
|
|
|
|
name = "model.party.party.read"
|
|
args = ([1], ["id", "name", "code"], {})
|
|
|
|
client.call(name, args)
|