lambda-erp 0.7.0__tar.gz → 0.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/PKG-INFO +1 -1
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/chat.py +13 -1
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/services.py +4 -1
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/pyproject.toml +1 -1
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/.gitignore +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/LICENSE +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/README.md +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/attachments.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/auth.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/bootstrap.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/demo_limits.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/deps.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/errors.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/main.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/oauth.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/pdf.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/providers.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/remarks_md.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/accounting.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/admin.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/analytics.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/bank_reconciliation.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/chat_api.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/documents.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/masters.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/mcp.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/proposals.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/reports.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/routers/setup.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/templates/document.html +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/api/templates/proposal.html +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/docs/agents/README.md +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/frontend/LICENSE +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/frontend/README.md +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/frontend/src/api/client.ts +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/bank_transaction.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/budget.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/chart_of_accounts.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/general_ledger.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/journal_entry.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/payment_entry.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/pos_invoice.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/purchase_invoice.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/revaluation.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/sales_invoice.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/engine.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/pack.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/packs/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/packs/ch.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/packs/de_common.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/packs/de_skr03.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/packs/de_skr04.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/packs/generic.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/profiles.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/setup/spine.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/accounting/subscription.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/assets/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/assets/asset.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/assets/reservation.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/buying/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/buying/purchase_order.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/controllers/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/controllers/currency.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/controllers/defaults.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/controllers/pricing_rule.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/controllers/taxes_and_totals.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/database.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/exceptions.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/hooks.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/model.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/selling/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/selling/proposal.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/selling/quotation.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/selling/sales_order.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/simulation.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/stock/__init__.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/stock/delivery_note.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/stock/purchase_receipt.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/stock/stock_entry.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/stock/stock_ledger.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/lambda_erp/utils.py +0 -0
- {lambda_erp-0.7.0 → lambda_erp-0.7.1}/terraform/README.md +0 -0
|
@@ -467,7 +467,7 @@ TOOLS = [
|
|
|
467
467
|
"type": "object",
|
|
468
468
|
"properties": {
|
|
469
469
|
"doctype": {"type": "string", "enum": DOCUMENT_SLUGS, "description": "Document type slug"},
|
|
470
|
-
"filters": {"type": "object", "description": "Optional filters on any column. Equality: {\"status\": \"Draft\", \"customer\": \"CUST-001\"}. Comparison (value = a 2-item array [op, value]): {\"grand_total\": [\">\", 100]}, {\"fit\": [\"!=\", \"A\"]}. NULL checks (1-item array): {\"fit\": [\"is null\"]}, {\"main_email\": [\"is not null\"]}. Allowed ops: =, !=, >, <, >=, <=, like, not like, is null, is not null.", "default": {}},
|
|
470
|
+
"filters": {"type": "object", "description": "Optional filters on any column. Equality: {\"status\": \"Draft\", \"customer\": \"CUST-001\"}. Comparison (value = a 2-item array [op, value]): {\"grand_total\": [\">\", 100]}, {\"fit\": [\"!=\", \"A\"]}. NULL checks (1-item array): {\"fit\": [\"is null\"]}, {\"main_email\": [\"is not null\"]}. Allowed ops: =, !=, >, <, >=, <=, like, not like, is null, is not null. Free-text search: {\"search\": \"acme\"} matches the doctype's default text columns; narrow it with {\"search\": \"acme\", \"search_fields\": [\"company_name\", \"tags\"]}.", "default": {}},
|
|
471
471
|
"order_by": {"type": "string", "description": "Optional column to sort by (e.g. \"occurred_at\" for a timeline). Defaults to creation."},
|
|
472
472
|
"order": {"type": "string", "enum": ["asc", "desc"], "description": "Sort direction (default desc)", "default": "desc"},
|
|
473
473
|
"limit": {"type": "integer", "description": "Max results (default 20, max 500)", "default": 20},
|
|
@@ -1317,6 +1317,18 @@ def _handle_list_documents(args):
|
|
|
1317
1317
|
# within the tool-result budget. Use get_document to drill into one doc.
|
|
1318
1318
|
doctype = args["doctype"]
|
|
1319
1319
|
filters = args.get("filters") or {}
|
|
1320
|
+
# Chat callers routinely pass `search` but omit `search_fields`; with no fields
|
|
1321
|
+
# the free-text search silently no-ops and returns the newest N by creation
|
|
1322
|
+
# (2026-08-13: tag lookups on leads "found nothing"). Default the columns to the
|
|
1323
|
+
# doctype's registered chat fields so document search matches a record the way
|
|
1324
|
+
# search_masters already does for masters. The frontend never hits this — its
|
|
1325
|
+
# UI config always sends search_fields.
|
|
1326
|
+
if filters.get("search") and not filters.get("search_fields"):
|
|
1327
|
+
registered = (services.CHAT_DOCTYPES.get(doctype) or {}).get("fields") or []
|
|
1328
|
+
valid = set(services.document_columns(doctype) or [])
|
|
1329
|
+
default_fields = [f for f in registered if f in valid]
|
|
1330
|
+
if default_fields:
|
|
1331
|
+
filters = {**filters, "search_fields": default_fields}
|
|
1320
1332
|
err = _validate_filter_columns(doctype, filters)
|
|
1321
1333
|
if err:
|
|
1322
1334
|
return {"error": err}
|
|
@@ -483,7 +483,10 @@ def _search_clause(db, doctype: str, doctype_slug: str, search, search_fields):
|
|
|
483
483
|
parts, params = [], []
|
|
484
484
|
for f in (search_fields or []):
|
|
485
485
|
if f in cols:
|
|
486
|
-
|
|
486
|
+
# CAST to text so non-text search_fields (e.g. an int/bool column a
|
|
487
|
+
# caller names) don't blow up Postgres with "lower(integer) does not
|
|
488
|
+
# exist" — matches the master path (_handle_search_masters, 2026-08-13).
|
|
489
|
+
parts.append(f'LOWER(CAST("{f}" AS TEXT)) LIKE LOWER(?)')
|
|
487
490
|
params.append(like)
|
|
488
491
|
extra = []
|
|
489
492
|
seen = set()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|