Stav 23.06.2026

This commit is contained in:
2026-06-23 15:20:56 +02:00
commit 6d91e83e8c
5670 changed files with 1145969 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#replace ceniku na jeden request
import tst_data
import api_call
from pydantic import SecretStr
# ---------- vytvoření testovacího ceníku ----------
cenik = tst_data.create_tst_cenik("01")
for p in cenik.cenpol:
for pos in p.pos_pc:
print(p.d_name, pos.page, pos.line, pos.col)
# ---------- API context ----------
def get_ctx():
ctx = api_call.ApiContext(
user="Alto",
base_url="http://127.0.0.1:8000",
refresh_url="http://127.0.0.1:8000",
client_id="99",
id_kas="01",
username="Kobrle",
password=SecretStr("heslo"),
)
return ctx
ctx = get_ctx()
# ---------- login ----------
api_call.login_API(ctx)
# ---------- načtení setup ----------
setup = api_call.load_setup_API(ctx)
# ---------- uložení CELÉHO ceníku ----------
api_call.debugrepl2_cenik_API(
ctx,
cenik.cenpol # ← list[CenPolCreate]
)