shutro-erp 0.3.5 → 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 +123 -4
- package/dist/account_portal/module.d.ts +146 -0
- package/dist/accounting/.kosh/bindings.js +1 -1
- package/dist/accounting/.kosh/schema.d.ts +123 -4
- package/dist/accounting/index.d.ts +1 -1
- package/dist/accounting/index.js +131 -3
- package/dist/accounting/module.d.ts +296 -0
- package/dist/accounting/module.js +32 -1
- 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/cli/init.js +32 -0
- package/dist/cli/templates.d.ts +1 -1
- package/dist/cli/templates.js +89 -0
- package/dist/contacts/module.js +13 -2
- package/dist/crm/.kosh/bindings.js +1 -1
- package/dist/crm/.kosh/schema.d.ts +2 -1
- package/dist/crm/module.d.ts +2 -0
- package/dist/crm/module.js +2 -1
- 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_account/.kosh/bindings.js +1 -1
- package/dist/event_account/.kosh/schema.d.ts +123 -4
- package/dist/event_account/module.d.ts +146 -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/index.d.ts +1 -1
- package/dist/hr/index.js +1 -1
- package/dist/l10n_bd/.kosh/bindings.js +1 -1
- package/dist/l10n_bd/.kosh/schema.d.ts +123 -4
- package/dist/l10n_bd/module.d.ts +146 -0
- 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 +123 -4
- package/dist/l10n_in/module.d.ts +147 -0
- package/dist/mail/inbound/handle.js +6 -1
- package/dist/maintenance_stock/.kosh/bindings.js +1 -1
- package/dist/maintenance_stock/.kosh/schema.d.ts +77 -2
- package/dist/maintenance_stock/module.d.ts +788 -66
- package/dist/modules-sdk/index.d.ts +1 -1
- package/dist/modules-sdk/manifest.d.ts +39 -2
- package/dist/mrp/.kosh/bindings.js +1 -1
- package/dist/mrp/.kosh/schema.d.ts +77 -2
- package/dist/mrp/index.d.ts +1 -1
- package/dist/mrp/index.js +2 -1
- package/dist/mrp/module.d.ts +781 -54
- package/dist/mrp/module.js +64 -2
- package/dist/mrp_account/.kosh/bindings.js +1 -1
- package/dist/mrp_account/.kosh/schema.d.ts +198 -5
- package/dist/mrp_account/module.d.ts +4852 -2541
- package/dist/payment/.kosh/bindings.js +1 -1
- package/dist/payment/.kosh/schema.d.ts +125 -5
- package/dist/payment/index.d.ts +41 -0
- package/dist/payment/index.js +131 -74
- package/dist/payment/module.d.ts +210 -6
- 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/index.js +1 -1
- package/dist/pos/.kosh/bindings.js +1 -1
- package/dist/pos/.kosh/schema.d.ts +123 -4
- package/dist/pos/index.js +4 -0
- package/dist/pos/module.d.ts +147 -0
- package/dist/pos_stock/.kosh/bindings.js +1 -1
- package/dist/pos_stock/.kosh/schema.d.ts +198 -5
- package/dist/pos_stock/module.d.ts +914 -46
- package/dist/product/.kosh/bindings.js +1 -1
- package/dist/product/.kosh/schema.d.ts +2 -1
- package/dist/product/index.js +13 -0
- package/dist/product/module.d.ts +2 -0
- package/dist/product/module.js +2 -1
- package/dist/project/.kosh/bindings.js +1 -1
- package/dist/project/.kosh/schema.d.ts +672 -1
- package/dist/project/index.d.ts +3 -1
- package/dist/project/index.js +901 -14
- package/dist/project/module.d.ts +9892 -390
- package/dist/project/module.js +1530 -13
- 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 +672 -1
- package/dist/project_portal/module.d.ts +4798 -129
- 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 +97 -4
- package/dist/purchase/module.d.ts +13 -2
- package/dist/purchase/module.js +10 -1
- package/dist/purchase_account/.kosh/bindings.js +1 -1
- package/dist/purchase_account/.kosh/schema.d.ts +126 -6
- package/dist/purchase_account/index.js +1 -0
- package/dist/purchase_account/module.d.ts +176 -1
- 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 +97 -4
- package/dist/purchase_portal/module.d.ts +6 -1
- package/dist/purchase_stock/.kosh/bindings.js +1 -1
- package/dist/purchase_stock/.kosh/schema.d.ts +174 -5
- package/dist/purchase_stock/index.d.ts +1 -1
- package/dist/purchase_stock/index.js +9 -2
- package/dist/purchase_stock/module.d.ts +840 -68
- package/dist/purchase_stock/module.js +242 -6
- package/dist/purchase_stock_account/.kosh/bindings.js +1 -1
- package/dist/purchase_stock_account/.kosh/schema.d.ts +203 -7
- package/dist/purchase_stock_account/module.d.ts +8163 -5514
- package/dist/purchase_stock_account/module.js +11 -5
- package/dist/recruitment/.kosh/bindings.js +1 -1
- package/dist/recruitment/.kosh/schema.d.ts +2 -1
- package/dist/recruitment/module.d.ts +2 -0
- package/dist/recruitment/module.js +2 -1
- package/dist/sale_account/.kosh/bindings.js +1 -1
- package/dist/sale_account/.kosh/schema.d.ts +123 -4
- package/dist/sale_account/module.d.ts +147 -0
- package/dist/sale_portal/.kosh/bindings.js +1 -1
- package/dist/sale_portal/.kosh/schema.d.ts +2 -1
- package/dist/sale_portal/module.d.ts +1 -0
- package/dist/sale_project/.kosh/bindings.js +1 -1
- package/dist/sale_project/.kosh/schema.d.ts +673 -1
- package/dist/sale_project/module.d.ts +4800 -129
- package/dist/sale_project/module.js +17 -1
- package/dist/sale_stock/.kosh/bindings.js +1 -1
- package/dist/sale_stock/.kosh/schema.d.ts +77 -2
- package/dist/sale_stock/module.d.ts +789 -66
- package/dist/sales/.kosh/bindings.js +1 -1
- package/dist/sales/.kosh/schema.d.ts +2 -1
- package/dist/sales/index.js +4 -0
- package/dist/sales/module.d.ts +1 -0
- 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.js +1 -1
- package/dist/stock/.kosh/schema.d.ts +77 -2
- package/dist/stock/demo.d.ts +2 -1
- package/dist/stock/demo.js +28 -1
- package/dist/stock/index.d.ts +2 -1
- package/dist/stock/index.js +233 -4
- package/dist/stock/module.d.ts +2363 -837
- package/dist/stock/module.js +569 -14
- 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/index.d.ts +4 -2
- package/dist/stock/web/index.js +6 -2
- package/dist/stock/web/messages.js +52 -0
- package/dist/stock_account/.kosh/bindings.js +1 -1
- package/dist/stock_account/.kosh/schema.d.ts +198 -5
- package/dist/stock_account/index.js +10 -0
- package/dist/stock_account/module.d.ts +969 -101
- package/dist/trade_finance/index.js +2 -0
- package/dist/trade_finance/module.js +2 -0
- package/dist/trade_finance_account/.kosh/bindings.js +1 -1
- package/dist/trade_finance_account/.kosh/schema.d.ts +123 -4
- package/dist/trade_finance_account/index.js +1 -0
- package/dist/trade_finance_account/module.d.ts +146 -0
- package/dist/trade_finance_account/module.js +1 -0
- package/dist/trade_finance_purchase/.kosh/bindings.js +1 -1
- package/dist/trade_finance_purchase/.kosh/schema.d.ts +97 -4
- package/dist/trade_finance_purchase/module.d.ts +6 -1
- package/dist/trade_finance_sale/.kosh/bindings.js +1 -1
- package/dist/trade_finance_sale/.kosh/schema.d.ts +2 -1
- package/dist/trade_finance_sale/module.d.ts +1 -0
- package/dist/ui/app.js +24 -12
- package/dist/ui/components/AppIcon.js +8 -1
- package/dist/ui/i18n/messages.d.ts +4 -0
- package/dist/ui/i18n/messages.js +8 -0
- package/dist/ui/views/FormView.js +4 -2
- package/dist/ui/views/KanbanView.js +9 -1
- package/dist/ui/views/ListView.js +4 -2
- package/dist/ui/views/widgets.js +7 -1
- package/dist/website/index.js +1 -0
- package/dist/website/module.js +1 -0
- package/dist/website_crm/.kosh/bindings.js +1 -1
- package/dist/website_crm/.kosh/schema.d.ts +2 -1
- package/dist/website_crm/module.d.ts +1 -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 +83 -2
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bangladesh payroll (RFC 0024 §2.3, `l10n_bd_payroll`): the data of `data.ts` — structures, parameters and slab
|
|
3
|
+
* tables — installed once, shared by every company, never overwritten: what a payroll manager changed stays.
|
|
4
|
+
*/
|
|
5
|
+
import { l10nBdShutro } from '../l10n_bd/index.js';
|
|
6
|
+
import { payrollShutro } from '../payroll/index.js';
|
|
7
|
+
import { orm } from '../server/orm.js';
|
|
8
|
+
import { defineModule } from './.kosh/bindings.js';
|
|
9
|
+
import { PARAMETERS, SLABS, STRUCTURES } from './data.js';
|
|
10
|
+
/** Installs what is missing: parameters and slabs by code and start, structures by name. */
|
|
11
|
+
export async function installBangladeshPayroll(env) {
|
|
12
|
+
let added = 0;
|
|
13
|
+
for (const p of PARAMETERS) {
|
|
14
|
+
const found = await env.model('payroll.parameter').search({
|
|
15
|
+
where: { code: p.code, ...(p.dateFrom === undefined ? {} : { dateFrom: p.dateFrom }) },
|
|
16
|
+
limit: 1,
|
|
17
|
+
});
|
|
18
|
+
if (found.length > 0)
|
|
19
|
+
continue;
|
|
20
|
+
await env.model('payroll.parameter').create([{ ...p }]);
|
|
21
|
+
added += 1;
|
|
22
|
+
}
|
|
23
|
+
for (const s of SLABS) {
|
|
24
|
+
const found = await env
|
|
25
|
+
.model('payroll.slab')
|
|
26
|
+
.search({ where: { code: s.code, dateFrom: s.dateFrom }, limit: 1 });
|
|
27
|
+
if (found.length > 0)
|
|
28
|
+
continue;
|
|
29
|
+
await env.model('payroll.slab').create([
|
|
30
|
+
{
|
|
31
|
+
code: s.code,
|
|
32
|
+
name: s.name,
|
|
33
|
+
dateFrom: s.dateFrom,
|
|
34
|
+
dateTo: s.dateTo,
|
|
35
|
+
note: s.note,
|
|
36
|
+
bands: {
|
|
37
|
+
create: s.bands.map((b, i) => ({ sequence: (i + 1) * 10, upTo: b.upTo, rate: b.rate })),
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
]);
|
|
41
|
+
added += 1;
|
|
42
|
+
}
|
|
43
|
+
for (const s of STRUCTURES) {
|
|
44
|
+
const found = await env
|
|
45
|
+
.model('payroll.structure')
|
|
46
|
+
.search({ where: { name: s.name }, limit: 1 });
|
|
47
|
+
if (found.length > 0)
|
|
48
|
+
continue;
|
|
49
|
+
await env.model('payroll.structure').create([
|
|
50
|
+
{
|
|
51
|
+
name: s.name,
|
|
52
|
+
note: s.note,
|
|
53
|
+
rules: {
|
|
54
|
+
create: s.rules.map((r) => ({
|
|
55
|
+
sequence: r.sequence,
|
|
56
|
+
code: r.code,
|
|
57
|
+
name: r.name,
|
|
58
|
+
category: r.category,
|
|
59
|
+
formula: r.formula,
|
|
60
|
+
condition: r.condition ?? null,
|
|
61
|
+
appearsOnSlip: r.appearsOnSlip ?? true,
|
|
62
|
+
note: r.note ?? null,
|
|
63
|
+
})),
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
]);
|
|
67
|
+
added += 1;
|
|
68
|
+
}
|
|
69
|
+
await env.flush();
|
|
70
|
+
return added === 0
|
|
71
|
+
? 'Bangladesh payroll: already installed.'
|
|
72
|
+
: `Bangladesh payroll: ${added} structures, parameters and tax tables.`;
|
|
73
|
+
}
|
|
74
|
+
export const l10nBdPayrollShutro = defineModule({
|
|
75
|
+
name: 'l10n_bd_payroll',
|
|
76
|
+
version: '0.1.0',
|
|
77
|
+
depends: [l10nBdShutro, payrollShutro],
|
|
78
|
+
groups: [
|
|
79
|
+
orm.defineGroup({
|
|
80
|
+
code: 'l10n_bd_payroll.user',
|
|
81
|
+
label: 'Bangladesh payroll',
|
|
82
|
+
implies: ['payroll.user'],
|
|
83
|
+
}),
|
|
84
|
+
],
|
|
85
|
+
models: [],
|
|
86
|
+
});
|
|
@@ -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: 2512a399bcdad59a
|
|
2
2
|
// Bindings of module `l10n_in`: 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,10 +1,11 @@
|
|
|
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: 2512a399bcdad59a
|
|
2
2
|
// Schema view of module `l10n_in` (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
|
|
|
5
5
|
/** Model name → model type (RFC 0002 §7.7). */
|
|
6
6
|
export interface SchemaView {
|
|
7
7
|
readonly 'account.account': AccountAccount;
|
|
8
|
+
readonly 'account.analytic': AccountAnalytic;
|
|
8
9
|
readonly 'account.fiscal.year': AccountFiscalYear;
|
|
9
10
|
readonly 'account.full.reconcile': AccountFullReconcile;
|
|
10
11
|
readonly 'account.journal': AccountJournal;
|
|
@@ -18,9 +19,12 @@ export interface SchemaView {
|
|
|
18
19
|
readonly 'account.tax': AccountTax;
|
|
19
20
|
readonly 'account.tax.component': AccountTaxComponent;
|
|
20
21
|
readonly 'account.withholding': AccountWithholding;
|
|
22
|
+
readonly 'approval.delegation': ApprovalDelegation;
|
|
21
23
|
readonly 'approval.level': ApprovalLevel;
|
|
24
|
+
readonly 'approval.link': ApprovalLink;
|
|
22
25
|
readonly 'approval.policy': ApprovalPolicy;
|
|
23
26
|
readonly 'approval.request': ApprovalRequest;
|
|
27
|
+
readonly 'approval.vote': ApprovalVote;
|
|
24
28
|
readonly 'audit.event': AuditEvent;
|
|
25
29
|
readonly 'auth.api_key': AuthApiKey;
|
|
26
30
|
readonly 'auth.credential': AuthCredential;
|
|
@@ -87,6 +91,30 @@ export interface AccountAccount {
|
|
|
87
91
|
export interface AccountAccountMethods extends F.Methods<typeof import('../../accounting/index.js').accountingShutro, 'account.account'> {
|
|
88
92
|
}
|
|
89
93
|
|
|
94
|
+
/** `account.analytic` (owner: accounting). */
|
|
95
|
+
export interface AccountAnalytic {
|
|
96
|
+
readonly name: 'account.analytic';
|
|
97
|
+
readonly fields: {
|
|
98
|
+
readonly id: F.Id<'account.analytic'>;
|
|
99
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
100
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
101
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
102
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
103
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
104
|
+
readonly active: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
105
|
+
readonly company: F.Many2one<'res.company', { readonly required: true; readonly default: true }>;
|
|
106
|
+
readonly code: F.Char;
|
|
107
|
+
readonly name: F.Char<{ readonly required: true; readonly translate: true }>;
|
|
108
|
+
readonly parent: F.Many2one<'account.analytic'>;
|
|
109
|
+
readonly note: F.Text;
|
|
110
|
+
};
|
|
111
|
+
readonly methods: AccountAnalyticMethods;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Methods of `account.analytic`: declared ones and transitions. */
|
|
115
|
+
export interface AccountAnalyticMethods extends F.Methods<typeof import('../../accounting/index.js').accountingShutro, 'account.analytic'> {
|
|
116
|
+
}
|
|
117
|
+
|
|
90
118
|
/** `account.fiscal.year` (owner: accounting). */
|
|
91
119
|
export interface AccountFiscalYear {
|
|
92
120
|
readonly name: 'account.fiscal.year';
|
|
@@ -260,6 +288,7 @@ export interface AccountMoveLine {
|
|
|
260
288
|
readonly lineKind: F.Selection<'entry' | 'product' | 'tax' | 'counterpart', { readonly required: true; readonly default: true }>;
|
|
261
289
|
readonly invoice: F.Many2one<'account.move', { readonly readonly: true; readonly compute: true; readonly store: true }>;
|
|
262
290
|
readonly product: F.Many2one<'product.product'>;
|
|
291
|
+
readonly analytic: F.Many2one<'account.analytic'>;
|
|
263
292
|
readonly quantity: F.Decimal<{ readonly default: true }>;
|
|
264
293
|
readonly priceUnit: F.Decimal<{ readonly default: true }>;
|
|
265
294
|
readonly discount: F.Decimal<{ readonly default: true }>;
|
|
@@ -508,6 +537,29 @@ export interface AccountWithholding {
|
|
|
508
537
|
export interface AccountWithholdingMethods extends F.Methods<typeof import('../../accounting/index.js').accountingShutro, 'account.withholding'> {
|
|
509
538
|
}
|
|
510
539
|
|
|
540
|
+
/** `approval.delegation` (owner: permissions). */
|
|
541
|
+
export interface ApprovalDelegation {
|
|
542
|
+
readonly name: 'approval.delegation';
|
|
543
|
+
readonly fields: {
|
|
544
|
+
readonly id: F.Id<'approval.delegation'>;
|
|
545
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
546
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
547
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
548
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
549
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
550
|
+
readonly user: F.Many2one<'res.users', { readonly required: true; readonly default: true }>;
|
|
551
|
+
readonly delegate: F.Many2one<'res.users', { readonly required: true }>;
|
|
552
|
+
readonly dateFrom: F.DateOnly<{ readonly required: true }>;
|
|
553
|
+
readonly dateTo: F.DateOnly<{ readonly required: true }>;
|
|
554
|
+
readonly note: F.Char;
|
|
555
|
+
};
|
|
556
|
+
readonly methods: ApprovalDelegationMethods;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/** Methods of `approval.delegation`: declared ones and transitions. */
|
|
560
|
+
export interface ApprovalDelegationMethods extends F.Methods<typeof import('../../permissions/index.js').permissionsShutro, 'approval.delegation'> {
|
|
561
|
+
}
|
|
562
|
+
|
|
511
563
|
/** `approval.level` (owner: permissions). */
|
|
512
564
|
export interface ApprovalLevel {
|
|
513
565
|
readonly name: 'approval.level';
|
|
@@ -522,7 +574,14 @@ export interface ApprovalLevel {
|
|
|
522
574
|
readonly sequence: F.Integer<{ readonly default: true }>;
|
|
523
575
|
readonly name: F.Char<{ readonly required: true }>;
|
|
524
576
|
readonly condition: F.Json;
|
|
525
|
-
readonly
|
|
577
|
+
readonly approverKind: F.Selection<'role' | 'users' | 'manager' | 'field', { readonly required: true; readonly default: true }>;
|
|
578
|
+
readonly approverRole: F.Char;
|
|
579
|
+
readonly approverUsers: F.Many2many<'res.users', { readonly required: true }>;
|
|
580
|
+
readonly approverField: F.Char;
|
|
581
|
+
readonly quorum: F.Selection<'any' | 'all' | 'count', { readonly required: true; readonly default: true }>;
|
|
582
|
+
readonly quorumCount: F.Integer;
|
|
583
|
+
readonly deadlineHours: F.Integer;
|
|
584
|
+
readonly escalateRole: F.Char;
|
|
526
585
|
};
|
|
527
586
|
readonly methods: ApprovalLevelMethods;
|
|
528
587
|
}
|
|
@@ -531,6 +590,29 @@ export interface ApprovalLevel {
|
|
|
531
590
|
export interface ApprovalLevelMethods extends F.Methods<typeof import('../../permissions/index.js').permissionsShutro, 'approval.level'> {
|
|
532
591
|
}
|
|
533
592
|
|
|
593
|
+
/** `approval.link` (owner: permissions). */
|
|
594
|
+
export interface ApprovalLink {
|
|
595
|
+
readonly name: 'approval.link';
|
|
596
|
+
readonly fields: {
|
|
597
|
+
readonly id: F.Id<'approval.link'>;
|
|
598
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
599
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
600
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
601
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
602
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
603
|
+
readonly request: F.Many2one<'approval.request', { readonly required: true }>;
|
|
604
|
+
readonly user: F.Many2one<'res.users', { readonly required: true }>;
|
|
605
|
+
readonly tokenHash: F.Char<{ readonly required: true }>;
|
|
606
|
+
readonly expiresAt: F.Datetime<{ readonly required: true }>;
|
|
607
|
+
readonly usedAt: F.Datetime;
|
|
608
|
+
};
|
|
609
|
+
readonly methods: ApprovalLinkMethods;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/** Methods of `approval.link`: declared ones and transitions. */
|
|
613
|
+
export interface ApprovalLinkMethods extends F.Methods<typeof import('../../permissions/index.js').permissionsShutro, 'approval.link'> {
|
|
614
|
+
}
|
|
615
|
+
|
|
534
616
|
/** `approval.policy` (owner: permissions). */
|
|
535
617
|
export interface ApprovalPolicy {
|
|
536
618
|
readonly name: 'approval.policy';
|
|
@@ -548,6 +630,9 @@ export interface ApprovalPolicy {
|
|
|
548
630
|
readonly company: F.Many2one<'res.company'>;
|
|
549
631
|
readonly onApproved: F.Char;
|
|
550
632
|
readonly onRejected: F.Char;
|
|
633
|
+
readonly onSentBack: F.Char;
|
|
634
|
+
readonly onWithdrawn: F.Char;
|
|
635
|
+
readonly reasonRequired: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
551
636
|
readonly levels: F.One2many<'approval.level', { readonly required: true }>;
|
|
552
637
|
};
|
|
553
638
|
readonly methods: ApprovalPolicyMethods;
|
|
@@ -574,8 +659,16 @@ export interface ApprovalRequest {
|
|
|
574
659
|
readonly targetModel: F.Char<{ readonly required: true }>;
|
|
575
660
|
readonly targetId: F.Integer<{ readonly required: true }>;
|
|
576
661
|
readonly company: F.Many2one<'res.company'>;
|
|
577
|
-
readonly approverRole: F.Char
|
|
578
|
-
readonly
|
|
662
|
+
readonly approverRole: F.Char;
|
|
663
|
+
readonly approvers: F.Many2many<'res.users', { readonly required: true }>;
|
|
664
|
+
readonly required: F.Integer<{ readonly required: true; readonly default: true }>;
|
|
665
|
+
readonly round: F.Integer<{ readonly required: true; readonly default: true }>;
|
|
666
|
+
readonly votes: F.One2many<'approval.vote', { readonly required: true }>;
|
|
667
|
+
readonly dueAt: F.Datetime;
|
|
668
|
+
readonly remindedAt: F.Datetime;
|
|
669
|
+
readonly escalatedTo: F.Char;
|
|
670
|
+
readonly escalatedAt: F.Datetime;
|
|
671
|
+
readonly state: F.Selection<'pending' | 'approved' | 'rejected' | 'sent_back' | 'cancelled', { readonly required: true; readonly default: true }>;
|
|
579
672
|
readonly requestedBy: F.Many2one<'res.users'>;
|
|
580
673
|
readonly decidedBy: F.Many2one<'res.users'>;
|
|
581
674
|
readonly decidedAt: F.Datetime;
|
|
@@ -588,6 +681,31 @@ export interface ApprovalRequest {
|
|
|
588
681
|
export interface ApprovalRequestMethods extends F.Methods<typeof import('../../permissions/index.js').permissionsShutro, 'approval.request'> {
|
|
589
682
|
}
|
|
590
683
|
|
|
684
|
+
/** `approval.vote` (owner: permissions). */
|
|
685
|
+
export interface ApprovalVote {
|
|
686
|
+
readonly name: 'approval.vote';
|
|
687
|
+
readonly fields: {
|
|
688
|
+
readonly id: F.Id<'approval.vote'>;
|
|
689
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
690
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
691
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
692
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
693
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
694
|
+
readonly request: F.Many2one<'approval.request', { readonly required: true }>;
|
|
695
|
+
readonly user: F.Many2one<'res.users', { readonly required: true }>;
|
|
696
|
+
readonly decision: F.Selection<'approve' | 'reject' | 'send_back', { readonly required: true }>;
|
|
697
|
+
readonly comment: F.Text;
|
|
698
|
+
readonly at: F.Datetime<{ readonly required: true }>;
|
|
699
|
+
readonly onBehalfOf: F.Many2one<'res.users'>;
|
|
700
|
+
readonly ip: F.Char;
|
|
701
|
+
};
|
|
702
|
+
readonly methods: ApprovalVoteMethods;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/** Methods of `approval.vote`: declared ones and transitions. */
|
|
706
|
+
export interface ApprovalVoteMethods extends F.Methods<typeof import('../../permissions/index.js').permissionsShutro, 'approval.vote'> {
|
|
707
|
+
}
|
|
708
|
+
|
|
591
709
|
/** `audit.event` (owner: base). */
|
|
592
710
|
export interface AuditEvent {
|
|
593
711
|
readonly name: 'audit.event';
|
|
@@ -1146,6 +1264,7 @@ export interface ProductCategory {
|
|
|
1146
1264
|
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
1147
1265
|
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
1148
1266
|
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
1267
|
+
readonly active: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
1149
1268
|
readonly name: F.Char<{ readonly required: true; readonly translate: true }>;
|
|
1150
1269
|
readonly parent: F.Many2one<'product.category'>;
|
|
1151
1270
|
};
|
package/dist/l10n_in/module.d.ts
CHANGED
|
@@ -1680,6 +1680,131 @@ export declare const l10nInShutro: import("../server/orm.js").Module<readonly [i
|
|
|
1680
1680
|
readonly hasDefault: false;
|
|
1681
1681
|
readonly readonly: false;
|
|
1682
1682
|
}>;
|
|
1683
|
+
}>>, import("../server/orm.js").Model<"account.analytic", {
|
|
1684
|
+
readonly id: import("../server/orm.js").IdField<"account.analytic">;
|
|
1685
|
+
readonly createdAt: import("../server/orm.js").ScalarField<'datetime', Date, Date, {
|
|
1686
|
+
required: true;
|
|
1687
|
+
readonly: true;
|
|
1688
|
+
computed: false;
|
|
1689
|
+
inverse: false;
|
|
1690
|
+
hasDefault: false;
|
|
1691
|
+
sequence: false;
|
|
1692
|
+
}>;
|
|
1693
|
+
readonly updatedAt: import("../server/orm.js").ScalarField<'datetime', Date, Date, {
|
|
1694
|
+
required: true;
|
|
1695
|
+
readonly: true;
|
|
1696
|
+
computed: false;
|
|
1697
|
+
inverse: false;
|
|
1698
|
+
hasDefault: false;
|
|
1699
|
+
sequence: false;
|
|
1700
|
+
}>;
|
|
1701
|
+
readonly createdBy: import("../server/orm.js").Many2oneField<'res.users', {
|
|
1702
|
+
required: false;
|
|
1703
|
+
readonly: true;
|
|
1704
|
+
computed: false;
|
|
1705
|
+
inverse: false;
|
|
1706
|
+
hasDefault: false;
|
|
1707
|
+
sequence: false;
|
|
1708
|
+
}>;
|
|
1709
|
+
readonly updatedBy: import("../server/orm.js").Many2oneField<'res.users', {
|
|
1710
|
+
required: false;
|
|
1711
|
+
readonly: true;
|
|
1712
|
+
computed: false;
|
|
1713
|
+
inverse: false;
|
|
1714
|
+
hasDefault: false;
|
|
1715
|
+
sequence: false;
|
|
1716
|
+
}>;
|
|
1717
|
+
readonly displayName: import("../server/orm.js").CharField<{
|
|
1718
|
+
required: true;
|
|
1719
|
+
readonly: true;
|
|
1720
|
+
computed: true;
|
|
1721
|
+
inverse: false;
|
|
1722
|
+
hasDefault: false;
|
|
1723
|
+
sequence: false;
|
|
1724
|
+
}>;
|
|
1725
|
+
readonly active: import("../server/orm.js").ActiveField;
|
|
1726
|
+
readonly company: import("../server/orm.js").CompanyField<true>;
|
|
1727
|
+
readonly code: import("../server/orm.js").CharField<{
|
|
1728
|
+
readonly required: false;
|
|
1729
|
+
readonly computed: false;
|
|
1730
|
+
readonly inverse: false;
|
|
1731
|
+
readonly sequence: false;
|
|
1732
|
+
readonly computeName: undefined;
|
|
1733
|
+
readonly store: true;
|
|
1734
|
+
readonly hasDefault: false;
|
|
1735
|
+
readonly readonly: false;
|
|
1736
|
+
}, string>;
|
|
1737
|
+
readonly name: import("../server/orm.js").CharField<{
|
|
1738
|
+
readonly required: true;
|
|
1739
|
+
readonly computed: false;
|
|
1740
|
+
readonly inverse: false;
|
|
1741
|
+
readonly sequence: false;
|
|
1742
|
+
readonly computeName: undefined;
|
|
1743
|
+
readonly store: true;
|
|
1744
|
+
readonly hasDefault: false;
|
|
1745
|
+
readonly readonly: false;
|
|
1746
|
+
}, string | Readonly<Record<string, string>>>;
|
|
1747
|
+
readonly parent: import("../server/orm.js").Many2oneField<"account.analytic", {
|
|
1748
|
+
readonly required: false;
|
|
1749
|
+
readonly computed: false;
|
|
1750
|
+
readonly inverse: false;
|
|
1751
|
+
readonly sequence: false;
|
|
1752
|
+
readonly computeName: undefined;
|
|
1753
|
+
readonly store: true;
|
|
1754
|
+
readonly hasDefault: false;
|
|
1755
|
+
readonly readonly: false;
|
|
1756
|
+
}>;
|
|
1757
|
+
readonly note: import("../server/orm.js").ScalarField<"text", string, string, {
|
|
1758
|
+
readonly required: false;
|
|
1759
|
+
readonly computed: false;
|
|
1760
|
+
readonly inverse: false;
|
|
1761
|
+
readonly sequence: false;
|
|
1762
|
+
readonly computeName: undefined;
|
|
1763
|
+
readonly store: true;
|
|
1764
|
+
readonly hasDefault: false;
|
|
1765
|
+
readonly readonly: false;
|
|
1766
|
+
}>;
|
|
1767
|
+
}, {} & import("../server/orm.js").TransitionMethods<{
|
|
1768
|
+
readonly code: import("../server/orm.js").CharField<{
|
|
1769
|
+
readonly required: false;
|
|
1770
|
+
readonly computed: false;
|
|
1771
|
+
readonly inverse: false;
|
|
1772
|
+
readonly sequence: false;
|
|
1773
|
+
readonly computeName: undefined;
|
|
1774
|
+
readonly store: true;
|
|
1775
|
+
readonly hasDefault: false;
|
|
1776
|
+
readonly readonly: false;
|
|
1777
|
+
}, string>;
|
|
1778
|
+
readonly name: import("../server/orm.js").CharField<{
|
|
1779
|
+
readonly required: true;
|
|
1780
|
+
readonly computed: false;
|
|
1781
|
+
readonly inverse: false;
|
|
1782
|
+
readonly sequence: false;
|
|
1783
|
+
readonly computeName: undefined;
|
|
1784
|
+
readonly store: true;
|
|
1785
|
+
readonly hasDefault: false;
|
|
1786
|
+
readonly readonly: false;
|
|
1787
|
+
}, string | Readonly<Record<string, string>>>;
|
|
1788
|
+
readonly parent: import("../server/orm.js").Many2oneField<"account.analytic", {
|
|
1789
|
+
readonly required: false;
|
|
1790
|
+
readonly computed: false;
|
|
1791
|
+
readonly inverse: false;
|
|
1792
|
+
readonly sequence: false;
|
|
1793
|
+
readonly computeName: undefined;
|
|
1794
|
+
readonly store: true;
|
|
1795
|
+
readonly hasDefault: false;
|
|
1796
|
+
readonly readonly: false;
|
|
1797
|
+
}>;
|
|
1798
|
+
readonly note: import("../server/orm.js").ScalarField<"text", string, string, {
|
|
1799
|
+
readonly required: false;
|
|
1800
|
+
readonly computed: false;
|
|
1801
|
+
readonly inverse: false;
|
|
1802
|
+
readonly sequence: false;
|
|
1803
|
+
readonly computeName: undefined;
|
|
1804
|
+
readonly store: true;
|
|
1805
|
+
readonly hasDefault: false;
|
|
1806
|
+
readonly readonly: false;
|
|
1807
|
+
}>;
|
|
1683
1808
|
}>>, import("../server/orm.js").Model<"account.account", {
|
|
1684
1809
|
readonly id: import("../server/orm.js").IdField<"account.account">;
|
|
1685
1810
|
readonly createdAt: import("../server/orm.js").ScalarField<'datetime', Date, Date, {
|
|
@@ -3372,6 +3497,16 @@ export declare const l10nInShutro: import("../server/orm.js").Module<readonly [i
|
|
|
3372
3497
|
readonly hasDefault: false;
|
|
3373
3498
|
readonly readonly: false;
|
|
3374
3499
|
}>;
|
|
3500
|
+
readonly analytic: import("../server/orm.js").Many2oneField<"account.analytic", {
|
|
3501
|
+
readonly required: false;
|
|
3502
|
+
readonly computed: false;
|
|
3503
|
+
readonly inverse: false;
|
|
3504
|
+
readonly sequence: false;
|
|
3505
|
+
readonly computeName: undefined;
|
|
3506
|
+
readonly store: true;
|
|
3507
|
+
readonly hasDefault: false;
|
|
3508
|
+
readonly readonly: false;
|
|
3509
|
+
}>;
|
|
3375
3510
|
readonly quantity: import("../server/orm.js").DecimalField<{
|
|
3376
3511
|
readonly required: false;
|
|
3377
3512
|
readonly computed: false;
|
|
@@ -3723,6 +3858,16 @@ export declare const l10nInShutro: import("../server/orm.js").Module<readonly [i
|
|
|
3723
3858
|
readonly hasDefault: false;
|
|
3724
3859
|
readonly readonly: false;
|
|
3725
3860
|
}>;
|
|
3861
|
+
readonly analytic: import("../server/orm.js").Many2oneField<"account.analytic", {
|
|
3862
|
+
readonly required: false;
|
|
3863
|
+
readonly computed: false;
|
|
3864
|
+
readonly inverse: false;
|
|
3865
|
+
readonly sequence: false;
|
|
3866
|
+
readonly computeName: undefined;
|
|
3867
|
+
readonly store: true;
|
|
3868
|
+
readonly hasDefault: false;
|
|
3869
|
+
readonly readonly: false;
|
|
3870
|
+
}>;
|
|
3726
3871
|
readonly quantity: import("../server/orm.js").DecimalField<{
|
|
3727
3872
|
readonly required: false;
|
|
3728
3873
|
readonly computed: false;
|
|
@@ -5648,6 +5793,7 @@ export declare const l10nInShutro: import("../server/orm.js").Module<readonly [i
|
|
|
5648
5793
|
hasDefault: false;
|
|
5649
5794
|
sequence: false;
|
|
5650
5795
|
}>;
|
|
5796
|
+
readonly active: import("../server/orm.js").ActiveField;
|
|
5651
5797
|
readonly name: import("../server/orm.js").CharField<{
|
|
5652
5798
|
readonly required: true;
|
|
5653
5799
|
readonly computed: false;
|
|
@@ -7175,6 +7321,7 @@ export declare const l10nInShutro: import("../server/orm.js").Module<readonly [i
|
|
|
7175
7321
|
hasDefault: false;
|
|
7176
7322
|
sequence: false;
|
|
7177
7323
|
}>;
|
|
7324
|
+
readonly active: import("../server/orm.js").ActiveField;
|
|
7178
7325
|
readonly name: import("../server/orm.js").CharField<{
|
|
7179
7326
|
readonly required: true;
|
|
7180
7327
|
readonly computed: false;
|
|
@@ -315,7 +315,12 @@ async function receiveForAlias(context, logId, mail, alias, text) {
|
|
|
315
315
|
};
|
|
316
316
|
const subject = mail.subject.trim() === '' ? '(no subject)' : mail.subject.slice(0, 200);
|
|
317
317
|
const created = await context.shutro.bootstrap({ reason: `inbound email: ${alias.alias}@`, company }, async (su) => {
|
|
318
|
-
const defaults = typeof alias.defaults === 'function'
|
|
318
|
+
const defaults = typeof alias.defaults === 'function'
|
|
319
|
+
? await alias.defaults(su, {
|
|
320
|
+
address: mail.from?.address ?? '',
|
|
321
|
+
name: mail.from?.name ?? null,
|
|
322
|
+
})
|
|
323
|
+
: (alias.defaults ?? {});
|
|
319
324
|
if (defaults === null)
|
|
320
325
|
return null;
|
|
321
326
|
const values = { ...defaults, [alias.subjectField]: subject };
|
|
@@ -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: 28061ca642f269ff
|
|
2
2
|
// Bindings of module `maintenance_stock`: 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: 28061ca642f269ff
|
|
2
2
|
// Schema view of module `maintenance_stock` (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
|
|
|
@@ -48,7 +48,9 @@ export interface SchemaView {
|
|
|
48
48
|
readonly 'stock.lot.line': StockLotLine;
|
|
49
49
|
readonly 'stock.move': StockMove;
|
|
50
50
|
readonly 'stock.picking': StockPicking;
|
|
51
|
+
readonly 'stock.putaway': StockPutaway;
|
|
51
52
|
readonly 'stock.quant': StockQuant;
|
|
53
|
+
readonly 'stock.reorder': StockReorder;
|
|
52
54
|
readonly 'stock.reservation': StockReservation;
|
|
53
55
|
readonly 'stock.scrap': StockScrap;
|
|
54
56
|
readonly 'stock.warehouse': StockWarehouse;
|
|
@@ -823,6 +825,7 @@ export interface ProductCategory {
|
|
|
823
825
|
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
824
826
|
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
825
827
|
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
828
|
+
readonly active: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
826
829
|
readonly name: F.Char<{ readonly required: true; readonly translate: true }>;
|
|
827
830
|
readonly parent: F.Many2one<'product.category'>;
|
|
828
831
|
};
|
|
@@ -1087,6 +1090,7 @@ export interface StockLocation {
|
|
|
1087
1090
|
readonly children: F.One2many<'stock.location', { readonly required: true }>;
|
|
1088
1091
|
readonly warehouse: F.Many2one<'stock.warehouse'>;
|
|
1089
1092
|
readonly usage: F.Selection<'internal' | 'vendor' | 'customer' | 'adjustment' | 'production' | 'transit', { readonly required: true; readonly default: true }>;
|
|
1093
|
+
readonly step: F.Selection<'input' | 'quality' | 'packing' | 'output'>;
|
|
1090
1094
|
readonly fullName: F.Char<{ readonly readonly: true; readonly compute: true; readonly store: true }>;
|
|
1091
1095
|
};
|
|
1092
1096
|
readonly methods: StockLocationMethods;
|
|
@@ -1106,6 +1110,7 @@ export interface StockLot {
|
|
|
1106
1110
|
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
1107
1111
|
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
1108
1112
|
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
1113
|
+
readonly active: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
1109
1114
|
readonly company: F.Many2one<'res.company', { readonly required: true; readonly default: true }>;
|
|
1110
1115
|
readonly name: F.Char<{ readonly required: true }>;
|
|
1111
1116
|
readonly product: F.Many2one<'product.product', { readonly required: true }>;
|
|
@@ -1164,6 +1169,8 @@ export interface StockMove {
|
|
|
1164
1169
|
readonly quantityDone: F.Decimal;
|
|
1165
1170
|
readonly doneQty: F.Decimal<{ readonly readonly: true; readonly compute: true; readonly store: true }>;
|
|
1166
1171
|
readonly restrictLot: F.Many2one<'stock.lot'>;
|
|
1172
|
+
readonly procurement: F.Char;
|
|
1173
|
+
readonly destination: F.Many2one<'stock.location'>;
|
|
1167
1174
|
readonly reservations: F.One2many<'stock.reservation', { readonly required: true }>;
|
|
1168
1175
|
readonly reserved: F.Decimal<{ readonly readonly: true; readonly compute: true; readonly store: true }>;
|
|
1169
1176
|
};
|
|
@@ -1186,7 +1193,7 @@ export interface StockPicking {
|
|
|
1186
1193
|
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
1187
1194
|
readonly company: F.Many2one<'res.company', { readonly required: true; readonly default: true }>;
|
|
1188
1195
|
readonly name: F.Char<{ readonly required: true; readonly readonly: true; readonly sequence: true }>;
|
|
1189
|
-
readonly kind: F.Selection<'receipt' | 'delivery' | 'internal' | 'adjustment' | 'production', { readonly required: true; readonly default: true }>;
|
|
1196
|
+
readonly kind: F.Selection<'receipt' | 'delivery' | 'internal' | 'adjustment' | 'production' | 'dropship', { readonly required: true; readonly default: true }>;
|
|
1190
1197
|
readonly partner: F.Many2one<'res.partner'>;
|
|
1191
1198
|
readonly warehouse: F.Many2one<'stock.warehouse'>;
|
|
1192
1199
|
readonly source: F.Many2one<'stock.location', { readonly required: true }>;
|
|
@@ -1200,6 +1207,8 @@ export interface StockPicking {
|
|
|
1200
1207
|
readonly count: F.Many2one<'stock.count'>;
|
|
1201
1208
|
readonly backorderOf: F.Many2one<'stock.picking'>;
|
|
1202
1209
|
readonly backorders: F.One2many<'stock.picking', { readonly required: true }>;
|
|
1210
|
+
readonly next: F.Many2one<'stock.picking'>;
|
|
1211
|
+
readonly previousSteps: F.One2many<'stock.picking', { readonly required: true }>;
|
|
1203
1212
|
readonly availability: F.Selection<'none' | 'partial' | 'full', { readonly readonly: true; readonly compute: true; readonly store: true }>;
|
|
1204
1213
|
readonly status: F.Selection<'draft' | 'waiting' | 'ready' | 'done' | 'cancelled', { readonly readonly: true; readonly compute: true; readonly store: true }>;
|
|
1205
1214
|
readonly state: F.State<'draft' | 'confirmed' | 'done' | 'cancel', { readonly required: true; readonly readonly: true; readonly default: true }>;
|
|
@@ -1217,6 +1226,31 @@ export interface StockPickingMethods extends F.Methods<typeof import('../../stoc
|
|
|
1217
1226
|
readonly 'validate': () => Promise<void>;
|
|
1218
1227
|
}
|
|
1219
1228
|
|
|
1229
|
+
/** `stock.putaway` (owner: stock). */
|
|
1230
|
+
export interface StockPutaway {
|
|
1231
|
+
readonly name: 'stock.putaway';
|
|
1232
|
+
readonly fields: {
|
|
1233
|
+
readonly id: F.Id<'stock.putaway'>;
|
|
1234
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
1235
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
1236
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
1237
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
1238
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
1239
|
+
readonly active: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
1240
|
+
readonly company: F.Many2one<'res.company', { readonly required: true; readonly default: true }>;
|
|
1241
|
+
readonly location: F.Many2one<'stock.location', { readonly required: true }>;
|
|
1242
|
+
readonly product: F.Many2one<'product.product'>;
|
|
1243
|
+
readonly category: F.Many2one<'product.category'>;
|
|
1244
|
+
readonly destination: F.Many2one<'stock.location', { readonly required: true }>;
|
|
1245
|
+
readonly sequence: F.Integer<{ readonly required: true; readonly default: true }>;
|
|
1246
|
+
};
|
|
1247
|
+
readonly methods: StockPutawayMethods;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
/** Methods of `stock.putaway`: declared ones and transitions. */
|
|
1251
|
+
export interface StockPutawayMethods extends F.Methods<typeof import('../../stock/index.js').stockShutro, 'stock.putaway'> {
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1220
1254
|
/** `stock.quant` (owner: stock). */
|
|
1221
1255
|
export interface StockQuant {
|
|
1222
1256
|
readonly name: 'stock.quant';
|
|
@@ -1243,6 +1277,45 @@ export interface StockQuant {
|
|
|
1243
1277
|
export interface StockQuantMethods extends F.Methods<typeof import('../../stock/index.js').stockShutro, 'stock.quant'> {
|
|
1244
1278
|
}
|
|
1245
1279
|
|
|
1280
|
+
/** `stock.reorder` (owner: stock). */
|
|
1281
|
+
export interface StockReorder {
|
|
1282
|
+
readonly name: 'stock.reorder';
|
|
1283
|
+
readonly fields: {
|
|
1284
|
+
readonly id: F.Id<'stock.reorder'>;
|
|
1285
|
+
readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
1286
|
+
readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
|
|
1287
|
+
readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
1288
|
+
readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
|
|
1289
|
+
readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
|
|
1290
|
+
readonly active: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
1291
|
+
readonly company: F.Many2one<'res.company', { readonly required: true; readonly default: true }>;
|
|
1292
|
+
readonly name: F.Char<{ readonly readonly: true; readonly compute: true; readonly store: true }>;
|
|
1293
|
+
readonly product: F.Many2one<'product.product', { readonly required: true }>;
|
|
1294
|
+
readonly warehouse: F.Many2one<'stock.warehouse', { readonly required: true }>;
|
|
1295
|
+
readonly minimum: F.Decimal<{ readonly required: true; readonly default: true }>;
|
|
1296
|
+
readonly maximum: F.Decimal<{ readonly required: true; readonly default: true }>;
|
|
1297
|
+
readonly multiple: F.Decimal<{ readonly required: true; readonly default: true }>;
|
|
1298
|
+
readonly leadDays: F.Integer<{ readonly required: true; readonly default: true }>;
|
|
1299
|
+
readonly method: F.Selection<'buy' | 'make' | 'transfer' | 'dropship', { readonly required: true; readonly default: true }>;
|
|
1300
|
+
readonly trigger: F.Selection<'minmax' | 'order', { readonly required: true; readonly default: true }>;
|
|
1301
|
+
readonly vendor: F.Many2one<'res.partner'>;
|
|
1302
|
+
readonly sourceWarehouse: F.Many2one<'stock.warehouse'>;
|
|
1303
|
+
readonly auto: F.Bool<{ readonly required: true; readonly default: true }>;
|
|
1304
|
+
readonly snoozedUntil: F.DateOnly;
|
|
1305
|
+
readonly onHand: F.Decimal;
|
|
1306
|
+
readonly forecast: F.Decimal;
|
|
1307
|
+
readonly proposed: F.Decimal;
|
|
1308
|
+
readonly explanation: F.Text;
|
|
1309
|
+
readonly refreshedAt: F.Datetime;
|
|
1310
|
+
readonly lastOrder: F.Char;
|
|
1311
|
+
};
|
|
1312
|
+
readonly methods: StockReorderMethods;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
/** Methods of `stock.reorder`: declared ones and transitions. */
|
|
1316
|
+
export interface StockReorderMethods extends F.Methods<typeof import('../../stock/index.js').stockShutro, 'stock.reorder'> {
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1246
1319
|
/** `stock.reservation` (owner: stock). */
|
|
1247
1320
|
export interface StockReservation {
|
|
1248
1321
|
readonly name: 'stock.reservation';
|
|
@@ -1312,6 +1385,8 @@ export interface StockWarehouse {
|
|
|
1312
1385
|
readonly code: F.Char<{ readonly required: true }>;
|
|
1313
1386
|
readonly locations: F.One2many<'stock.location', { readonly required: true }>;
|
|
1314
1387
|
readonly address: F.Many2one<'res.partner'>;
|
|
1388
|
+
readonly receptionSteps: F.Selection<'one' | 'two' | 'three', { readonly required: true; readonly default: true }>;
|
|
1389
|
+
readonly deliverySteps: F.Selection<'one' | 'two' | 'three', { readonly required: true; readonly default: true }>;
|
|
1315
1390
|
};
|
|
1316
1391
|
readonly methods: StockWarehouseMethods;
|
|
1317
1392
|
}
|