shutro-erp 0.3.4 → 0.3.6
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.
- package/dist/account_asset/.kosh/bindings.d.ts +22 -0
- package/dist/account_asset/.kosh/bindings.js +15 -0
- package/dist/account_asset/.kosh/schema.d.ts +1755 -0
- package/dist/account_asset/board.d.ts +61 -0
- package/dist/account_asset/board.js +86 -0
- package/dist/account_asset/books.d.ts +42 -0
- package/dist/account_asset/books.js +398 -0
- package/dist/account_asset/demo.d.ts +7 -0
- package/dist/account_asset/demo.js +72 -0
- package/dist/account_asset/index.d.ts +9 -0
- package/dist/account_asset/index.js +335 -0
- package/dist/account_asset/module.d.ts +7622 -0
- package/dist/account_asset/module.js +230 -0
- package/dist/account_budget/.kosh/bindings.d.ts +22 -0
- package/dist/account_budget/.kosh/bindings.js +15 -0
- package/dist/account_budget/.kosh/schema.d.ts +1767 -0
- package/dist/account_budget/budget.d.ts +5 -0
- package/dist/account_budget/budget.js +142 -0
- package/dist/account_budget/demo.d.ts +6 -0
- package/dist/account_budget/demo.js +30 -0
- package/dist/account_budget/index.d.ts +4 -0
- package/dist/account_budget/index.js +223 -0
- package/dist/account_budget/module.d.ts +13863 -0
- package/dist/account_budget/module.js +167 -0
- package/dist/account_portal/.kosh/bindings.js +1 -1
- package/dist/account_portal/.kosh/schema.d.ts +176 -6
- package/dist/account_portal/module.d.ts +505 -6
- package/dist/accounting/.kosh/bindings.js +1 -1
- package/dist/accounting/.kosh/schema.d.ts +176 -6
- package/dist/accounting/index.d.ts +1 -1
- package/dist/accounting/index.js +344 -4
- package/dist/accounting/module.d.ts +513 -5
- package/dist/accounting/module.js +55 -3
- package/dist/approvals/.kosh/bindings.d.ts +22 -0
- package/dist/approvals/.kosh/bindings.js +15 -0
- package/dist/approvals/.kosh/schema.d.ts +611 -0
- package/dist/approvals/index.d.ts +18 -0
- package/dist/approvals/index.js +302 -0
- package/dist/approvals/mails.d.ts +25 -0
- package/dist/approvals/mails.js +82 -0
- package/dist/approvals/module.d.ts +1 -0
- package/dist/approvals/module.js +12 -0
- package/dist/approvals/web/History.d.ts +4 -0
- package/dist/approvals/web/History.js +13 -0
- package/dist/approvals/web/Inbox.d.ts +9 -0
- package/dist/approvals/web/Inbox.js +114 -0
- package/dist/approvals/web/Mine.d.ts +7 -0
- package/dist/approvals/web/Mine.js +27 -0
- package/dist/approvals/web/index.d.ts +13 -0
- package/dist/approvals/web/index.js +22 -0
- package/dist/approvals/web/messages.d.ts +2 -0
- package/dist/approvals/web/messages.js +119 -0
- package/dist/approvals/web/shared.d.ts +59 -0
- package/dist/approvals/web/shared.js +46 -0
- package/dist/attendance/.kosh/bindings.d.ts +22 -0
- package/dist/attendance/.kosh/bindings.js +15 -0
- package/dist/attendance/.kosh/schema.d.ts +1048 -0
- package/dist/attendance/days.d.ts +96 -0
- package/dist/attendance/days.js +430 -0
- package/dist/attendance/demo.d.ts +7 -0
- package/dist/attendance/demo.js +58 -0
- package/dist/attendance/index.d.ts +4 -0
- package/dist/attendance/index.js +513 -0
- package/dist/attendance/module.d.ts +3969 -0
- package/dist/attendance/module.js +412 -0
- package/dist/attendance/routes.d.ts +16 -0
- package/dist/attendance/routes.js +266 -0
- package/dist/attendance/web/Check.d.ts +8 -0
- package/dist/attendance/web/Check.js +40 -0
- package/dist/attendance/web/Kiosk.d.ts +8 -0
- package/dist/attendance/web/Kiosk.js +62 -0
- package/dist/attendance/web/PinButton.d.ts +7 -0
- package/dist/attendance/web/PinButton.js +29 -0
- package/dist/attendance/web/index.d.ts +13 -0
- package/dist/attendance/web/index.js +22 -0
- package/dist/attendance/web/messages.d.ts +2 -0
- package/dist/attendance/web/messages.js +61 -0
- package/dist/calendar/.kosh/bindings.d.ts +22 -0
- package/dist/calendar/.kosh/bindings.js +15 -0
- package/dist/calendar/.kosh/schema.d.ts +795 -0
- package/dist/calendar/demo.d.ts +6 -0
- package/dist/calendar/demo.js +24 -0
- package/dist/calendar/index.d.ts +3 -0
- package/dist/calendar/index.js +291 -0
- package/dist/calendar/module.d.ts +1705 -0
- package/dist/calendar/module.js +180 -0
- package/dist/cli/init.js +80 -0
- package/dist/cli/templates.d.ts +1 -1
- package/dist/cli/templates.js +226 -0
- package/dist/contacts/.kosh/bindings.js +1 -1
- package/dist/contacts/.kosh/schema.d.ts +78 -3
- package/dist/contacts/demo.js +30 -1
- package/dist/contacts/index.d.ts +1 -1
- package/dist/contacts/index.js +155 -9
- package/dist/contacts/module.d.ts +338 -2
- package/dist/contacts/module.js +93 -5
- package/dist/crm/.kosh/bindings.d.ts +22 -0
- package/dist/crm/.kosh/bindings.js +15 -0
- package/dist/crm/.kosh/schema.d.ts +800 -0
- package/dist/crm/demo.d.ts +6 -0
- package/dist/crm/demo.js +45 -0
- package/dist/crm/index.d.ts +3 -0
- package/dist/crm/index.js +361 -0
- package/dist/crm/module.d.ts +1845 -0
- package/dist/crm/module.js +208 -0
- package/dist/documents/.kosh/bindings.d.ts +22 -0
- package/dist/documents/.kosh/bindings.js +15 -0
- package/dist/documents/.kosh/schema.d.ts +862 -0
- package/dist/documents/demo.d.ts +6 -0
- package/dist/documents/demo.js +22 -0
- package/dist/documents/documents.d.ts +98 -0
- package/dist/documents/documents.js +318 -0
- package/dist/documents/index.d.ts +30 -0
- package/dist/documents/index.js +442 -0
- package/dist/documents/module.d.ts +2781 -0
- package/dist/documents/module.js +214 -0
- package/dist/documents/web/Versions.d.ts +7 -0
- package/dist/documents/web/Versions.js +45 -0
- package/dist/documents/web/index.d.ts +11 -0
- package/dist/documents/web/index.js +16 -0
- package/dist/documents/web/messages.d.ts +2 -0
- package/dist/documents/web/messages.js +21 -0
- package/dist/event/.kosh/bindings.d.ts +22 -0
- package/dist/event/.kosh/bindings.js +15 -0
- package/dist/event/.kosh/schema.d.ts +843 -0
- package/dist/event/demo.d.ts +6 -0
- package/dist/event/demo.js +65 -0
- package/dist/event/index.d.ts +14 -0
- package/dist/event/index.js +333 -0
- package/dist/event/mails.d.ts +15 -0
- package/dist/event/mails.js +112 -0
- package/dist/event/module.d.ts +2800 -0
- package/dist/event/module.js +323 -0
- package/dist/event/web/CheckInBox.d.ts +9 -0
- package/dist/event/web/CheckInBox.js +87 -0
- package/dist/event/web/index.d.ts +11 -0
- package/dist/event/web/index.js +16 -0
- package/dist/event/web/messages.d.ts +2 -0
- package/dist/event/web/messages.js +23 -0
- package/dist/event_account/.kosh/bindings.d.ts +22 -0
- package/dist/event_account/.kosh/bindings.js +15 -0
- package/dist/event_account/.kosh/schema.d.ts +1758 -0
- package/dist/event_account/index.d.ts +3 -0
- package/dist/event_account/index.js +28 -0
- package/dist/event_account/module.d.ts +7114 -0
- package/dist/event_account/module.js +90 -0
- package/dist/expense/.kosh/bindings.d.ts +22 -0
- package/dist/expense/.kosh/bindings.js +15 -0
- package/dist/expense/.kosh/schema.d.ts +1299 -0
- package/dist/expense/demo.d.ts +7 -0
- package/dist/expense/demo.js +69 -0
- package/dist/expense/index.d.ts +3 -0
- package/dist/expense/index.js +495 -0
- package/dist/expense/module.d.ts +4747 -0
- package/dist/expense/module.js +647 -0
- package/dist/expense_account/.kosh/bindings.d.ts +22 -0
- package/dist/expense_account/.kosh/bindings.js +15 -0
- package/dist/expense_account/.kosh/schema.d.ts +1936 -0
- package/dist/expense_account/index.d.ts +3 -0
- package/dist/expense_account/index.js +74 -0
- package/dist/expense_account/module.d.ts +9153 -0
- package/dist/expense_account/module.js +318 -0
- package/dist/helpdesk/.kosh/bindings.d.ts +22 -0
- package/dist/helpdesk/.kosh/bindings.js +15 -0
- package/dist/helpdesk/.kosh/schema.d.ts +885 -0
- package/dist/helpdesk/demo.d.ts +7 -0
- package/dist/helpdesk/demo.js +65 -0
- package/dist/helpdesk/hours.d.ts +17 -0
- package/dist/helpdesk/hours.js +94 -0
- package/dist/helpdesk/index.d.ts +10 -0
- package/dist/helpdesk/index.js +461 -0
- package/dist/helpdesk/module.d.ts +2940 -0
- package/dist/helpdesk/module.js +326 -0
- package/dist/helpdesk/routes.d.ts +12 -0
- package/dist/helpdesk/routes.js +132 -0
- package/dist/helpdesk/sla.d.ts +37 -0
- package/dist/helpdesk/sla.js +226 -0
- package/dist/hr/.kosh/bindings.d.ts +22 -0
- package/dist/hr/.kosh/bindings.js +15 -0
- package/dist/hr/.kosh/schema.d.ts +878 -0
- package/dist/hr/demo.d.ts +6 -0
- package/dist/hr/demo.js +60 -0
- package/dist/hr/index.d.ts +3 -0
- package/dist/hr/index.js +483 -0
- package/dist/hr/module.d.ts +2611 -0
- package/dist/hr/module.js +350 -0
- package/dist/l10n_bd/.kosh/bindings.js +1 -1
- package/dist/l10n_bd/.kosh/schema.d.ts +176 -6
- package/dist/l10n_bd/module.d.ts +505 -6
- package/dist/l10n_bd_payroll/.kosh/bindings.d.ts +22 -0
- package/dist/l10n_bd_payroll/.kosh/bindings.js +15 -0
- package/dist/l10n_bd_payroll/.kosh/schema.d.ts +2312 -0
- package/dist/l10n_bd_payroll/data.d.ts +47 -0
- package/dist/l10n_bd_payroll/data.js +347 -0
- package/dist/l10n_bd_payroll/index.d.ts +4 -0
- package/dist/l10n_bd_payroll/index.js +24 -0
- package/dist/l10n_bd_payroll/module.d.ts +12932 -0
- package/dist/l10n_bd_payroll/module.js +86 -0
- package/dist/l10n_in/.kosh/bindings.js +1 -1
- package/dist/l10n_in/.kosh/schema.d.ts +176 -6
- package/dist/l10n_in/module.d.ts +527 -7
- package/dist/mail/inbound/handle.js +6 -1
- package/dist/maintenance/.kosh/bindings.d.ts +22 -0
- package/dist/maintenance/.kosh/bindings.js +15 -0
- package/dist/maintenance/.kosh/schema.d.ts +911 -0
- package/dist/maintenance/demo.d.ts +6 -0
- package/dist/maintenance/demo.js +60 -0
- package/dist/maintenance/index.d.ts +3 -0
- package/dist/maintenance/index.js +422 -0
- package/dist/maintenance/module.d.ts +3545 -0
- package/dist/maintenance/module.js +446 -0
- package/dist/maintenance_stock/.kosh/bindings.d.ts +22 -0
- package/dist/maintenance_stock/.kosh/bindings.js +15 -0
- package/dist/maintenance_stock/.kosh/schema.d.ts +1446 -0
- package/dist/maintenance_stock/index.d.ts +9 -0
- package/dist/maintenance_stock/index.js +52 -0
- package/dist/maintenance_stock/module.d.ts +7675 -0
- package/dist/maintenance_stock/module.js +192 -0
- package/dist/modules-sdk/index.d.ts +1 -1
- package/dist/modules-sdk/manifest.d.ts +109 -2
- package/dist/modules-sdk/manifest.js +35 -1
- package/dist/mrp/.kosh/bindings.d.ts +22 -0
- package/dist/mrp/.kosh/bindings.js +15 -0
- package/dist/mrp/.kosh/schema.d.ts +1453 -0
- package/dist/mrp/demo.d.ts +7 -0
- package/dist/mrp/demo.js +42 -0
- package/dist/mrp/index.d.ts +3 -0
- package/dist/mrp/index.js +393 -0
- package/dist/mrp/module.d.ts +9335 -0
- package/dist/mrp/module.js +757 -0
- package/dist/mrp_account/.kosh/bindings.d.ts +22 -0
- package/dist/mrp_account/.kosh/bindings.js +15 -0
- package/dist/mrp_account/.kosh/schema.d.ts +2299 -0
- package/dist/mrp_account/index.d.ts +3 -0
- package/dist/mrp_account/index.js +22 -0
- package/dist/mrp_account/module.d.ts +23151 -0
- package/dist/mrp_account/module.js +123 -0
- package/dist/payment/.kosh/bindings.js +1 -1
- package/dist/payment/.kosh/schema.d.ts +178 -7
- package/dist/payment/index.d.ts +41 -0
- package/dist/payment/index.js +131 -74
- package/dist/payment/module.d.ts +569 -12
- package/dist/payment/module.js +19 -3
- package/dist/payment/settle.js +10 -1
- package/dist/payroll/.kosh/bindings.d.ts +22 -0
- package/dist/payroll/.kosh/bindings.js +15 -0
- package/dist/payroll/.kosh/schema.d.ts +1390 -0
- package/dist/payroll/compute.d.ts +35 -0
- package/dist/payroll/compute.js +398 -0
- package/dist/payroll/demo.d.ts +55 -0
- package/dist/payroll/demo.js +121 -0
- package/dist/payroll/formula.d.ts +62 -0
- package/dist/payroll/formula.js +320 -0
- package/dist/payroll/index.d.ts +230 -0
- package/dist/payroll/index.js +713 -0
- package/dist/payroll/module.d.ts +9390 -0
- package/dist/payroll/module.js +606 -0
- package/dist/payroll/routes.d.ts +10 -0
- package/dist/payroll/routes.js +112 -0
- package/dist/payroll_account/.kosh/bindings.d.ts +22 -0
- package/dist/payroll_account/.kosh/bindings.js +15 -0
- package/dist/payroll_account/.kosh/schema.d.ts +2308 -0
- package/dist/payroll_account/index.d.ts +3 -0
- package/dist/payroll_account/index.js +40 -0
- package/dist/payroll_account/module.d.ts +12396 -0
- package/dist/payroll_account/module.js +256 -0
- package/dist/permissions/approvals.d.ts +131 -9
- package/dist/permissions/approvals.js +662 -57
- package/dist/permissions/index.d.ts +1 -1
- package/dist/permissions/index.js +2 -2
- package/dist/permissions/models.js +191 -12
- package/dist/permissions/routes.d.ts +6 -1
- package/dist/permissions/routes.js +37 -4
- package/dist/permissions/web/ApprovalPanel.d.ts +5 -4
- package/dist/permissions/web/ApprovalPanel.js +39 -13
- package/dist/permissions/web/index.d.ts +6 -4
- package/dist/permissions/web/index.js +13 -4
- package/dist/permissions/web/messages.d.ts +2 -0
- package/dist/permissions/web/messages.js +43 -0
- package/dist/portal/.kosh/bindings.js +1 -1
- package/dist/portal/.kosh/schema.d.ts +78 -3
- package/dist/portal/index.js +1 -1
- package/dist/portal/module.d.ts +166 -2
- package/dist/pos/.kosh/bindings.d.ts +22 -0
- package/dist/pos/.kosh/bindings.js +15 -0
- package/dist/pos/.kosh/schema.d.ts +1809 -0
- package/dist/pos/accounting.d.ts +10 -0
- package/dist/pos/accounting.js +149 -0
- package/dist/pos/demo.d.ts +6 -0
- package/dist/pos/demo.js +90 -0
- package/dist/pos/index.d.ts +9 -0
- package/dist/pos/index.js +353 -0
- package/dist/pos/module.d.ts +9783 -0
- package/dist/pos/module.js +423 -0
- package/dist/pos/routes.d.ts +39 -0
- package/dist/pos/routes.js +368 -0
- package/dist/pos/web/Register.d.ts +9 -0
- package/dist/pos/web/Register.js +252 -0
- package/dist/pos/web/index.d.ts +11 -0
- package/dist/pos/web/index.js +16 -0
- package/dist/pos/web/messages.d.ts +2 -0
- package/dist/pos/web/messages.js +87 -0
- package/dist/pos_stock/.kosh/bindings.d.ts +22 -0
- package/dist/pos_stock/.kosh/bindings.js +15 -0
- package/dist/pos_stock/.kosh/schema.d.ts +2208 -0
- package/dist/pos_stock/index.d.ts +9 -0
- package/dist/pos_stock/index.js +35 -0
- package/dist/pos_stock/module.d.ts +12803 -0
- package/dist/pos_stock/module.js +115 -0
- package/dist/product/.kosh/bindings.js +1 -1
- package/dist/product/.kosh/schema.d.ts +52 -1
- package/dist/product/index.js +94 -4
- package/dist/product/module.d.ts +45 -1
- package/dist/product/module.js +11 -3
- package/dist/project/.kosh/bindings.js +1 -1
- package/dist/project/.kosh/schema.d.ts +725 -3
- package/dist/project/index.d.ts +3 -1
- package/dist/project/index.js +1045 -18
- package/dist/project/module.d.ts +10168 -458
- package/dist/project/module.js +1578 -14
- package/dist/project/routes.d.ts +44 -0
- package/dist/project/routes.js +314 -0
- package/dist/project/schedule.d.ts +72 -0
- package/dist/project/schedule.js +192 -0
- package/dist/project/web/Refresh.d.ts +8 -0
- package/dist/project/web/Refresh.js +29 -0
- package/dist/project/web/Schedule.d.ts +9 -0
- package/dist/project/web/Schedule.js +93 -0
- package/dist/project/web/Structure.d.ts +8 -0
- package/dist/project/web/Structure.js +86 -0
- package/dist/project/web/Workload.d.ts +8 -0
- package/dist/project/web/Workload.js +43 -0
- package/dist/project/web/index.d.ts +14 -0
- package/dist/project/web/index.js +25 -0
- package/dist/project/web/messages.d.ts +2 -0
- package/dist/project/web/messages.js +85 -0
- package/dist/project_account/.kosh/bindings.d.ts +22 -0
- package/dist/project_account/.kosh/bindings.js +15 -0
- package/dist/project_account/.kosh/schema.d.ts +2241 -0
- package/dist/project_account/index.d.ts +3 -0
- package/dist/project_account/index.js +27 -0
- package/dist/project_account/module.d.ts +11539 -0
- package/dist/project_account/module.js +76 -0
- package/dist/project_portal/.kosh/bindings.js +1 -1
- package/dist/project_portal/.kosh/schema.d.ts +725 -3
- package/dist/project_portal/module.d.ts +5137 -119
- package/dist/project_purchase/.kosh/bindings.d.ts +22 -0
- package/dist/project_purchase/.kosh/bindings.js +15 -0
- package/dist/project_purchase/.kosh/schema.d.ts +2320 -0
- package/dist/project_purchase/index.d.ts +9 -0
- package/dist/project_purchase/index.js +22 -0
- package/dist/project_purchase/module.d.ts +25147 -0
- package/dist/project_purchase/module.js +56 -0
- package/dist/purchase/.kosh/bindings.js +1 -1
- package/dist/purchase/.kosh/schema.d.ts +150 -6
- package/dist/purchase/index.js +163 -3
- package/dist/purchase/module.d.ts +228 -5
- package/dist/purchase/module.js +30 -3
- package/dist/purchase_account/.kosh/bindings.js +1 -1
- package/dist/purchase_account/.kosh/schema.d.ts +180 -8
- package/dist/purchase_account/index.js +27 -1
- package/dist/purchase_account/module.d.ts +591 -30
- package/dist/purchase_account/module.js +13 -2
- package/dist/purchase_portal/.kosh/bindings.js +1 -1
- package/dist/purchase_portal/.kosh/schema.d.ts +150 -6
- package/dist/purchase_portal/module.d.ts +372 -6
- package/dist/purchase_stock/.kosh/bindings.d.ts +22 -0
- package/dist/purchase_stock/.kosh/bindings.js +15 -0
- package/dist/purchase_stock/.kosh/schema.d.ts +1479 -0
- package/dist/purchase_stock/index.d.ts +7 -0
- package/dist/purchase_stock/index.js +98 -0
- package/dist/purchase_stock/module.d.ts +7535 -0
- package/dist/purchase_stock/module.js +380 -0
- package/dist/purchase_stock_account/.kosh/bindings.d.ts +22 -0
- package/dist/purchase_stock_account/.kosh/bindings.js +15 -0
- package/dist/purchase_stock_account/.kosh/schema.d.ts +2155 -0
- package/dist/purchase_stock_account/index.d.ts +3 -0
- package/dist/purchase_stock_account/index.js +24 -0
- package/dist/purchase_stock_account/module.d.ts +38015 -0
- package/dist/purchase_stock_account/module.js +168 -0
- package/dist/recruitment/.kosh/bindings.d.ts +22 -0
- package/dist/recruitment/.kosh/bindings.js +15 -0
- package/dist/recruitment/.kosh/schema.d.ts +991 -0
- package/dist/recruitment/demo.d.ts +6 -0
- package/dist/recruitment/demo.js +45 -0
- package/dist/recruitment/index.d.ts +3 -0
- package/dist/recruitment/index.js +385 -0
- package/dist/recruitment/module.d.ts +3249 -0
- package/dist/recruitment/module.js +194 -0
- package/dist/recruitment/web/HireButton.d.ts +9 -0
- package/dist/recruitment/web/HireButton.js +32 -0
- package/dist/recruitment/web/index.d.ts +11 -0
- package/dist/recruitment/web/index.js +16 -0
- package/dist/recruitment/web/messages.d.ts +2 -0
- package/dist/recruitment/web/messages.js +19 -0
- package/dist/reporting/documents.d.ts +5 -0
- package/dist/reporting/documents.js +28 -1
- package/dist/reporting/index.d.ts +1 -1
- package/dist/reporting/index.js +4 -2
- package/dist/reporting/models.js +9 -0
- package/dist/reporting/overviews.d.ts +16 -0
- package/dist/reporting/overviews.js +56 -0
- package/dist/reporting/routes-documents.js +1 -1
- package/dist/reporting/routes.js +138 -80
- package/dist/reporting/web/DashboardView.d.ts +11 -0
- package/dist/reporting/web/DashboardView.js +2 -2
- package/dist/reporting/web/DesignerView.js +5 -0
- package/dist/reporting/web/Overview.d.ts +9 -0
- package/dist/reporting/web/Overview.js +53 -0
- package/dist/reporting/web/index.d.ts +1 -0
- package/dist/reporting/web/index.js +4 -1
- package/dist/reporting/web/messages.js +9 -0
- package/dist/sale_account/.kosh/bindings.js +1 -1
- package/dist/sale_account/.kosh/schema.d.ts +181 -6
- package/dist/sale_account/index.js +22 -1
- package/dist/sale_account/module.d.ts +639 -38
- package/dist/sale_portal/.kosh/bindings.js +1 -1
- package/dist/sale_portal/.kosh/schema.d.ts +59 -3
- package/dist/sale_portal/module.d.ts +435 -5
- package/dist/sale_project/.kosh/bindings.js +1 -1
- package/dist/sale_project/.kosh/schema.d.ts +732 -3
- package/dist/sale_project/module.d.ts +5349 -208
- package/dist/sale_project/module.js +17 -1
- package/dist/sale_stock/.kosh/bindings.d.ts +22 -0
- package/dist/sale_stock/.kosh/bindings.js +15 -0
- package/dist/sale_stock/.kosh/schema.d.ts +1303 -0
- package/dist/sale_stock/index.d.ts +7 -0
- package/dist/sale_stock/index.js +84 -0
- package/dist/sale_stock/module.d.ts +7514 -0
- package/dist/sale_stock/module.js +146 -0
- package/dist/sales/.kosh/bindings.js +1 -1
- package/dist/sales/.kosh/schema.d.ts +59 -3
- package/dist/sales/index.js +195 -4
- package/dist/sales/module.d.ts +356 -3
- package/dist/sales/module.js +78 -3
- package/dist/server/api/metadata.d.ts +5 -0
- package/dist/server/api/metadata.js +5 -0
- package/dist/server/api/rest.js +64 -1
- package/dist/server/api/views.js +1 -0
- package/dist/server/app-settings.d.ts +7 -0
- package/dist/server/app-settings.js +10 -0
- package/dist/server/auth/base.js +9 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/settings/app-settings.d.ts +2 -0
- package/dist/settings/app-settings.js +518 -0
- package/dist/settings/index.d.ts +1 -0
- package/dist/settings/index.js +15 -0
- package/dist/settings/people.js +29 -5
- package/dist/settings/web/AppSettingsPage.d.ts +11 -0
- package/dist/settings/web/AppSettingsPage.js +210 -0
- package/dist/settings/web/OverviewPage.js +16 -3
- package/dist/settings/web/PeoplePage.js +20 -6
- package/dist/settings/web/index.d.ts +1 -0
- package/dist/settings/web/index.js +3 -0
- package/dist/settings/web/messages.js +118 -2
- package/dist/sign/.kosh/bindings.d.ts +22 -0
- package/dist/sign/.kosh/bindings.js +15 -0
- package/dist/sign/.kosh/schema.d.ts +990 -0
- package/dist/sign/index.d.ts +14 -0
- package/dist/sign/index.js +350 -0
- package/dist/sign/module.d.ts +4478 -0
- package/dist/sign/module.js +158 -0
- package/dist/sign/sign.d.ts +82 -0
- package/dist/sign/sign.js +474 -0
- package/dist/stock/.kosh/bindings.d.ts +22 -0
- package/dist/stock/.kosh/bindings.js +15 -0
- package/dist/stock/.kosh/schema.d.ts +1222 -0
- package/dist/stock/demo.d.ts +8 -0
- package/dist/stock/demo.js +82 -0
- package/dist/stock/index.d.ts +4 -0
- package/dist/stock/index.js +903 -0
- package/dist/stock/module.d.ts +7856 -0
- package/dist/stock/module.js +1880 -0
- package/dist/stock/replenish.d.ts +38 -0
- package/dist/stock/replenish.js +176 -0
- package/dist/stock/web/Replenishment.d.ts +8 -0
- package/dist/stock/web/Replenishment.js +84 -0
- package/dist/stock/web/ScanBox.d.ts +8 -0
- package/dist/stock/web/ScanBox.js +90 -0
- package/dist/stock/web/index.d.ts +13 -0
- package/dist/stock/web/index.js +20 -0
- package/dist/stock/web/messages.d.ts +2 -0
- package/dist/stock/web/messages.js +77 -0
- package/dist/stock_account/.kosh/bindings.d.ts +22 -0
- package/dist/stock_account/.kosh/bindings.js +15 -0
- package/dist/stock_account/.kosh/schema.d.ts +2068 -0
- package/dist/stock_account/index.d.ts +3 -0
- package/dist/stock_account/index.js +140 -0
- package/dist/stock_account/module.d.ts +11523 -0
- package/dist/stock_account/module.js +339 -0
- package/dist/storage/attachments.d.ts +5 -0
- package/dist/storage/attachments.js +12 -1
- package/dist/storage/models.js +3 -0
- package/dist/storage/routes.js +13 -2
- package/dist/todo/.kosh/bindings.d.ts +22 -0
- package/dist/todo/.kosh/bindings.js +15 -0
- package/dist/todo/.kosh/schema.d.ts +732 -0
- package/dist/todo/demo.d.ts +6 -0
- package/dist/todo/demo.js +35 -0
- package/dist/todo/index.d.ts +3 -0
- package/dist/todo/index.js +187 -0
- package/dist/todo/module.d.ts +1180 -0
- package/dist/todo/module.js +130 -0
- package/dist/trade_finance/.kosh/bindings.d.ts +22 -0
- package/dist/trade_finance/.kosh/bindings.js +15 -0
- package/dist/trade_finance/.kosh/schema.d.ts +884 -0
- package/dist/trade_finance/demo.d.ts +6 -0
- package/dist/trade_finance/demo.js +63 -0
- package/dist/trade_finance/index.d.ts +3 -0
- package/dist/trade_finance/index.js +415 -0
- package/dist/trade_finance/module.d.ts +3779 -0
- package/dist/trade_finance/module.js +507 -0
- package/dist/trade_finance_account/.kosh/bindings.d.ts +22 -0
- package/dist/trade_finance_account/.kosh/bindings.js +15 -0
- package/dist/trade_finance_account/.kosh/schema.d.ts +1830 -0
- package/dist/trade_finance_account/index.d.ts +3 -0
- package/dist/trade_finance_account/index.js +93 -0
- package/dist/trade_finance_account/module.d.ts +8074 -0
- package/dist/trade_finance_account/module.js +245 -0
- package/dist/trade_finance_purchase/.kosh/bindings.d.ts +22 -0
- package/dist/trade_finance_purchase/.kosh/bindings.js +15 -0
- package/dist/trade_finance_purchase/.kosh/schema.d.ts +1246 -0
- package/dist/trade_finance_purchase/index.d.ts +8 -0
- package/dist/trade_finance_purchase/index.js +50 -0
- package/dist/trade_finance_purchase/module.d.ts +4257 -0
- package/dist/trade_finance_purchase/module.js +44 -0
- package/dist/trade_finance_sale/.kosh/bindings.d.ts +22 -0
- package/dist/trade_finance_sale/.kosh/bindings.js +15 -0
- package/dist/trade_finance_sale/.kosh/schema.d.ts +1072 -0
- package/dist/trade_finance_sale/index.d.ts +8 -0
- package/dist/trade_finance_sale/index.js +50 -0
- package/dist/trade_finance_sale/module.d.ts +4281 -0
- package/dist/trade_finance_sale/module.js +44 -0
- package/dist/ui/api.d.ts +2 -1
- package/dist/ui/api.js +2 -1
- package/dist/ui/app.js +26 -13
- package/dist/ui/components/AppIcon.js +30 -1
- package/dist/ui/components/primitives.d.ts +2 -0
- package/dist/ui/components/primitives.js +7 -1
- package/dist/ui/i18n/messages.d.ts +27 -0
- package/dist/ui/i18n/messages.js +46 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/offline/queue.d.ts +5 -1
- package/dist/ui/offline/queue.js +2 -0
- package/dist/ui/registry.d.ts +5 -0
- package/dist/ui/shell/Home.js +55 -4
- package/dist/ui/views/FormView.js +102 -19
- package/dist/ui/views/KanbanView.d.ts +2 -0
- package/dist/ui/views/KanbanView.js +40 -3
- package/dist/ui/views/ListView.js +110 -11
- package/dist/ui/views/StatsRow.d.ts +14 -0
- package/dist/ui/views/StatsRow.js +88 -0
- package/dist/ui/views/widgets.d.ts +2 -1
- package/dist/ui/views/widgets.js +200 -1
- package/dist/views/builders.d.ts +19 -2
- package/dist/views/builders.js +21 -1
- package/dist/views/condition.d.ts +6 -0
- package/dist/views/condition.js +20 -0
- package/dist/views/documents.d.ts +8 -0
- package/dist/views/extend.d.ts +2 -2
- package/dist/views/extend.js +11 -1
- package/dist/views/index.d.ts +2 -2
- package/dist/views/index.js +2 -2
- package/dist/views/types.d.ts +52 -5
- package/dist/views/validate.js +39 -1
- package/dist/website/.kosh/bindings.d.ts +22 -0
- package/dist/website/.kosh/bindings.js +15 -0
- package/dist/website/.kosh/schema.d.ts +881 -0
- package/dist/website/demo.d.ts +6 -0
- package/dist/website/demo.js +115 -0
- package/dist/website/index.d.ts +9 -0
- package/dist/website/index.js +251 -0
- package/dist/website/module.d.ts +2987 -0
- package/dist/website/module.js +282 -0
- package/dist/website/render.d.ts +45 -0
- package/dist/website/render.js +102 -0
- package/dist/website/routes.d.ts +12 -0
- package/dist/website/routes.js +246 -0
- package/dist/website/web/PagePreview.d.ts +7 -0
- package/dist/website/web/PagePreview.js +33 -0
- package/dist/website/web/index.d.ts +11 -0
- package/dist/website/web/index.js +16 -0
- package/dist/website/web/messages.d.ts +2 -0
- package/dist/website/web/messages.js +15 -0
- package/dist/website_crm/.kosh/bindings.d.ts +22 -0
- package/dist/website_crm/.kosh/bindings.js +15 -0
- package/dist/website_crm/.kosh/schema.d.ts +967 -0
- package/dist/website_crm/index.d.ts +3 -0
- package/dist/website_crm/index.js +39 -0
- package/dist/website_crm/module.d.ts +2956 -0
- package/dist/website_crm/module.js +44 -0
- package/dist/website_sale/.kosh/bindings.d.ts +22 -0
- package/dist/website_sale/.kosh/bindings.js +15 -0
- package/dist/website_sale/.kosh/schema.d.ts +2284 -0
- package/dist/website_sale/couriers.d.ts +50 -0
- package/dist/website_sale/couriers.js +59 -0
- package/dist/website_sale/demo.d.ts +7 -0
- package/dist/website_sale/demo.js +90 -0
- package/dist/website_sale/growth.d.ts +31 -0
- package/dist/website_sale/growth.js +163 -0
- package/dist/website_sale/index.d.ts +49 -0
- package/dist/website_sale/index.js +538 -0
- package/dist/website_sale/module.d.ts +22027 -0
- package/dist/website_sale/module.js +397 -0
- package/dist/website_sale/shipments.d.ts +16 -0
- package/dist/website_sale/shipments.js +113 -0
- package/dist/website_sale/shop.d.ts +81 -0
- package/dist/website_sale/shop.js +649 -0
- package/dist/website_sale_stock/.kosh/bindings.d.ts +22 -0
- package/dist/website_sale_stock/.kosh/bindings.js +15 -0
- package/dist/website_sale_stock/.kosh/schema.d.ts +2681 -0
- package/dist/website_sale_stock/index.d.ts +9 -0
- package/dist/website_sale_stock/index.js +20 -0
- package/dist/website_sale_stock/module.d.ts +24998 -0
- package/dist/website_sale_stock/module.js +28 -0
- package/package.json +200 -2
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The data layer of the Counter ↔ Stockroom bridge (RFC 0021, Counter step 2): a closed session's sold goods leave
|
|
3
|
+
* the shop's warehouse as **one delivery per session**, done at once when the stock is there; when it is short the
|
|
4
|
+
* delivery stays confirmed for a manager to finish from Stockroom. Returns (negative quantities) come back in it.
|
|
5
|
+
*/
|
|
6
|
+
import { posShutro } from '../pos/index.js';
|
|
7
|
+
import { orm } from '../server/orm.js';
|
|
8
|
+
import { defaultLocations, stockShutro } from '../stock/index.js';
|
|
9
|
+
import { defineModule, extendModel, f } from './.kosh/bindings.js';
|
|
10
|
+
const ZERO = orm.toDecimal(0);
|
|
11
|
+
export const ShopWarehouse = extendModel('pos.shop', {
|
|
12
|
+
fields: {
|
|
13
|
+
/** The warehouse the shop sells from; the company's first one otherwise. */
|
|
14
|
+
warehouse: f.many2one('stock.warehouse', { ondelete: 'restrict' }),
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
export const SessionDelivery = extendModel('pos.session', {
|
|
18
|
+
fields: {
|
|
19
|
+
delivery: f.many2one('stock.picking', { ondelete: 'set null', label: 'Stock delivery' }),
|
|
20
|
+
},
|
|
21
|
+
overrides: {
|
|
22
|
+
closed: async function (next) {
|
|
23
|
+
await next();
|
|
24
|
+
const sessions = this;
|
|
25
|
+
const env = sessions.env;
|
|
26
|
+
await env.asSuperuser({ reason: 'counter session to stock' }, async (su) => {
|
|
27
|
+
for (const s of await su
|
|
28
|
+
.model('pos.session')
|
|
29
|
+
.browse(sessions.ids)
|
|
30
|
+
.load({ shop: true, company: true, orders: { lines: { product: { uom: true } } } })) {
|
|
31
|
+
if (s.delivery !== null)
|
|
32
|
+
continue;
|
|
33
|
+
// What left the shelves: the paid sales' goods, by product (returns take away).
|
|
34
|
+
const sold = new Map();
|
|
35
|
+
for (const o of s.orders) {
|
|
36
|
+
if (o.state !== 'paid')
|
|
37
|
+
continue;
|
|
38
|
+
for (const l of o.lines) {
|
|
39
|
+
if (l.product.kind !== 'goods')
|
|
40
|
+
continue;
|
|
41
|
+
const slot = sold.get(l.product.id) ?? {
|
|
42
|
+
product: l.product.id,
|
|
43
|
+
name: l.product.name,
|
|
44
|
+
uom: l.product.uom?.id ?? null,
|
|
45
|
+
quantity: ZERO,
|
|
46
|
+
};
|
|
47
|
+
slot.quantity = slot.quantity.plus(l.quantity);
|
|
48
|
+
sold.set(l.product.id, slot);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const moves = [...sold.values()].filter((m) => m.quantity.gt(0));
|
|
52
|
+
if (moves.length === 0)
|
|
53
|
+
continue;
|
|
54
|
+
const shopWarehouse = s.shop.warehouse;
|
|
55
|
+
const places = await defaultLocations(su, 'delivery', shopWarehouse?.id ?? null, s.company.id);
|
|
56
|
+
if (places.source === null || places.destination === null)
|
|
57
|
+
throw new orm.ValidationError('pos.session', ['state'], `The company of ${s.name} has no warehouse to sell from.`, 'Add a warehouse in Stockroom › Configuration › Warehouses.');
|
|
58
|
+
const made = await su.model('stock.picking').create([
|
|
59
|
+
{
|
|
60
|
+
kind: 'delivery',
|
|
61
|
+
company: s.company.id,
|
|
62
|
+
warehouse: places.warehouse,
|
|
63
|
+
source: places.source,
|
|
64
|
+
destination: places.destination,
|
|
65
|
+
origin: s.name,
|
|
66
|
+
moves: {
|
|
67
|
+
create: moves.map((m) => ({
|
|
68
|
+
product: m.product,
|
|
69
|
+
name: m.name,
|
|
70
|
+
quantity: m.quantity,
|
|
71
|
+
quantityDone: m.quantity,
|
|
72
|
+
uom: m.uom,
|
|
73
|
+
})),
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
]);
|
|
77
|
+
await su.flush();
|
|
78
|
+
await made.confirm();
|
|
79
|
+
await su.flush();
|
|
80
|
+
await made.reserve();
|
|
81
|
+
await su.flush();
|
|
82
|
+
// Done at once when the stock is there; else it waits for a manager in Stockroom.
|
|
83
|
+
try {
|
|
84
|
+
await made.validate();
|
|
85
|
+
await su.flush();
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
const name = error.name;
|
|
89
|
+
// Short stock: the guard of validate refuses; the delivery stays confirmed for Stockroom.
|
|
90
|
+
if (!(error instanceof orm.ValidationError || name === 'TransitionGuardError'))
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
await su
|
|
94
|
+
.model('pos.session')
|
|
95
|
+
.browse([s.id])
|
|
96
|
+
.write({ delivery: made.ids[0] ?? null });
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
export const posStockShutro = defineModule({
|
|
103
|
+
name: 'pos_stock',
|
|
104
|
+
version: '0.1.0',
|
|
105
|
+
depends: [posShutro, stockShutro],
|
|
106
|
+
groups: [
|
|
107
|
+
orm.defineGroup({
|
|
108
|
+
code: 'pos_stock.user',
|
|
109
|
+
label: 'Counter sales from stock',
|
|
110
|
+
implies: ['pos.cashier'],
|
|
111
|
+
}),
|
|
112
|
+
],
|
|
113
|
+
models: [],
|
|
114
|
+
extensions: [ShopWarehouse, SessionDelivery],
|
|
115
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash:
|
|
1
|
+
// GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: cf2dd228cb44bc49
|
|
2
2
|
// Bindings of module `product`: import the definition API from here to get types scoped to what it can see.
|
|
3
3
|
export { defineModel, defineModule, extendModel, f, replace } from '../../server/orm.js';
|
|
4
4
|
import { definitions } from '../../server/orm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash:
|
|
1
|
+
// GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: cf2dd228cb44bc49
|
|
2
2
|
// Schema view of module `product` (RFC 0002 §7.7): the models it owns or depends on, with the extensions it can see.
|
|
3
3
|
import type { F } from '../../server/orm.js';
|
|
4
4
|
|
|
@@ -14,6 +14,7 @@ export interface SchemaView {
|
|
|
14
14
|
readonly 'auth.user_group': AuthUserGroup;
|
|
15
15
|
readonly 'kosh.image': KoshImage;
|
|
16
16
|
readonly 'kosh.saved_view': KoshSavedView;
|
|
17
|
+
readonly 'kosh.setting': KoshSetting;
|
|
17
18
|
readonly 'oauth.app': OauthApp;
|
|
18
19
|
readonly 'oauth.code': OauthCode;
|
|
19
20
|
readonly 'oauth.grant': OauthGrant;
|
|
@@ -23,6 +24,7 @@ export interface SchemaView {
|
|
|
23
24
|
readonly 'res.company': ResCompany;
|
|
24
25
|
readonly 'res.currency': ResCurrency;
|
|
25
26
|
readonly 'res.users': ResUsers;
|
|
27
|
+
readonly 'storage.attachment': StorageAttachment;
|
|
26
28
|
readonly 'uom.uom': UomUom;
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -270,6 +272,26 @@ export interface KoshSavedView {
|
|
|
270
272
|
export interface KoshSavedViewMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'kosh.saved_view'> {
|
|
271
273
|
}
|
|
272
274
|
|
|
275
|
+
/** `kosh.setting` (owner: base). */
|
|
276
|
+
export interface KoshSetting {
|
|
277
|
+
readonly name: 'kosh.setting';
|
|
278
|
+
readonly fields: {
|
|
279
|
+
readonly id: F.Id<'kosh.setting'>;
|
|
280
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
281
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
282
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
283
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
284
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
285
|
+
readonly key: F.Char<{ readonly required: true }>;
|
|
286
|
+
readonly value: F.Json;
|
|
287
|
+
};
|
|
288
|
+
readonly methods: KoshSettingMethods;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/** Methods of `kosh.setting`: declared ones and transitions. */
|
|
292
|
+
export interface KoshSettingMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'kosh.setting'> {
|
|
293
|
+
}
|
|
294
|
+
|
|
273
295
|
/** `oauth.app` (owner: base). */
|
|
274
296
|
export interface OauthApp {
|
|
275
297
|
readonly name: 'oauth.app';
|
|
@@ -379,6 +401,7 @@ export interface ProductCategory {
|
|
|
379
401
|
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
380
402
|
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
381
403
|
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
404
|
+
readonly active: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
382
405
|
readonly name: F.Char<{ readonly required: true; readonly translate: true }>;
|
|
383
406
|
readonly parent: F.Many2one<'product.category'>;
|
|
384
407
|
};
|
|
@@ -406,6 +429,7 @@ export interface ProductProduct {
|
|
|
406
429
|
readonly category: F.Many2one<'product.category'>;
|
|
407
430
|
readonly uom: F.Many2one<'uom.uom'>;
|
|
408
431
|
readonly barcode: F.Char;
|
|
432
|
+
readonly image: F.Many2one<'storage.attachment'>;
|
|
409
433
|
readonly listPrice: F.Decimal<{ readonly required: true; readonly default: true }>;
|
|
410
434
|
readonly standardPrice: F.Decimal<{ readonly required: true; readonly default: true }>;
|
|
411
435
|
readonly saleOk: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
@@ -500,6 +524,33 @@ export interface ResUsers {
|
|
|
500
524
|
export interface ResUsersMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'res.users'> {
|
|
501
525
|
}
|
|
502
526
|
|
|
527
|
+
/** `storage.attachment` (owner: storage). */
|
|
528
|
+
export interface StorageAttachment {
|
|
529
|
+
readonly name: 'storage.attachment';
|
|
530
|
+
readonly fields: {
|
|
531
|
+
readonly id: F.Id<'storage.attachment'>;
|
|
532
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
533
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
534
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
535
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
536
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
537
|
+
readonly name: F.Char<{ readonly required: true }>;
|
|
538
|
+
readonly mime: F.Char<{ readonly required: true }>;
|
|
539
|
+
readonly size: F.Integer<{ readonly required: true }>;
|
|
540
|
+
readonly sha256: F.Char<{ readonly required: true }>;
|
|
541
|
+
readonly key: F.Char<{ readonly required: true }>;
|
|
542
|
+
readonly resModel: F.Char<{ readonly required: true }>;
|
|
543
|
+
readonly resId: F.Integer<{ readonly required: true }>;
|
|
544
|
+
readonly variantOf: F.Many2one<'storage.attachment'>;
|
|
545
|
+
readonly width: F.Integer;
|
|
546
|
+
};
|
|
547
|
+
readonly methods: StorageAttachmentMethods;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/** Methods of `storage.attachment`: declared ones and transitions. */
|
|
551
|
+
export interface StorageAttachmentMethods extends F.Methods<typeof import('../../storage/index.js').storageShutro, 'storage.attachment'> {
|
|
552
|
+
}
|
|
553
|
+
|
|
503
554
|
/** `uom.uom` (owner: product). */
|
|
504
555
|
export interface UomUom {
|
|
505
556
|
readonly name: 'uom.uom';
|
package/dist/product/index.js
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* categories, units of measure and taxes. Sales and Purchase sell and buy them.
|
|
5
5
|
*/
|
|
6
6
|
import { defineModule } from '../modules-sdk/index.js';
|
|
7
|
+
import { reporting } from '../reporting/index.js';
|
|
7
8
|
import { base } from '../server/index.js';
|
|
9
|
+
import { storage } from '../storage/index.js';
|
|
8
10
|
import { action, form, kanban, list, search } from '../views/index.js';
|
|
9
11
|
import { productDemo } from './demo.js';
|
|
10
12
|
import { AccountTax, ProductCategory, ProductProduct, productShutro, UomUom } from './module.js';
|
|
@@ -14,7 +16,7 @@ export const product = defineModule({
|
|
|
14
16
|
shutro: productShutro,
|
|
15
17
|
kosh: '^0.1.0',
|
|
16
18
|
hooks: { demo: productDemo },
|
|
17
|
-
depends: [base],
|
|
19
|
+
depends: [base, storage, reporting],
|
|
18
20
|
app: {
|
|
19
21
|
code: 'product',
|
|
20
22
|
label: 'Products',
|
|
@@ -27,6 +29,63 @@ export const product = defineModule({
|
|
|
27
29
|
user: { label: 'User', groups: ['product.user'] },
|
|
28
30
|
manager: { label: 'Manager', groups: ['product.manager'], implies: ['user'] },
|
|
29
31
|
},
|
|
32
|
+
// The Overview (RFC 0022 step 2): the catalogue at a glance.
|
|
33
|
+
overview: {
|
|
34
|
+
cards: [
|
|
35
|
+
{
|
|
36
|
+
id: 'products_all',
|
|
37
|
+
title: 'Products',
|
|
38
|
+
kind: 'kpi',
|
|
39
|
+
model: 'product.product',
|
|
40
|
+
measure: 'count',
|
|
41
|
+
w: 3,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'goods',
|
|
45
|
+
title: 'Goods',
|
|
46
|
+
kind: 'kpi',
|
|
47
|
+
model: 'product.product',
|
|
48
|
+
measure: 'count',
|
|
49
|
+
filter: { kind: 'goods' },
|
|
50
|
+
w: 3,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'services',
|
|
54
|
+
title: 'Services',
|
|
55
|
+
kind: 'kpi',
|
|
56
|
+
model: 'product.product',
|
|
57
|
+
measure: 'count',
|
|
58
|
+
filter: { kind: 'service' },
|
|
59
|
+
w: 3,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'average_price',
|
|
63
|
+
title: 'Average sales price',
|
|
64
|
+
kind: 'kpi',
|
|
65
|
+
model: 'product.product',
|
|
66
|
+
measure: 'avg:listPrice',
|
|
67
|
+
w: 3,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'by_category',
|
|
71
|
+
title: 'By category',
|
|
72
|
+
kind: 'chart',
|
|
73
|
+
model: 'product.product',
|
|
74
|
+
measure: 'count',
|
|
75
|
+
groupBy: 'category',
|
|
76
|
+
chart: 'pie',
|
|
77
|
+
w: 6,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'priciest',
|
|
81
|
+
title: 'Highest sales prices',
|
|
82
|
+
kind: 'list',
|
|
83
|
+
model: 'product.product',
|
|
84
|
+
measure: 'sum:listPrice',
|
|
85
|
+
w: 6,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
30
89
|
actions: {
|
|
31
90
|
'product.action_products': action(ProductProduct, {
|
|
32
91
|
label: 'Products',
|
|
@@ -71,15 +130,33 @@ export const product = defineModule({
|
|
|
71
130
|
views: {
|
|
72
131
|
'product.product.kanban': kanban(ProductProduct, {
|
|
73
132
|
groupBy: 'kind',
|
|
74
|
-
card: { title: 'name', subtitle: 'code', footer: ['listPrice', 'uom'] },
|
|
133
|
+
card: { title: 'name', subtitle: 'code', footer: ['listPrice', 'uom'], image: 'image' },
|
|
75
134
|
}),
|
|
76
135
|
'product.product.list': list(ProductProduct, {
|
|
77
|
-
columns: [
|
|
136
|
+
columns: [
|
|
137
|
+
{ field: 'image', widget: 'avatar' },
|
|
138
|
+
'code',
|
|
139
|
+
'name',
|
|
140
|
+
'kind',
|
|
141
|
+
'category',
|
|
142
|
+
'listPrice',
|
|
143
|
+
'standardPrice',
|
|
144
|
+
'uom',
|
|
145
|
+
],
|
|
78
146
|
defaultOrder: ['name asc'],
|
|
79
147
|
}),
|
|
80
148
|
'product.product.form': form(ProductProduct, (k) => ({
|
|
81
149
|
sheet: [
|
|
82
|
-
|
|
150
|
+
// Sold, bought, on hand: Sales, Purchase and Stockroom append their tiles (RFC 0022 §3.1).
|
|
151
|
+
k.stats('related', []),
|
|
152
|
+
k.group('identity', [
|
|
153
|
+
{ field: 'image', widget: 'image' },
|
|
154
|
+
'name',
|
|
155
|
+
'code',
|
|
156
|
+
'kind',
|
|
157
|
+
'category',
|
|
158
|
+
'barcode',
|
|
159
|
+
]),
|
|
83
160
|
k.group('prices', ['listPrice', 'standardPrice', 'uom'], { label: 'Prices' }),
|
|
84
161
|
k.notebook('more', [
|
|
85
162
|
k.page('sales', 'Sales & purchase', [
|
|
@@ -116,6 +193,19 @@ export const product = defineModule({
|
|
|
116
193
|
})),
|
|
117
194
|
},
|
|
118
195
|
search: {
|
|
196
|
+
'uom.uom': search(UomUom, { fields: ['name'], groupBy: ['category'] }),
|
|
197
|
+
'product.category': search(ProductCategory, {
|
|
198
|
+
fields: ['name', 'parent.name'],
|
|
199
|
+
groupBy: ['parent'],
|
|
200
|
+
}),
|
|
201
|
+
'account.tax': search(AccountTax, {
|
|
202
|
+
fields: ['name'],
|
|
203
|
+
filters: {
|
|
204
|
+
sale: { label: 'On sales', domain: { use: 'sale' }, group: 'use' },
|
|
205
|
+
purchase: { label: 'On purchases', domain: { use: 'purchase' }, group: 'use' },
|
|
206
|
+
},
|
|
207
|
+
groupBy: ['use', 'amountType'],
|
|
208
|
+
}),
|
|
119
209
|
'product.product': search(ProductProduct, {
|
|
120
210
|
fields: ['name', 'code', 'barcode'],
|
|
121
211
|
filters: {
|
package/dist/product/module.d.ts
CHANGED
|
@@ -167,6 +167,7 @@ export declare const ProductCategory: import("../server/orm.js").Model<"product.
|
|
|
167
167
|
hasDefault: false;
|
|
168
168
|
sequence: false;
|
|
169
169
|
}>;
|
|
170
|
+
readonly active: import("../server/orm.js").ActiveField;
|
|
170
171
|
readonly name: import("../server/orm.js").CharField<{
|
|
171
172
|
readonly required: true;
|
|
172
173
|
readonly computed: false;
|
|
@@ -543,6 +544,16 @@ export declare const ProductProduct: import("../server/orm.js").Model<"product.p
|
|
|
543
544
|
readonly hasDefault: false;
|
|
544
545
|
readonly readonly: false;
|
|
545
546
|
}, string>;
|
|
547
|
+
readonly image: import("../server/orm.js").Many2oneField<"storage.attachment", {
|
|
548
|
+
readonly required: false;
|
|
549
|
+
readonly computed: false;
|
|
550
|
+
readonly inverse: false;
|
|
551
|
+
readonly sequence: false;
|
|
552
|
+
readonly computeName: undefined;
|
|
553
|
+
readonly store: true;
|
|
554
|
+
readonly hasDefault: false;
|
|
555
|
+
readonly readonly: false;
|
|
556
|
+
}>;
|
|
546
557
|
readonly listPrice: import("../server/orm.js").DecimalField<{
|
|
547
558
|
readonly required: true;
|
|
548
559
|
readonly computed: false;
|
|
@@ -695,6 +706,17 @@ export declare const ProductProduct: import("../server/orm.js").Model<"product.p
|
|
|
695
706
|
readonly hasDefault: false;
|
|
696
707
|
readonly readonly: false;
|
|
697
708
|
}, string>;
|
|
709
|
+
/** A picture: an attachment of the product (RFC 0022 §3.3), with its 256 px thumbnail. */
|
|
710
|
+
readonly image: import("../server/orm.js").Many2oneField<"storage.attachment", {
|
|
711
|
+
readonly required: false;
|
|
712
|
+
readonly computed: false;
|
|
713
|
+
readonly inverse: false;
|
|
714
|
+
readonly sequence: false;
|
|
715
|
+
readonly computeName: undefined;
|
|
716
|
+
readonly store: true;
|
|
717
|
+
readonly hasDefault: false;
|
|
718
|
+
readonly readonly: false;
|
|
719
|
+
}>;
|
|
698
720
|
/** The sales price, in the company currency. */
|
|
699
721
|
readonly listPrice: import("../server/orm.js").DecimalField<{
|
|
700
722
|
readonly required: true;
|
|
@@ -959,6 +981,7 @@ export declare const productShutro: import("../server/orm.js").Module<readonly [
|
|
|
959
981
|
hasDefault: false;
|
|
960
982
|
sequence: false;
|
|
961
983
|
}>;
|
|
984
|
+
readonly active: import("../server/orm.js").ActiveField;
|
|
962
985
|
readonly name: import("../server/orm.js").CharField<{
|
|
963
986
|
readonly required: true;
|
|
964
987
|
readonly computed: false;
|
|
@@ -1333,6 +1356,16 @@ export declare const productShutro: import("../server/orm.js").Module<readonly [
|
|
|
1333
1356
|
readonly hasDefault: false;
|
|
1334
1357
|
readonly readonly: false;
|
|
1335
1358
|
}, string>;
|
|
1359
|
+
readonly image: import("../server/orm.js").Many2oneField<"storage.attachment", {
|
|
1360
|
+
readonly required: false;
|
|
1361
|
+
readonly computed: false;
|
|
1362
|
+
readonly inverse: false;
|
|
1363
|
+
readonly sequence: false;
|
|
1364
|
+
readonly computeName: undefined;
|
|
1365
|
+
readonly store: true;
|
|
1366
|
+
readonly hasDefault: false;
|
|
1367
|
+
readonly readonly: false;
|
|
1368
|
+
}>;
|
|
1336
1369
|
readonly listPrice: import("../server/orm.js").DecimalField<{
|
|
1337
1370
|
readonly required: true;
|
|
1338
1371
|
readonly computed: false;
|
|
@@ -1485,6 +1518,17 @@ export declare const productShutro: import("../server/orm.js").Module<readonly [
|
|
|
1485
1518
|
readonly hasDefault: false;
|
|
1486
1519
|
readonly readonly: false;
|
|
1487
1520
|
}, string>;
|
|
1521
|
+
/** A picture: an attachment of the product (RFC 0022 §3.3), with its 256 px thumbnail. */
|
|
1522
|
+
readonly image: import("../server/orm.js").Many2oneField<"storage.attachment", {
|
|
1523
|
+
readonly required: false;
|
|
1524
|
+
readonly computed: false;
|
|
1525
|
+
readonly inverse: false;
|
|
1526
|
+
readonly sequence: false;
|
|
1527
|
+
readonly computeName: undefined;
|
|
1528
|
+
readonly store: true;
|
|
1529
|
+
readonly hasDefault: false;
|
|
1530
|
+
readonly readonly: false;
|
|
1531
|
+
}>;
|
|
1488
1532
|
/** The sales price, in the company currency. */
|
|
1489
1533
|
readonly listPrice: import("../server/orm.js").DecimalField<{
|
|
1490
1534
|
readonly required: true;
|
|
@@ -1580,4 +1624,4 @@ export declare const productShutro: import("../server/orm.js").Module<readonly [
|
|
|
1580
1624
|
readonly hasDefault: false;
|
|
1581
1625
|
readonly readonly: false;
|
|
1582
1626
|
}>;
|
|
1583
|
-
}>>], readonly [import("../server/orm.js").Module<readonly import("../server/orm.js").AnyModel[], readonly import("../server/orm.js").ModuleBase[], readonly import("../server/orm.js").AnyExtension[]>], readonly []>;
|
|
1627
|
+
}>>], readonly [import("../server/orm.js").Module<readonly import("../server/orm.js").AnyModel[], readonly import("../server/orm.js").ModuleBase[], readonly import("../server/orm.js").AnyExtension[]>, import("../server/orm.js").Module<readonly import("../server/orm.js").AnyModel[], readonly import("../server/orm.js").ModuleBase[], readonly import("../server/orm.js").AnyExtension[]>], readonly []>;
|
package/dist/product/module.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { baseShutro } from '../server/index.js';
|
|
7
7
|
import { orm } from '../server/orm.js';
|
|
8
|
+
import { storageShutro } from '../storage/index.js';
|
|
8
9
|
import { check, defineModel, defineModule, f, record } from './.kosh/bindings.js';
|
|
9
10
|
const ALL = ['read', 'write', 'create', 'unlink', 'export', 'import'];
|
|
10
11
|
const READ = ['read'];
|
|
@@ -36,6 +37,7 @@ export const UomUom = defineModel('uom.uom', {
|
|
|
36
37
|
});
|
|
37
38
|
export const ProductCategory = defineModel('product.category', {
|
|
38
39
|
label: 'Product category',
|
|
40
|
+
archivable: true,
|
|
39
41
|
order: ['name asc'],
|
|
40
42
|
access: { 'product.user': READ, 'product.manager': ALL },
|
|
41
43
|
fields: {
|
|
@@ -90,6 +92,8 @@ export const ProductProduct = defineModel('product.product', {
|
|
|
90
92
|
category: f.many2one('product.category'),
|
|
91
93
|
uom: f.many2one('uom.uom', { label: 'Unit of measure' }),
|
|
92
94
|
barcode: f.char({ index: 'unique' }),
|
|
95
|
+
/** A picture: an attachment of the product (RFC 0022 §3.3), with its 256 px thumbnail. */
|
|
96
|
+
image: f.many2one('storage.attachment', { ondelete: 'set null', label: 'Picture' }),
|
|
93
97
|
/** The sales price, in the company currency. */
|
|
94
98
|
listPrice: f.decimal({ scale: 2, required: true, default: '0', label: 'Sales price' }),
|
|
95
99
|
/** The cost: the default purchase price. */
|
|
@@ -121,7 +125,7 @@ export const ProductProduct = defineModel('product.product', {
|
|
|
121
125
|
const uom = (id, name, category, ratio, rounding) => record('uom.uom', id, { name, category: category, ratio, rounding }, { noupdate: true });
|
|
122
126
|
export const productShutro = defineModule({
|
|
123
127
|
name: 'product',
|
|
124
|
-
version: '0.
|
|
128
|
+
version: '0.4.0',
|
|
125
129
|
migrations: [
|
|
126
130
|
{
|
|
127
131
|
version: '0.2.0',
|
|
@@ -138,9 +142,13 @@ export const productShutro = defineModule({
|
|
|
138
142
|
},
|
|
139
143
|
},
|
|
140
144
|
],
|
|
141
|
-
depends: [baseShutro],
|
|
145
|
+
depends: [baseShutro, storageShutro],
|
|
142
146
|
groups: [
|
|
143
|
-
orm.defineGroup({
|
|
147
|
+
orm.defineGroup({
|
|
148
|
+
code: 'product.user',
|
|
149
|
+
label: 'Products user',
|
|
150
|
+
implies: ['base.user', 'storage.user'],
|
|
151
|
+
}),
|
|
144
152
|
orm.defineGroup({
|
|
145
153
|
code: 'product.manager',
|
|
146
154
|
label: 'Products manager',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash:
|
|
1
|
+
// GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: 573a25fb98026e3a
|
|
2
2
|
// Bindings of module `project`: import the definition API from here to get types scoped to what it can see.
|
|
3
3
|
export { defineModel, defineModule, extendModel, f, replace } from '../../server/orm.js';
|
|
4
4
|
import { definitions } from '../../server/orm.js';
|