Se realizan los ajustes para la actualizacion del repo DonConfia_Dev
This commit is contained in:
@@ -5,7 +5,7 @@ import json
|
|||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
||||||
url = "http://192.168.0.25:8000"
|
url = "http://live.dev:8000"
|
||||||
key = "9a9ffc430146447d81e6698240199a4be2b0e774cb18474999d0f60e33b5b1eb1cfff9d9141346a98844879b5a9e787489c891ddc8fb45cc903b7244cab64fb1"
|
key = "9a9ffc430146447d81e6698240199a4be2b0e774cb18474999d0f60e33b5b1eb1cfff9d9141346a98844879b5a9e787489c891ddc8fb45cc903b7244cab64fb1"
|
||||||
db = "tryton"
|
db = "tryton"
|
||||||
application_name = "sale_don_confiao"
|
application_name = "sale_don_confiao"
|
||||||
@@ -55,7 +55,6 @@ def search_products(product_name: str) -> str:
|
|||||||
id_unit_measurement = product["default_uom."]["id"]
|
id_unit_measurement = product["default_uom."]["id"]
|
||||||
|
|
||||||
precios += f"- id: {id} - Nombre: {name}: ${precio} - ID Unidad de Medida: {id_unit_measurement}\n"
|
precios += f"- id: {id} - Nombre: {name}: ${precio} - ID Unidad de Medida: {id_unit_measurement}\n"
|
||||||
|
|
||||||
|
|
||||||
return precios
|
return precios
|
||||||
|
|
||||||
@@ -79,7 +78,6 @@ def check_price(product_name: str) -> str:
|
|||||||
return precios
|
return precios
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
def check_availability(product_name: str) -> str:
|
def check_availability(product_name: str) -> str:
|
||||||
"""
|
"""
|
||||||
@@ -99,7 +97,6 @@ def check_availability(product_name: str) -> str:
|
|||||||
return disponibilidad
|
return disponibilidad
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
def get_product_details(product_name: str) -> str:
|
def get_product_details(product_name: str) -> str:
|
||||||
"""
|
"""
|
||||||
@@ -111,12 +108,12 @@ def get_product_details(product_name: str) -> str:
|
|||||||
stock_status = "En stock" if product["stock"] > 0 else "Agotado"
|
stock_status = "En stock" if product["stock"] > 0 else "Agotado"
|
||||||
return f"""
|
return f"""
|
||||||
Detalles del producto:
|
Detalles del producto:
|
||||||
- Producto: {product['producto']}
|
- Producto: {product["producto"]}
|
||||||
- Categoría: {product['categoria']}
|
- Categoría: {product["categoria"]}
|
||||||
- Unidad de medida: {product['unidad']}
|
- Unidad de medida: {product["unidad"]}
|
||||||
- id unidad de medida: {product["default_uom."]["id"]}
|
- id unidad de medida: {product["default_uom."]["id"]}
|
||||||
- Precio: ${product['precio']:,}
|
- Precio: ${product["precio"]:,}
|
||||||
- Estado: {stock_status} ({product['stock']} unidades)
|
- Estado: {stock_status} ({product["stock"]} unidades)
|
||||||
"""
|
"""
|
||||||
return f"No se encontró el producto '{product_name}' en nuestro catálogo."
|
return f"No se encontró el producto '{product_name}' en nuestro catálogo."
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from typing import Optional, List
|
|||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
|
|
||||||
url = "http://192.168.0.25:8000"
|
url = "http://live.dev:8000"
|
||||||
key = "9a9ffc430146447d81e6698240199a4be2b0e774cb18474999d0f60e33b5b1eb1cfff9d9141346a98844879b5a9e787489c891ddc8fb45cc903b7244cab64fb1"
|
key = "9a9ffc430146447d81e6698240199a4be2b0e774cb18474999d0f60e33b5b1eb1cfff9d9141346a98844879b5a9e787489c891ddc8fb45cc903b7244cab64fb1"
|
||||||
db = "tryton"
|
db = "tryton"
|
||||||
application_name = "sale_don_confiao"
|
application_name = "sale_don_confiao"
|
||||||
@@ -11,7 +11,7 @@ url_don_confiao = "{}/{}/{}".format(url, db, application_name)
|
|||||||
url_order = "{}/{}/{}".format(url, db, "sale_order")
|
url_order = "{}/{}/{}".format(url, db, "sale_order")
|
||||||
|
|
||||||
|
|
||||||
#@tool
|
@tool
|
||||||
def create_party(
|
def create_party(
|
||||||
party_full_name: str,
|
party_full_name: str,
|
||||||
contact_method_type: str,
|
contact_method_type: str,
|
||||||
@@ -19,18 +19,18 @@ def create_party(
|
|||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Crea un nuevo cliente (party) en el sistema.
|
Crea un nuevo cliente (party) en el sistema.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
party_full_name (str): Nombre completo del cliente.
|
party_full_name (str): Nombre completo del cliente.
|
||||||
contact_method_type (str): Tipo de método de contacto (ej. 'email', 'phone').
|
contact_method_type (str): Tipo de método de contacto (ej. 'email', 'phone').
|
||||||
contact_method_value (str): Valor del método de contacto (ej. dirección de email o número de teléfono).
|
contact_method_value (str): Valor del método de contacto (ej. dirección de email o número de teléfono).
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
requests.Response: La respuesta del servidor que contiene la información del cliente creado.
|
requests.Response: La respuesta del servidor que contiene la información del cliente creado.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
url = "http://192.168.0.25:8000"
|
url = "http://live.dev:8000"
|
||||||
key = "9a9ffc430146447d81e6698240199a4be2b0e774cb18474999d0f60e33b5b1eb1cfff9d9141346a98844879b5a9e787489c891ddc8fb45cc903b7244cab64fb1"
|
key = "9a9ffc430146447d81e6698240199a4be2b0e774cb18474999d0f60e33b5b1eb1cfff9d9141346a98844879b5a9e787489c891ddc8fb45cc903b7244cab64fb1"
|
||||||
db = "tryton"
|
db = "tryton"
|
||||||
application_name = "sale_don_confiao"
|
application_name = "sale_don_confiao"
|
||||||
|
|||||||
10
delete_db_speco.sh
Executable file
10
delete_db_speco.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
docker stop donconfia_dev-live.dev-1
|
||||||
|
# Elimina la base de datos
|
||||||
|
docker exec -it --user root donconfia_dev-db.dev-1 dropdb -U tryton tryton
|
||||||
|
# Crea la base de datos
|
||||||
|
docker exec -it --user root donconfia_dev-db.dev-1 createdb -U tryton tryton
|
||||||
|
# Poblar base de datos
|
||||||
|
docker exec -i --user root donconfia_dev-db.dev-1 psql -U tryton tryton <./don_confiao_tryton.dump
|
||||||
|
# cd speco_dev
|
||||||
|
rake live:restart
|
||||||
237817
don_confiao_tryton.dump
Normal file
237817
don_confiao_tryton.dump
Normal file
File diff suppressed because one or more lines are too long
Submodule modules/sale_order updated: d7f746db0a...09cabd6798
1
respaldo.sh
Executable file
1
respaldo.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
docker exec -it --user root donconfia_dev-db.dev-1 pg_dump -U tryton tryton > don_confiao_tryton.dump
|
||||||
Reference in New Issue
Block a user