shutro-erp 0.3.3 → 0.3.5
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_portal/.kosh/bindings.js +1 -1
- package/dist/account_portal/.kosh/schema.d.ts +181 -3
- package/dist/account_portal/module.d.ts +359 -6
- package/dist/accounting/.kosh/bindings.js +1 -1
- package/dist/accounting/.kosh/schema.d.ts +181 -3
- package/dist/accounting/index.js +214 -2
- package/dist/accounting/module.d.ts +217 -5
- package/dist/accounting/module.js +23 -2
- 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 +48 -0
- package/dist/cli/templates.d.ts +1 -1
- package/dist/cli/templates.js +137 -0
- package/dist/contacts/.kosh/bindings.js +1 -1
- package/dist/contacts/.kosh/schema.d.ts +205 -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 +82 -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 +799 -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 +1843 -0
- package/dist/crm/module.js +207 -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 +1639 -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 +6968 -0
- package/dist/event_account/module.js +90 -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/integrations/index.js +12 -0
- package/dist/integrations/web/OAuthAppsPage.d.ts +9 -0
- package/dist/integrations/web/OAuthAppsPage.js +79 -0
- package/dist/integrations/web/index.d.ts +1 -0
- package/dist/integrations/web/index.js +3 -0
- package/dist/integrations/web/messages.js +58 -0
- package/dist/l10n_bd/.kosh/bindings.js +1 -1
- package/dist/l10n_bd/.kosh/schema.d.ts +181 -3
- package/dist/l10n_bd/module.d.ts +359 -6
- package/dist/l10n_in/.kosh/bindings.js +1 -1
- package/dist/l10n_in/.kosh/schema.d.ts +181 -3
- package/dist/l10n_in/module.d.ts +380 -7
- 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 +1371 -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 +6953 -0
- package/dist/maintenance_stock/module.js +192 -0
- package/dist/messaging/web/index.js +1 -1
- package/dist/modules-sdk/index.d.ts +1 -1
- package/dist/modules-sdk/manifest.d.ts +70 -0
- 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 +1378 -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 +392 -0
- package/dist/mrp/module.d.ts +8608 -0
- package/dist/mrp/module.js +695 -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 +2106 -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 +20840 -0
- package/dist/mrp_account/module.js +123 -0
- package/dist/notify/web/index.js +1 -1
- package/dist/payment/.kosh/bindings.js +1 -1
- package/dist/payment/.kosh/schema.d.ts +181 -3
- package/dist/payment/module.d.ts +359 -6
- package/dist/portal/.kosh/bindings.js +1 -1
- package/dist/portal/.kosh/schema.d.ts +205 -3
- 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 +1690 -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 +349 -0
- package/dist/pos/module.d.ts +9636 -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 +2015 -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 +11935 -0
- package/dist/pos_stock/module.js +115 -0
- package/dist/product/.kosh/bindings.js +1 -1
- package/dist/product/.kosh/schema.d.ts +178 -1
- package/dist/product/index.js +81 -4
- package/dist/product/module.d.ts +43 -1
- package/dist/product/module.js +9 -2
- package/dist/project/.kosh/bindings.js +1 -1
- package/dist/project/.kosh/schema.d.ts +181 -3
- package/dist/project/index.js +147 -7
- package/dist/project/module.d.ts +210 -2
- package/dist/project/module.js +52 -5
- package/dist/project_portal/.kosh/bindings.js +1 -1
- package/dist/project_portal/.kosh/schema.d.ts +181 -3
- package/dist/project_portal/module.d.ts +353 -4
- package/dist/purchase/.kosh/bindings.js +1 -1
- package/dist/purchase/.kosh/schema.d.ts +181 -3
- package/dist/purchase/index.js +163 -3
- package/dist/purchase/module.d.ts +215 -3
- package/dist/purchase/module.js +21 -3
- package/dist/purchase_account/.kosh/bindings.js +1 -1
- package/dist/purchase_account/.kosh/schema.d.ts +182 -3
- package/dist/purchase_account/index.js +26 -1
- package/dist/purchase_account/module.d.ts +393 -7
- package/dist/purchase_portal/.kosh/bindings.js +1 -1
- package/dist/purchase_portal/.kosh/schema.d.ts +181 -3
- package/dist/purchase_portal/module.d.ts +366 -5
- 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 +1310 -0
- package/dist/purchase_stock/index.d.ts +7 -0
- package/dist/purchase_stock/index.js +91 -0
- package/dist/purchase_stock/module.d.ts +6763 -0
- package/dist/purchase_stock/module.js +144 -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 +1959 -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 +35366 -0
- package/dist/purchase_stock_account/module.js +162 -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 +990 -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 +3247 -0
- package/dist/recruitment/module.js +193 -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 +186 -3
- package/dist/sale_account/index.js +22 -1
- package/dist/sale_account/module.d.ts +461 -7
- package/dist/sale_portal/.kosh/bindings.js +1 -1
- package/dist/sale_portal/.kosh/schema.d.ts +185 -3
- package/dist/sale_portal/module.d.ts +434 -5
- package/dist/sale_project/.kosh/bindings.js +1 -1
- package/dist/sale_project/.kosh/schema.d.ts +187 -3
- package/dist/sale_project/module.d.ts +476 -6
- 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 +1228 -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 +6791 -0
- package/dist/sale_stock/module.js +146 -0
- package/dist/sales/.kosh/bindings.js +1 -1
- package/dist/sales/.kosh/schema.d.ts +185 -3
- package/dist/sales/index.js +191 -4
- package/dist/sales/module.d.ts +355 -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 +85 -0
- package/dist/server/auth/oauth.d.ts +21 -0
- package/dist/server/auth/oauth.js +579 -0
- package/dist/server/auth/service.d.ts +4 -0
- package/dist/server/auth/service.js +17 -0
- package/dist/server/identity.d.ts +2 -0
- package/dist/server/images.d.ts +12 -0
- package/dist/server/images.js +139 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +2 -0
- package/dist/server/server.d.ts +4 -0
- package/dist/server/server.js +9 -1
- package/dist/settings/app-settings.d.ts +2 -0
- package/dist/settings/app-settings.js +518 -0
- package/dist/settings/company.js +3 -1
- package/dist/settings/index.d.ts +1 -0
- package/dist/settings/index.js +15 -0
- package/dist/settings/people.js +32 -6
- package/dist/settings/web/AppSettingsPage.d.ts +11 -0
- package/dist/settings/web/AppSettingsPage.js +210 -0
- package/dist/settings/web/CompaniesPage.js +2 -2
- package/dist/settings/web/CompanyPage.js +13 -2
- package/dist/settings/web/ConnectedAppsPage.d.ts +7 -0
- package/dist/settings/web/ConnectedAppsPage.js +33 -0
- package/dist/settings/web/OverviewPage.js +28 -4
- package/dist/settings/web/PeoplePage.js +23 -18
- package/dist/settings/web/ProfilePage.js +9 -7
- package/dist/settings/web/index.d.ts +2 -0
- package/dist/settings/web/index.js +8 -0
- package/dist/settings/web/messages.js +146 -2
- package/dist/stock/.kosh/bindings.d.ts +22 -0
- package/dist/stock/.kosh/bindings.js +15 -0
- package/dist/stock/.kosh/schema.d.ts +1147 -0
- package/dist/stock/demo.d.ts +7 -0
- package/dist/stock/demo.js +55 -0
- package/dist/stock/index.d.ts +3 -0
- package/dist/stock/index.js +674 -0
- package/dist/stock/module.d.ts +6330 -0
- package/dist/stock/module.js +1325 -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 +11 -0
- package/dist/stock/web/index.js +16 -0
- package/dist/stock/web/messages.d.ts +2 -0
- package/dist/stock/web/messages.js +25 -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 +1875 -0
- package/dist/stock_account/index.d.ts +3 -0
- package/dist/stock_account/index.js +130 -0
- package/dist/stock_account/module.d.ts +10655 -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 +413 -0
- package/dist/trade_finance/module.d.ts +3779 -0
- package/dist/trade_finance/module.js +505 -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 +1711 -0
- package/dist/trade_finance_account/index.d.ts +3 -0
- package/dist/trade_finance_account/index.js +92 -0
- package/dist/trade_finance_account/module.d.ts +7928 -0
- package/dist/trade_finance_account/module.js +244 -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 +1153 -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 +4252 -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 +1071 -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 +4280 -0
- package/dist/trade_finance_sale/module.js +44 -0
- package/dist/ui/api.d.ts +6 -1
- package/dist/ui/api.js +2 -1
- package/dist/ui/app.js +51 -17
- package/dist/ui/components/AppIcon.js +33 -1
- package/dist/ui/components/Avatar.d.ts +21 -0
- package/dist/ui/components/Avatar.js +71 -0
- package/dist/ui/components/primitives.d.ts +2 -0
- package/dist/ui/components/primitives.js +7 -1
- package/dist/ui/i18n/messages.d.ts +53 -0
- package/dist/ui/i18n/messages.js +98 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +2 -0
- package/dist/ui/offline/queue.d.ts +5 -1
- package/dist/ui/offline/queue.js +2 -0
- package/dist/ui/registry.d.ts +12 -1
- package/dist/ui/registry.js +10 -1
- package/dist/ui/search/ViewTabs.d.ts +14 -0
- package/dist/ui/search/ViewTabs.js +42 -0
- package/dist/ui/shell/Consent.d.ts +5 -0
- package/dist/ui/shell/Consent.js +35 -0
- package/dist/ui/shell/Home.js +136 -16
- package/dist/ui/shell/Sidebar.js +15 -22
- package/dist/ui/views/FormView.js +98 -17
- package/dist/ui/views/KanbanView.d.ts +2 -0
- package/dist/ui/views/KanbanView.js +32 -3
- package/dist/ui/views/ListView.js +155 -31
- 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 +194 -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 +250 -0
- package/dist/website/module.d.ts +2987 -0
- package/dist/website/module.js +281 -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 +966 -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 +2955 -0
- package/dist/website_crm/module.js +44 -0
- package/package.json +118 -1
|
@@ -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: 390fefb5f47e15fa
|
|
2
2
|
// Schema view of module `purchase` (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
|
|
|
@@ -15,7 +15,9 @@ export interface SchemaView {
|
|
|
15
15
|
readonly 'auth.session': AuthSession;
|
|
16
16
|
readonly 'auth.user_grant': AuthUserGrant;
|
|
17
17
|
readonly 'auth.user_group': AuthUserGroup;
|
|
18
|
+
readonly 'kosh.image': KoshImage;
|
|
18
19
|
readonly 'kosh.saved_view': KoshSavedView;
|
|
20
|
+
readonly 'kosh.setting': KoshSetting;
|
|
19
21
|
readonly 'mail.activity': MailActivity;
|
|
20
22
|
readonly 'mail.activity.type': MailActivityType;
|
|
21
23
|
readonly 'mail.channel': MailChannel;
|
|
@@ -23,6 +25,10 @@ export interface SchemaView {
|
|
|
23
25
|
readonly 'mail.follower': MailFollower;
|
|
24
26
|
readonly 'mail.message': MailMessage;
|
|
25
27
|
readonly 'mail.message.reaction': MailMessageReaction;
|
|
28
|
+
readonly 'oauth.app': OauthApp;
|
|
29
|
+
readonly 'oauth.code': OauthCode;
|
|
30
|
+
readonly 'oauth.grant': OauthGrant;
|
|
31
|
+
readonly 'oauth.token': OauthToken;
|
|
26
32
|
readonly 'product.category': ProductCategory;
|
|
27
33
|
readonly 'product.product': ProductProduct;
|
|
28
34
|
readonly 'purchase.order': PurchaseOrder;
|
|
@@ -30,6 +36,7 @@ export interface SchemaView {
|
|
|
30
36
|
readonly 'res.company': ResCompany;
|
|
31
37
|
readonly 'res.currency': ResCurrency;
|
|
32
38
|
readonly 'res.partner': ResPartner;
|
|
39
|
+
readonly 'res.partner.tag': ResPartnerTag;
|
|
33
40
|
readonly 'res.users': ResUsers;
|
|
34
41
|
readonly 'storage.attachment': StorageAttachment;
|
|
35
42
|
readonly 'uom.uom': UomUom;
|
|
@@ -312,6 +319,29 @@ export interface AuthUserGroup {
|
|
|
312
319
|
export interface AuthUserGroupMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'auth.user_group'> {
|
|
313
320
|
}
|
|
314
321
|
|
|
322
|
+
/** `kosh.image` (owner: base). */
|
|
323
|
+
export interface KoshImage {
|
|
324
|
+
readonly name: 'kosh.image';
|
|
325
|
+
readonly fields: {
|
|
326
|
+
readonly id: F.Id<'kosh.image'>;
|
|
327
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
328
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
329
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
330
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
331
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
332
|
+
readonly ownerModel: F.Char<{ readonly required: true }>;
|
|
333
|
+
readonly ownerId: F.Integer<{ readonly required: true }>;
|
|
334
|
+
readonly mime: F.Char<{ readonly required: true }>;
|
|
335
|
+
readonly data: F.Text<{ readonly required: true }>;
|
|
336
|
+
readonly hash: F.Char<{ readonly required: true }>;
|
|
337
|
+
};
|
|
338
|
+
readonly methods: KoshImageMethods;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/** Methods of `kosh.image`: declared ones and transitions. */
|
|
342
|
+
export interface KoshImageMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'kosh.image'> {
|
|
343
|
+
}
|
|
344
|
+
|
|
315
345
|
/** `kosh.saved_view` (owner: base). */
|
|
316
346
|
export interface KoshSavedView {
|
|
317
347
|
readonly name: 'kosh.saved_view';
|
|
@@ -336,6 +366,26 @@ export interface KoshSavedView {
|
|
|
336
366
|
export interface KoshSavedViewMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'kosh.saved_view'> {
|
|
337
367
|
}
|
|
338
368
|
|
|
369
|
+
/** `kosh.setting` (owner: base). */
|
|
370
|
+
export interface KoshSetting {
|
|
371
|
+
readonly name: 'kosh.setting';
|
|
372
|
+
readonly fields: {
|
|
373
|
+
readonly id: F.Id<'kosh.setting'>;
|
|
374
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
375
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
376
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
377
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
378
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
379
|
+
readonly key: F.Char<{ readonly required: true }>;
|
|
380
|
+
readonly value: F.Json;
|
|
381
|
+
};
|
|
382
|
+
readonly methods: KoshSettingMethods;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/** Methods of `kosh.setting`: declared ones and transitions. */
|
|
386
|
+
export interface KoshSettingMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'kosh.setting'> {
|
|
387
|
+
}
|
|
388
|
+
|
|
339
389
|
/** `mail.activity` (owner: messaging). */
|
|
340
390
|
export interface MailActivity {
|
|
341
391
|
readonly name: 'mail.activity';
|
|
@@ -514,6 +564,105 @@ export interface MailMessageReaction {
|
|
|
514
564
|
export interface MailMessageReactionMethods extends F.Methods<typeof import('../../messaging/index.js').messagingShutro, 'mail.message.reaction'> {
|
|
515
565
|
}
|
|
516
566
|
|
|
567
|
+
/** `oauth.app` (owner: base). */
|
|
568
|
+
export interface OauthApp {
|
|
569
|
+
readonly name: 'oauth.app';
|
|
570
|
+
readonly fields: {
|
|
571
|
+
readonly id: F.Id<'oauth.app'>;
|
|
572
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
573
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
574
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
575
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
576
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
577
|
+
readonly name: F.Char<{ readonly required: true }>;
|
|
578
|
+
readonly clientId: F.Char<{ readonly required: true }>;
|
|
579
|
+
readonly secretHash: F.Char;
|
|
580
|
+
readonly confidential: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
581
|
+
readonly redirectUris: F.Text<{ readonly required: true }>;
|
|
582
|
+
readonly scopes: F.Char<{ readonly required: true }>;
|
|
583
|
+
readonly homepage: F.Char;
|
|
584
|
+
readonly active: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
585
|
+
readonly owner: F.Many2one<'res.users'>;
|
|
586
|
+
};
|
|
587
|
+
readonly methods: OauthAppMethods;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/** Methods of `oauth.app`: declared ones and transitions. */
|
|
591
|
+
export interface OauthAppMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'oauth.app'> {
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/** `oauth.code` (owner: base). */
|
|
595
|
+
export interface OauthCode {
|
|
596
|
+
readonly name: 'oauth.code';
|
|
597
|
+
readonly fields: {
|
|
598
|
+
readonly id: F.Id<'oauth.code'>;
|
|
599
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
600
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
601
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
602
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
603
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
604
|
+
readonly codeHash: F.Char<{ readonly required: true }>;
|
|
605
|
+
readonly grant: F.Many2one<'oauth.grant', { readonly required: true }>;
|
|
606
|
+
readonly redirectUri: F.Char<{ readonly required: true }>;
|
|
607
|
+
readonly challenge: F.Char;
|
|
608
|
+
readonly expiresAt: F.Datetime<{ readonly required: true }>;
|
|
609
|
+
readonly used: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
610
|
+
};
|
|
611
|
+
readonly methods: OauthCodeMethods;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/** Methods of `oauth.code`: declared ones and transitions. */
|
|
615
|
+
export interface OauthCodeMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'oauth.code'> {
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/** `oauth.grant` (owner: base). */
|
|
619
|
+
export interface OauthGrant {
|
|
620
|
+
readonly name: 'oauth.grant';
|
|
621
|
+
readonly fields: {
|
|
622
|
+
readonly id: F.Id<'oauth.grant'>;
|
|
623
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
624
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
625
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
626
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
627
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
628
|
+
readonly user: F.Many2one<'res.users', { readonly required: true }>;
|
|
629
|
+
readonly app: F.Many2one<'oauth.app', { readonly required: true }>;
|
|
630
|
+
readonly scopes: F.Char<{ readonly required: true }>;
|
|
631
|
+
readonly revoked: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
632
|
+
readonly lastUsedAt: F.Datetime;
|
|
633
|
+
};
|
|
634
|
+
readonly methods: OauthGrantMethods;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/** Methods of `oauth.grant`: declared ones and transitions. */
|
|
638
|
+
export interface OauthGrantMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'oauth.grant'> {
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/** `oauth.token` (owner: base). */
|
|
642
|
+
export interface OauthToken {
|
|
643
|
+
readonly name: 'oauth.token';
|
|
644
|
+
readonly fields: {
|
|
645
|
+
readonly id: F.Id<'oauth.token'>;
|
|
646
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
647
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
648
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
649
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
650
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
651
|
+
readonly grant: F.Many2one<'oauth.grant', { readonly required: true }>;
|
|
652
|
+
readonly accessHash: F.Char<{ readonly required: true }>;
|
|
653
|
+
readonly refreshHash: F.Char<{ readonly required: true }>;
|
|
654
|
+
readonly accessExpiresAt: F.Datetime<{ readonly required: true }>;
|
|
655
|
+
readonly refreshExpiresAt: F.Datetime<{ readonly required: true }>;
|
|
656
|
+
readonly revoked: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
657
|
+
readonly rotated: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
658
|
+
};
|
|
659
|
+
readonly methods: OauthTokenMethods;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/** Methods of `oauth.token`: declared ones and transitions. */
|
|
663
|
+
export interface OauthTokenMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'oauth.token'> {
|
|
664
|
+
}
|
|
665
|
+
|
|
517
666
|
/** `product.category` (owner: product). */
|
|
518
667
|
export interface ProductCategory {
|
|
519
668
|
readonly name: 'product.category';
|
|
@@ -551,6 +700,7 @@ export interface ProductProduct {
|
|
|
551
700
|
readonly category: F.Many2one<'product.category'>;
|
|
552
701
|
readonly uom: F.Many2one<'uom.uom'>;
|
|
553
702
|
readonly barcode: F.Char;
|
|
703
|
+
readonly image: F.Many2one<'storage.attachment'>;
|
|
554
704
|
readonly listPrice: F.Decimal<{ readonly required: true; readonly default: true }>;
|
|
555
705
|
readonly standardPrice: F.Decimal<{ readonly required: true; readonly default: true }>;
|
|
556
706
|
readonly saleOk: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
@@ -639,7 +789,7 @@ export interface PurchaseOrderLine {
|
|
|
639
789
|
export interface PurchaseOrderLineMethods extends F.Methods<typeof import('../module.js').purchaseShutro, 'purchase.order.line'> {
|
|
640
790
|
}
|
|
641
791
|
|
|
642
|
-
/** `res.company` (owner: base). */
|
|
792
|
+
/** `res.company` (owner: base; extended by: contacts, purchase). */
|
|
643
793
|
export interface ResCompany {
|
|
644
794
|
readonly name: 'res.company';
|
|
645
795
|
readonly fields: {
|
|
@@ -659,12 +809,15 @@ export interface ResCompany {
|
|
|
659
809
|
readonly email: F.Char;
|
|
660
810
|
readonly phone: F.Char;
|
|
661
811
|
readonly website: F.Char;
|
|
812
|
+
readonly contactTaxIdRequired: F.Bool<{ readonly required: true; readonly default: true }>; // contacts
|
|
813
|
+
readonly contactUniqueEmail: F.Bool<{ readonly required: true; readonly default: true }>; // contacts
|
|
814
|
+
readonly purchaseTerms: F.Text; // purchase
|
|
662
815
|
};
|
|
663
816
|
readonly methods: ResCompanyMethods;
|
|
664
817
|
}
|
|
665
818
|
|
|
666
819
|
/** Methods of `res.company`: declared ones and transitions. */
|
|
667
|
-
export interface ResCompanyMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'res.company'> {
|
|
820
|
+
export interface ResCompanyMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'res.company'>, F.Methods<typeof import('../../contacts/index.js').contactsShutro, 'res.company'>, F.Methods<typeof import('../module.js').purchaseShutro, 'res.company'> {
|
|
668
821
|
}
|
|
669
822
|
|
|
670
823
|
/** `res.currency` (owner: base). */
|
|
@@ -701,6 +854,10 @@ export interface ResPartner {
|
|
|
701
854
|
readonly active: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
702
855
|
readonly company: F.Many2one<'res.company', { readonly default: true }>;
|
|
703
856
|
readonly name: F.Char<{ readonly required: true }>;
|
|
857
|
+
readonly image: F.Many2one<'storage.attachment'>;
|
|
858
|
+
readonly tags: F.Many2many<'res.partner.tag', { readonly required: true }>;
|
|
859
|
+
readonly latitude: F.Decimal;
|
|
860
|
+
readonly longitude: F.Decimal;
|
|
704
861
|
readonly isCompany: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
705
862
|
readonly parent: F.Many2one<'res.partner'>;
|
|
706
863
|
readonly contacts: F.One2many<'res.partner', { readonly required: true }>;
|
|
@@ -726,6 +883,25 @@ export interface ResPartner {
|
|
|
726
883
|
export interface ResPartnerMethods extends F.Methods<typeof import('../../contacts/index.js').contactsShutro, 'res.partner'> {
|
|
727
884
|
}
|
|
728
885
|
|
|
886
|
+
/** `res.partner.tag` (owner: contacts). */
|
|
887
|
+
export interface ResPartnerTag {
|
|
888
|
+
readonly name: 'res.partner.tag';
|
|
889
|
+
readonly fields: {
|
|
890
|
+
readonly id: F.Id<'res.partner.tag'>;
|
|
891
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
892
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
893
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
894
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
895
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
896
|
+
readonly name: F.Char<{ readonly required: true }>;
|
|
897
|
+
};
|
|
898
|
+
readonly methods: ResPartnerTagMethods;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
/** Methods of `res.partner.tag`: declared ones and transitions. */
|
|
902
|
+
export interface ResPartnerTagMethods extends F.Methods<typeof import('../../contacts/index.js').contactsShutro, 'res.partner.tag'> {
|
|
903
|
+
}
|
|
904
|
+
|
|
729
905
|
/** `res.users` (owner: base). */
|
|
730
906
|
export interface ResUsers {
|
|
731
907
|
readonly name: 'res.users';
|
|
@@ -771,6 +947,8 @@ export interface StorageAttachment {
|
|
|
771
947
|
readonly key: F.Char<{ readonly required: true }>;
|
|
772
948
|
readonly resModel: F.Char<{ readonly required: true }>;
|
|
773
949
|
readonly resId: F.Integer<{ readonly required: true }>;
|
|
950
|
+
readonly variantOf: F.Many2one<'storage.attachment'>;
|
|
951
|
+
readonly width: F.Integer;
|
|
774
952
|
};
|
|
775
953
|
readonly methods: StorageAttachmentMethods;
|
|
776
954
|
}
|
package/dist/purchase/index.js
CHANGED
|
@@ -9,7 +9,8 @@ import { messaging } from '../messaging/index.js';
|
|
|
9
9
|
import { defineModule } from '../modules-sdk/index.js';
|
|
10
10
|
import { permissions } from '../permissions/index.js';
|
|
11
11
|
import { product } from '../product/index.js';
|
|
12
|
-
import {
|
|
12
|
+
import { reporting } from '../reporting/index.js';
|
|
13
|
+
import { action, calendar, form, kanban, list, search, stat } from '../views/index.js';
|
|
13
14
|
import { purchaseDemo } from './demo.js';
|
|
14
15
|
import { PurchaseOrder, purchaseShutro } from './module.js';
|
|
15
16
|
export { PurchaseOrder, PurchaseOrderLine, purchaseShutro } from './module.js';
|
|
@@ -17,7 +18,14 @@ export const purchase = defineModule({
|
|
|
17
18
|
shutro: purchaseShutro,
|
|
18
19
|
kosh: '^0.1.0',
|
|
19
20
|
hooks: { demo: purchaseDemo },
|
|
20
|
-
depends: [contacts, product, messaging, permissions],
|
|
21
|
+
depends: [contacts, product, messaging, permissions, reporting],
|
|
22
|
+
events: [
|
|
23
|
+
{
|
|
24
|
+
topic: 'purchase.order.confirmed',
|
|
25
|
+
model: 'purchase.order',
|
|
26
|
+
label: 'Purchase order confirmed',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
21
29
|
app: {
|
|
22
30
|
code: 'purchase',
|
|
23
31
|
label: 'Purchase',
|
|
@@ -31,6 +39,22 @@ export const purchase = defineModule({
|
|
|
31
39
|
manager: { label: 'Manager (all orders)', groups: ['purchase.manager'], implies: ['user'] },
|
|
32
40
|
director: { label: 'Director', groups: ['purchase.director'], implies: ['manager'] },
|
|
33
41
|
},
|
|
42
|
+
// Settings › App settings › Purchase (RFC 0020): per company, changed by purchase managers.
|
|
43
|
+
settings: {
|
|
44
|
+
sections: [
|
|
45
|
+
{
|
|
46
|
+
key: 'orders',
|
|
47
|
+
label: 'Purchase orders',
|
|
48
|
+
description: 'The terms new requests for quotation and purchase orders start with.',
|
|
49
|
+
keywords: 'purchase order rfq terms conditions vendor',
|
|
50
|
+
scope: 'company',
|
|
51
|
+
editors: ['purchase.manager'],
|
|
52
|
+
fields: [
|
|
53
|
+
{ key: 'purchaseTerms', help: 'Filled in on new orders; each can still be changed.' },
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
34
58
|
approvals: [
|
|
35
59
|
{
|
|
36
60
|
name: 'Purchase approvals',
|
|
@@ -51,6 +75,134 @@ export const purchase = defineModule({
|
|
|
51
75
|
],
|
|
52
76
|
},
|
|
53
77
|
],
|
|
78
|
+
// The Overview (RFC 0022 step 2): spend against last month, what waits, who we buy from.
|
|
79
|
+
overview: {
|
|
80
|
+
cards: [
|
|
81
|
+
{
|
|
82
|
+
id: 'spend_month',
|
|
83
|
+
title: 'Purchases this month',
|
|
84
|
+
kind: 'kpi',
|
|
85
|
+
model: 'purchase.order',
|
|
86
|
+
measure: 'sum:amountTotal',
|
|
87
|
+
filter: { state: { in: ['purchase', 'done'] } },
|
|
88
|
+
comparison: { field: 'dateOrder', mode: 'previous' },
|
|
89
|
+
w: 3,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'orders_month',
|
|
93
|
+
title: 'Orders this month',
|
|
94
|
+
kind: 'kpi',
|
|
95
|
+
model: 'purchase.order',
|
|
96
|
+
measure: 'count',
|
|
97
|
+
filter: { state: { in: ['purchase', 'done'] } },
|
|
98
|
+
comparison: { field: 'dateOrder', mode: 'previous' },
|
|
99
|
+
w: 3,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'open_rfqs',
|
|
103
|
+
title: 'Open requests',
|
|
104
|
+
kind: 'kpi',
|
|
105
|
+
model: 'purchase.order',
|
|
106
|
+
measure: 'count',
|
|
107
|
+
filter: { state: { in: ['draft', 'sent'] } },
|
|
108
|
+
w: 3,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'to_approve',
|
|
112
|
+
title: 'Waiting approval',
|
|
113
|
+
kind: 'kpi',
|
|
114
|
+
model: 'purchase.order',
|
|
115
|
+
measure: 'count',
|
|
116
|
+
filter: { state: 'to_approve' },
|
|
117
|
+
w: 3,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: 'spend_by_month',
|
|
121
|
+
title: 'Purchases by month',
|
|
122
|
+
kind: 'chart',
|
|
123
|
+
model: 'purchase.order',
|
|
124
|
+
measure: 'sum:amountTotal',
|
|
125
|
+
groupBy: 'dateOrder:month',
|
|
126
|
+
filter: { state: { in: ['purchase', 'done'] } },
|
|
127
|
+
chart: 'bar',
|
|
128
|
+
w: 6,
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: 'top_vendors',
|
|
132
|
+
title: 'Top vendors',
|
|
133
|
+
kind: 'pivot',
|
|
134
|
+
model: 'purchase.order',
|
|
135
|
+
measure: 'sum:amountTotal',
|
|
136
|
+
groupBy: 'partner',
|
|
137
|
+
filter: { state: { in: ['purchase', 'done'] } },
|
|
138
|
+
w: 6,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: 'by_buyer',
|
|
142
|
+
title: 'By buyer',
|
|
143
|
+
kind: 'chart',
|
|
144
|
+
model: 'purchase.order',
|
|
145
|
+
measure: 'sum:amountTotal',
|
|
146
|
+
groupBy: 'user',
|
|
147
|
+
filter: { state: { in: ['purchase', 'done'] } },
|
|
148
|
+
chart: 'pie',
|
|
149
|
+
w: 6,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: 'biggest_open',
|
|
153
|
+
title: 'Biggest open requests',
|
|
154
|
+
kind: 'list',
|
|
155
|
+
model: 'purchase.order',
|
|
156
|
+
measure: 'sum:amountTotal',
|
|
157
|
+
filter: { state: { in: ['draft', 'sent', 'to_approve'] } },
|
|
158
|
+
w: 6,
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
viewExtensions: [
|
|
163
|
+
{
|
|
164
|
+
view: 'product.product.form',
|
|
165
|
+
operations: [
|
|
166
|
+
{
|
|
167
|
+
append: 'related',
|
|
168
|
+
nodes: [
|
|
169
|
+
stat({
|
|
170
|
+
id: 'product_bought',
|
|
171
|
+
label: 'Bought',
|
|
172
|
+
model: 'purchase.order.line',
|
|
173
|
+
where: { product: { $record: 'id' }, 'order.state': { in: ['purchase', 'done'] } },
|
|
174
|
+
measure: { sum: 'quantity' },
|
|
175
|
+
}),
|
|
176
|
+
],
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
view: 'res.partner.form',
|
|
182
|
+
operations: [
|
|
183
|
+
{
|
|
184
|
+
append: 'related',
|
|
185
|
+
nodes: [
|
|
186
|
+
stat({
|
|
187
|
+
id: 'purchase_orders',
|
|
188
|
+
label: 'Purchase orders',
|
|
189
|
+
model: PurchaseOrder,
|
|
190
|
+
where: { partner: { $record: 'id' }, state: { in: ['purchase', 'done'] } },
|
|
191
|
+
action: 'purchase.action_orders',
|
|
192
|
+
}),
|
|
193
|
+
stat({
|
|
194
|
+
id: 'purchase_spend',
|
|
195
|
+
label: 'Purchases',
|
|
196
|
+
model: PurchaseOrder,
|
|
197
|
+
where: { partner: { $record: 'id' }, state: { in: ['purchase', 'done'] } },
|
|
198
|
+
measure: { sum: 'amountTotal' },
|
|
199
|
+
action: 'purchase.action_orders',
|
|
200
|
+
}),
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
},
|
|
205
|
+
],
|
|
54
206
|
actions: {
|
|
55
207
|
'purchase.action_rfqs': action(PurchaseOrder, {
|
|
56
208
|
label: 'Requests for quotation',
|
|
@@ -59,7 +211,7 @@ export const purchase = defineModule({
|
|
|
59
211
|
}),
|
|
60
212
|
'purchase.action_orders': action(PurchaseOrder, {
|
|
61
213
|
label: 'Purchase orders',
|
|
62
|
-
views: ['list', 'kanban', 'form'],
|
|
214
|
+
views: ['list', 'kanban', 'calendar', 'form'],
|
|
63
215
|
defaultFilters: ['orders'],
|
|
64
216
|
}),
|
|
65
217
|
'purchase.action_to_approve': action(PurchaseOrder, {
|
|
@@ -138,6 +290,8 @@ export const purchase = defineModule({
|
|
|
138
290
|
],
|
|
139
291
|
},
|
|
140
292
|
sheet: [
|
|
293
|
+
// Bills and receipts: the bridges append their tiles (RFC 0022 §3.1).
|
|
294
|
+
k.stats('related', []),
|
|
141
295
|
k.group('vendor', ['partner', 'partnerReference', 'currency']),
|
|
142
296
|
k.group('dates', ['name', 'dateOrder', 'datePlanned', 'user', 'origin']),
|
|
143
297
|
k.lines('lines', [
|
|
@@ -157,6 +311,12 @@ export const purchase = defineModule({
|
|
|
157
311
|
readonlyWhen: { state: { in: ['done', 'cancel'] } },
|
|
158
312
|
chatter: true,
|
|
159
313
|
})),
|
|
314
|
+
'purchase.order.calendar': calendar(PurchaseOrder, {
|
|
315
|
+
dateStart: 'datePlanned',
|
|
316
|
+
title: 'name',
|
|
317
|
+
color: 'state',
|
|
318
|
+
mode: 'month',
|
|
319
|
+
}),
|
|
160
320
|
},
|
|
161
321
|
search: {
|
|
162
322
|
'purchase.order': search(PurchaseOrder, {
|