From 37e96a471c229d18ba4a4d2fb8779833e218c095 Mon Sep 17 00:00:00 2001 From: aserrador Date: Wed, 18 Mar 2026 22:46:14 -0500 Subject: [PATCH] refactor: move test_rpc.ipynb to tools/ and add to gitignore --- .gitignore | 6 ++ test_rpc.ipynb | 285 ------------------------------------------------- 2 files changed, 6 insertions(+), 285 deletions(-) delete mode 100644 test_rpc.ipynb diff --git a/.gitignore b/.gitignore index 9feb4be..1696eac 100644 --- a/.gitignore +++ b/.gitignore @@ -187,3 +187,9 @@ pyvenv.cfg pip-selfcheck.json # End of https://www.toptal.com/developers/gitignore/api/python,venv + +# Development tools +tools/ + +# Jupyter Notebook (can contain sensitive data/outputs) +*.ipynb diff --git a/test_rpc.ipynb b/test_rpc.ipynb deleted file mode 100644 index b3781bb..0000000 --- a/test_rpc.ipynb +++ /dev/null @@ -1,285 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "f1899961", - "metadata": {}, - "outputs": [], - "source": [ - "from sabatron_tryton_rpc_client.client import Client\n", - "\n", - "client = Client(\n", - " hostname='dev.naliia.co',\n", - " database='capacitacion',\n", - " username='admin',\n", - " password='admin'\n", - ")\n", - "\n", - "client.connect()" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "dfb1eac0", - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "\n", - "# [{}]\n", - "example_schedule = [{\n", - " 'professional': 6,\n", - " 'description': \"Bien Bonito Todo!\",\n", - " 'customer': 4,\n", - " 'date': datetime.datetime(2026, 1, 29, 14, 15),\n", - " 'service_center': 11\n", - "}]" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "29e77a34", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[{'id': 1, 'name': 'Spring Nails', 'code': '1'}]" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "name = 'model.party.party.read'\n", - "args = ([1], ['id', 'name', 'code'], {})\n", - "\n", - "client.call(name, args)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "c0546146", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[41]" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "name = \"model.naliia.schedule.create\"\n", - "args = [example_schedule, {}]\n", - "\n", - "client.call(name, args)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "08405a63", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[{'id': 11,\n", - " 'name': 'Campo Amor',\n", - " 'address.': {'id': 1, 'street': 'Carrera 54 # 7-15, Campo Amor'}}]" - ] - }, - "execution_count": 135, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "name = \"model.naliia.service_center.search_read\"\n", - "args = [[[]], 0, None, None, ['name','address.street'], {}]\n", - "\n", - "client.call(name, args)" - ] - }, - { - "cell_type": "code", - "execution_count": 139, - "id": "eaa93853", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[{'description': None,\n", - " 'id': 1,\n", - " 'name': 'Acrilico Esculpido',\n", - " 'list_price': Decimal('98000')},\n", - " {'description': None,\n", - " 'id': 2,\n", - " 'name': 'Base Ruber',\n", - " 'list_price': Decimal('68000')},\n", - " {'description': None,\n", - " 'id': 3,\n", - " 'name': 'Dipping',\n", - " 'list_price': Decimal('63000')},\n", - " {'description': None,\n", - " 'id': 4,\n", - " 'name': 'Forrado en acrilico',\n", - " 'list_price': Decimal('78000')},\n", - " {'description': None,\n", - " 'id': 5,\n", - " 'name': 'Manos semipermanente',\n", - " 'list_price': Decimal('48000')},\n", - " {'description': None,\n", - " 'id': 6,\n", - " 'name': 'Manos semipermanente con decorado',\n", - " 'list_price': Decimal('48000')},\n", - " {'description': '',\n", - " 'id': 28,\n", - " 'name': 'Manos semipermanentes sin decordo hombre',\n", - " 'list_price': Decimal('33000')},\n", - " {'description': None,\n", - " 'id': 8,\n", - " 'name': 'Manos tradicionales',\n", - " 'list_price': Decimal('28000')},\n", - " {'description': None,\n", - " 'id': 29,\n", - " 'name': 'Manos tradicionales',\n", - " 'list_price': Decimal('25000')},\n", - " {'description': None,\n", - " 'id': 9,\n", - " 'name': 'Pestalas efecto natural',\n", - " 'list_price': Decimal('95000')},\n", - " {'description': None,\n", - " 'id': 10,\n", - " 'name': 'Pestañas 2D',\n", - " 'list_price': Decimal('110000')},\n", - " {'description': None,\n", - " 'id': 12,\n", - " 'name': 'Pestañas efecto pestañina',\n", - " 'list_price': Decimal('105000')},\n", - " {'description': None,\n", - " 'id': 13,\n", - " 'name': 'Pestañas tecnológicas',\n", - " 'list_price': Decimal('120000')},\n", - " {'description': None,\n", - " 'id': 14,\n", - " 'name': 'Pies semipermanentes',\n", - " 'list_price': Decimal('38000')},\n", - " {'description': None,\n", - " 'id': 30,\n", - " 'name': 'Pies semipermanentes',\n", - " 'list_price': Decimal('36000')},\n", - " {'description': None,\n", - " 'id': 15,\n", - " 'name': 'Pies tradicionales',\n", - " 'list_price': Decimal('30000')},\n", - " {'description': None,\n", - " 'id': 31,\n", - " 'name': 'Pies tradicionales',\n", - " 'list_price': Decimal('30000')},\n", - " {'description': None,\n", - " 'id': 16,\n", - " 'name': 'Poly gel',\n", - " 'list_price': Decimal('98000')},\n", - " {'description': None,\n", - " 'id': 17,\n", - " 'name': 'Press on',\n", - " 'list_price': Decimal('88000')},\n", - " {'description': None,\n", - " 'id': 18,\n", - " 'name': 'Retiro Forrado en acrílico',\n", - " 'list_price': Decimal('10000')},\n", - " {'description': None,\n", - " 'id': 19,\n", - " 'name': 'Retiro Press on',\n", - " 'list_price': Decimal('20000')},\n", - " {'description': None,\n", - " 'id': 33,\n", - " 'name': 'Retiro Press on',\n", - " 'list_price': Decimal('10000')},\n", - " {'description': None,\n", - " 'id': 20,\n", - " 'name': 'Retiro semipermanente',\n", - " 'list_price': Decimal('10000')},\n", - " {'description': None,\n", - " 'id': 32,\n", - " 'name': 'Retiro semipermanente',\n", - " 'list_price': Decimal('5000')},\n", - " {'description': None,\n", - " 'id': 21,\n", - " 'name': 'Retoque Acrílico esculpido',\n", - " 'list_price': Decimal('78000')},\n", - " {'description': None,\n", - " 'id': 22,\n", - " 'name': 'Retoque de pestañas 15 días',\n", - " 'list_price': Decimal('53000')},\n", - " {'description': None,\n", - " 'id': 26,\n", - " 'name': 'Retoque de pestañas 20 días',\n", - " 'list_price': Decimal('63000')},\n", - " {'description': None,\n", - " 'id': 23,\n", - " 'name': 'Retoque de pestañas tecnológicas y 2D 15 días',\n", - " 'list_price': Decimal('60000')},\n", - " {'description': None,\n", - " 'id': 27,\n", - " 'name': 'Retoque de pestañas tecnológicas y 2D 20 días',\n", - " 'list_price': Decimal('70000')},\n", - " {'description': None,\n", - " 'id': 24,\n", - " 'name': 'Retoque Forrado en acrílico',\n", - " 'list_price': Decimal('68000')},\n", - " {'description': None,\n", - " 'id': 25,\n", - " 'name': 'Retoque Press on',\n", - " 'list_price': Decimal('68000')}]" - ] - }, - "execution_count": 139, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "name = \"model.product.product.search_read\"\n", - "args = [[['active', '=', True], ['salable', '=', True]], 0, None, None, ['name','list_price', 'description'], {'company': 1}]\n", - "\n", - "client.call(name, args)\n", - "\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "TrytonMCP", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.14.3" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}