lambda-erp 0.6.14__tar.gz → 0.6.15__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.6.14 → lambda_erp-0.6.15}/PKG-INFO +1 -1
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/attachments.py +12 -1
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/pyproject.toml +1 -1
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/.gitignore +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/LICENSE +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/README.md +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/__init__.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/auth.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/bootstrap.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/chat.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/demo_limits.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/deps.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/errors.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/main.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/oauth.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/pdf.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/providers.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/remarks_md.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/__init__.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/accounting.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/admin.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/analytics.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/bank_reconciliation.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/chat_api.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/documents.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/masters.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/mcp.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/proposals.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/reports.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/routers/setup.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/services.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/templates/document.html +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/api/templates/proposal.html +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/docs/agents/README.md +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/frontend/LICENSE +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/frontend/README.md +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/frontend/src/api/client.ts +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/__init__.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/__init__.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/bank_transaction.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/budget.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/chart_of_accounts.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/general_ledger.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/journal_entry.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/payment_entry.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/pos_invoice.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/purchase_invoice.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/revaluation.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/sales_invoice.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/__init__.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/engine.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/pack.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/packs/__init__.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/packs/ch.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/packs/de_common.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/packs/de_skr03.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/packs/de_skr04.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/packs/generic.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/profiles.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/setup/spine.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/accounting/subscription.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/buying/__init__.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/buying/purchase_order.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/controllers/__init__.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/controllers/currency.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/controllers/defaults.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/controllers/pricing_rule.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/controllers/taxes_and_totals.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/database.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/exceptions.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/hooks.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/model.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/selling/__init__.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/selling/proposal.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/selling/quotation.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/selling/sales_order.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/simulation.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/stock/__init__.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/stock/delivery_note.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/stock/purchase_receipt.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/stock/stock_entry.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/stock/stock_ledger.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/lambda_erp/utils.py +0 -0
- {lambda_erp-0.6.14 → lambda_erp-0.6.15}/terraform/README.md +0 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import base64
|
|
4
4
|
import os
|
|
5
|
+
import tempfile
|
|
5
6
|
import uuid
|
|
6
7
|
|
|
7
8
|
from fastapi import APIRouter, Depends, File, Form, HTTPException, UploadFile
|
|
@@ -66,7 +67,17 @@ _EXT_TO_MIME = {
|
|
|
66
67
|
}
|
|
67
68
|
_MIME_TO_EXT = {m: e for e, m in _EXT_TO_MIME.items()}
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
# Where uploaded files are stored. Must be a WRITABLE path — a package-relative
|
|
71
|
+
# location (e.g. next to this module) resolves under site-packages when the
|
|
72
|
+
# package is pip-installed in a container, which is read-only for the non-root
|
|
73
|
+
# app user, so every upload 500s with "[Errno 13] Permission denied". Default to
|
|
74
|
+
# the OS temp dir (always writable; chat attachments are session-scoped and
|
|
75
|
+
# get_attachments_by_ids tolerates a missing file). Deployments that need the
|
|
76
|
+
# files to survive a restart set LAMBDA_ERP_UPLOAD_DIR to a mounted volume.
|
|
77
|
+
UPLOAD_ROOT = (
|
|
78
|
+
os.environ.get("LAMBDA_ERP_UPLOAD_DIR")
|
|
79
|
+
or os.path.join(tempfile.gettempdir(), "lambda-erp-uploads")
|
|
80
|
+
)
|
|
70
81
|
|
|
71
82
|
|
|
72
83
|
def _ensure_upload_dir(user_id: str) -> str:
|
|
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
|