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
package/dist/payment/module.d.ts
CHANGED
|
@@ -239,7 +239,7 @@ export declare const PaymentTransaction: import("shutro").Model<"payment.transac
|
|
|
239
239
|
readonly readonly: false;
|
|
240
240
|
}>;
|
|
241
241
|
readonly move: import("shutro").Many2oneField<"account.move", {
|
|
242
|
-
readonly required:
|
|
242
|
+
readonly required: false;
|
|
243
243
|
readonly computed: false;
|
|
244
244
|
readonly inverse: false;
|
|
245
245
|
readonly sequence: false;
|
|
@@ -328,7 +328,24 @@ export declare const PaymentTransaction: import("shutro").Model<"payment.transac
|
|
|
328
328
|
readonly hasDefault: false;
|
|
329
329
|
readonly readonly: false;
|
|
330
330
|
}>;
|
|
331
|
-
|
|
331
|
+
readonly returnUrl: import("shutro").CharField<{
|
|
332
|
+
readonly required: false;
|
|
333
|
+
readonly computed: false;
|
|
334
|
+
readonly inverse: false;
|
|
335
|
+
readonly sequence: false;
|
|
336
|
+
readonly computeName: undefined;
|
|
337
|
+
readonly store: true;
|
|
338
|
+
readonly hasDefault: false;
|
|
339
|
+
readonly readonly: false;
|
|
340
|
+
}, string>;
|
|
341
|
+
}, {
|
|
342
|
+
/**
|
|
343
|
+
* The posted documents each of these transactions pays, once the provider confirmed it: its invoice. A module
|
|
344
|
+
* whose transactions pay something else first makes the invoice there (`website_sale`: the order confirmed and
|
|
345
|
+
* invoiced) by overriding it.
|
|
346
|
+
*/
|
|
347
|
+
readonly payable: (this: unknown) => Promise<Map<number, number[]>>;
|
|
348
|
+
} & import("shutro").TransitionMethods<{
|
|
332
349
|
readonly reference: import("shutro").CharField<{
|
|
333
350
|
readonly required: true;
|
|
334
351
|
readonly computed: false;
|
|
@@ -349,8 +366,9 @@ export declare const PaymentTransaction: import("shutro").Model<"payment.transac
|
|
|
349
366
|
readonly hasDefault: false;
|
|
350
367
|
readonly readonly: false;
|
|
351
368
|
}>;
|
|
369
|
+
/** The invoice paid; empty while another app's document waits for the payment (a shop's order). */
|
|
352
370
|
readonly move: import("shutro").Many2oneField<"account.move", {
|
|
353
|
-
readonly required:
|
|
371
|
+
readonly required: false;
|
|
354
372
|
readonly computed: false;
|
|
355
373
|
readonly inverse: false;
|
|
356
374
|
readonly sequence: false;
|
|
@@ -440,6 +458,17 @@ export declare const PaymentTransaction: import("shutro").Model<"payment.transac
|
|
|
440
458
|
readonly hasDefault: false;
|
|
441
459
|
readonly readonly: false;
|
|
442
460
|
}>;
|
|
461
|
+
/** Where the customer goes back to once the provider is done (the portal's document when empty). */
|
|
462
|
+
readonly returnUrl: import("shutro").CharField<{
|
|
463
|
+
readonly required: false;
|
|
464
|
+
readonly computed: false;
|
|
465
|
+
readonly inverse: false;
|
|
466
|
+
readonly sequence: false;
|
|
467
|
+
readonly computeName: undefined;
|
|
468
|
+
readonly store: true;
|
|
469
|
+
readonly hasDefault: false;
|
|
470
|
+
readonly readonly: false;
|
|
471
|
+
}, string>;
|
|
443
472
|
}>>;
|
|
444
473
|
export declare const paymentShutro: import("shutro").Module<readonly [import("shutro").Model<"payment.provider", {
|
|
445
474
|
readonly id: import("shutro").IdField<"payment.provider">;
|
|
@@ -671,7 +700,7 @@ export declare const paymentShutro: import("shutro").Module<readonly [import("sh
|
|
|
671
700
|
readonly readonly: false;
|
|
672
701
|
}>;
|
|
673
702
|
readonly move: import("shutro").Many2oneField<"account.move", {
|
|
674
|
-
readonly required:
|
|
703
|
+
readonly required: false;
|
|
675
704
|
readonly computed: false;
|
|
676
705
|
readonly inverse: false;
|
|
677
706
|
readonly sequence: false;
|
|
@@ -760,7 +789,24 @@ export declare const paymentShutro: import("shutro").Module<readonly [import("sh
|
|
|
760
789
|
readonly hasDefault: false;
|
|
761
790
|
readonly readonly: false;
|
|
762
791
|
}>;
|
|
763
|
-
|
|
792
|
+
readonly returnUrl: import("shutro").CharField<{
|
|
793
|
+
readonly required: false;
|
|
794
|
+
readonly computed: false;
|
|
795
|
+
readonly inverse: false;
|
|
796
|
+
readonly sequence: false;
|
|
797
|
+
readonly computeName: undefined;
|
|
798
|
+
readonly store: true;
|
|
799
|
+
readonly hasDefault: false;
|
|
800
|
+
readonly readonly: false;
|
|
801
|
+
}, string>;
|
|
802
|
+
}, {
|
|
803
|
+
/**
|
|
804
|
+
* The posted documents each of these transactions pays, once the provider confirmed it: its invoice. A module
|
|
805
|
+
* whose transactions pay something else first makes the invoice there (`website_sale`: the order confirmed and
|
|
806
|
+
* invoiced) by overriding it.
|
|
807
|
+
*/
|
|
808
|
+
readonly payable: (this: unknown) => Promise<Map<number, number[]>>;
|
|
809
|
+
} & import("shutro").TransitionMethods<{
|
|
764
810
|
readonly reference: import("shutro").CharField<{
|
|
765
811
|
readonly required: true;
|
|
766
812
|
readonly computed: false;
|
|
@@ -781,8 +827,9 @@ export declare const paymentShutro: import("shutro").Module<readonly [import("sh
|
|
|
781
827
|
readonly hasDefault: false;
|
|
782
828
|
readonly readonly: false;
|
|
783
829
|
}>;
|
|
830
|
+
/** The invoice paid; empty while another app's document waits for the payment (a shop's order). */
|
|
784
831
|
readonly move: import("shutro").Many2oneField<"account.move", {
|
|
785
|
-
readonly required:
|
|
832
|
+
readonly required: false;
|
|
786
833
|
readonly computed: false;
|
|
787
834
|
readonly inverse: false;
|
|
788
835
|
readonly sequence: false;
|
|
@@ -872,6 +919,17 @@ export declare const paymentShutro: import("shutro").Module<readonly [import("sh
|
|
|
872
919
|
readonly hasDefault: false;
|
|
873
920
|
readonly readonly: false;
|
|
874
921
|
}>;
|
|
922
|
+
/** Where the customer goes back to once the provider is done (the portal's document when empty). */
|
|
923
|
+
readonly returnUrl: import("shutro").CharField<{
|
|
924
|
+
readonly required: false;
|
|
925
|
+
readonly computed: false;
|
|
926
|
+
readonly inverse: false;
|
|
927
|
+
readonly sequence: false;
|
|
928
|
+
readonly computeName: undefined;
|
|
929
|
+
readonly store: true;
|
|
930
|
+
readonly hasDefault: false;
|
|
931
|
+
readonly readonly: false;
|
|
932
|
+
}, string>;
|
|
875
933
|
}>>], readonly [import("shutro").Module<readonly [], readonly [import("shutro").Module<readonly [import("shutro").Model<"res.currency.rate", {
|
|
876
934
|
readonly id: import("shutro").IdField<"res.currency.rate">;
|
|
877
935
|
readonly createdAt: import("shutro").ScalarField<'datetime', Date, Date, {
|
|
@@ -1385,6 +1443,131 @@ export declare const paymentShutro: import("shutro").Module<readonly [import("sh
|
|
|
1385
1443
|
readonly hasDefault: false;
|
|
1386
1444
|
readonly readonly: false;
|
|
1387
1445
|
}>;
|
|
1446
|
+
}>>, import("shutro").Model<"account.analytic", {
|
|
1447
|
+
readonly id: import("shutro").IdField<"account.analytic">;
|
|
1448
|
+
readonly createdAt: import("shutro").ScalarField<'datetime', Date, Date, {
|
|
1449
|
+
required: true;
|
|
1450
|
+
readonly: true;
|
|
1451
|
+
computed: false;
|
|
1452
|
+
inverse: false;
|
|
1453
|
+
hasDefault: false;
|
|
1454
|
+
sequence: false;
|
|
1455
|
+
}>;
|
|
1456
|
+
readonly updatedAt: import("shutro").ScalarField<'datetime', Date, Date, {
|
|
1457
|
+
required: true;
|
|
1458
|
+
readonly: true;
|
|
1459
|
+
computed: false;
|
|
1460
|
+
inverse: false;
|
|
1461
|
+
hasDefault: false;
|
|
1462
|
+
sequence: false;
|
|
1463
|
+
}>;
|
|
1464
|
+
readonly createdBy: import("shutro").Many2oneField<'res.users', {
|
|
1465
|
+
required: false;
|
|
1466
|
+
readonly: true;
|
|
1467
|
+
computed: false;
|
|
1468
|
+
inverse: false;
|
|
1469
|
+
hasDefault: false;
|
|
1470
|
+
sequence: false;
|
|
1471
|
+
}>;
|
|
1472
|
+
readonly updatedBy: import("shutro").Many2oneField<'res.users', {
|
|
1473
|
+
required: false;
|
|
1474
|
+
readonly: true;
|
|
1475
|
+
computed: false;
|
|
1476
|
+
inverse: false;
|
|
1477
|
+
hasDefault: false;
|
|
1478
|
+
sequence: false;
|
|
1479
|
+
}>;
|
|
1480
|
+
readonly displayName: import("shutro").CharField<{
|
|
1481
|
+
required: true;
|
|
1482
|
+
readonly: true;
|
|
1483
|
+
computed: true;
|
|
1484
|
+
inverse: false;
|
|
1485
|
+
hasDefault: false;
|
|
1486
|
+
sequence: false;
|
|
1487
|
+
}>;
|
|
1488
|
+
readonly active: import("shutro").ActiveField;
|
|
1489
|
+
readonly company: import("shutro").CompanyField<true>;
|
|
1490
|
+
readonly code: import("shutro").CharField<{
|
|
1491
|
+
readonly required: false;
|
|
1492
|
+
readonly computed: false;
|
|
1493
|
+
readonly inverse: false;
|
|
1494
|
+
readonly sequence: false;
|
|
1495
|
+
readonly computeName: undefined;
|
|
1496
|
+
readonly store: true;
|
|
1497
|
+
readonly hasDefault: false;
|
|
1498
|
+
readonly readonly: false;
|
|
1499
|
+
}, string>;
|
|
1500
|
+
readonly name: import("shutro").CharField<{
|
|
1501
|
+
readonly required: true;
|
|
1502
|
+
readonly computed: false;
|
|
1503
|
+
readonly inverse: false;
|
|
1504
|
+
readonly sequence: false;
|
|
1505
|
+
readonly computeName: undefined;
|
|
1506
|
+
readonly store: true;
|
|
1507
|
+
readonly hasDefault: false;
|
|
1508
|
+
readonly readonly: false;
|
|
1509
|
+
}, string | Readonly<Record<string, string>>>;
|
|
1510
|
+
readonly parent: import("shutro").Many2oneField<"account.analytic", {
|
|
1511
|
+
readonly required: false;
|
|
1512
|
+
readonly computed: false;
|
|
1513
|
+
readonly inverse: false;
|
|
1514
|
+
readonly sequence: false;
|
|
1515
|
+
readonly computeName: undefined;
|
|
1516
|
+
readonly store: true;
|
|
1517
|
+
readonly hasDefault: false;
|
|
1518
|
+
readonly readonly: false;
|
|
1519
|
+
}>;
|
|
1520
|
+
readonly note: import("shutro").ScalarField<"text", string, string, {
|
|
1521
|
+
readonly required: false;
|
|
1522
|
+
readonly computed: false;
|
|
1523
|
+
readonly inverse: false;
|
|
1524
|
+
readonly sequence: false;
|
|
1525
|
+
readonly computeName: undefined;
|
|
1526
|
+
readonly store: true;
|
|
1527
|
+
readonly hasDefault: false;
|
|
1528
|
+
readonly readonly: false;
|
|
1529
|
+
}>;
|
|
1530
|
+
}, {} & import("shutro").TransitionMethods<{
|
|
1531
|
+
readonly code: import("shutro").CharField<{
|
|
1532
|
+
readonly required: false;
|
|
1533
|
+
readonly computed: false;
|
|
1534
|
+
readonly inverse: false;
|
|
1535
|
+
readonly sequence: false;
|
|
1536
|
+
readonly computeName: undefined;
|
|
1537
|
+
readonly store: true;
|
|
1538
|
+
readonly hasDefault: false;
|
|
1539
|
+
readonly readonly: false;
|
|
1540
|
+
}, string>;
|
|
1541
|
+
readonly name: import("shutro").CharField<{
|
|
1542
|
+
readonly required: true;
|
|
1543
|
+
readonly computed: false;
|
|
1544
|
+
readonly inverse: false;
|
|
1545
|
+
readonly sequence: false;
|
|
1546
|
+
readonly computeName: undefined;
|
|
1547
|
+
readonly store: true;
|
|
1548
|
+
readonly hasDefault: false;
|
|
1549
|
+
readonly readonly: false;
|
|
1550
|
+
}, string | Readonly<Record<string, string>>>;
|
|
1551
|
+
readonly parent: import("shutro").Many2oneField<"account.analytic", {
|
|
1552
|
+
readonly required: false;
|
|
1553
|
+
readonly computed: false;
|
|
1554
|
+
readonly inverse: false;
|
|
1555
|
+
readonly sequence: false;
|
|
1556
|
+
readonly computeName: undefined;
|
|
1557
|
+
readonly store: true;
|
|
1558
|
+
readonly hasDefault: false;
|
|
1559
|
+
readonly readonly: false;
|
|
1560
|
+
}>;
|
|
1561
|
+
readonly note: import("shutro").ScalarField<"text", string, string, {
|
|
1562
|
+
readonly required: false;
|
|
1563
|
+
readonly computed: false;
|
|
1564
|
+
readonly inverse: false;
|
|
1565
|
+
readonly sequence: false;
|
|
1566
|
+
readonly computeName: undefined;
|
|
1567
|
+
readonly store: true;
|
|
1568
|
+
readonly hasDefault: false;
|
|
1569
|
+
readonly readonly: false;
|
|
1570
|
+
}>;
|
|
1388
1571
|
}>>, import("shutro").Model<"account.account", {
|
|
1389
1572
|
readonly id: import("shutro").IdField<"account.account">;
|
|
1390
1573
|
readonly createdAt: import("shutro").ScalarField<'datetime', Date, Date, {
|
|
@@ -3077,6 +3260,16 @@ export declare const paymentShutro: import("shutro").Module<readonly [import("sh
|
|
|
3077
3260
|
readonly hasDefault: false;
|
|
3078
3261
|
readonly readonly: false;
|
|
3079
3262
|
}>;
|
|
3263
|
+
readonly analytic: import("shutro").Many2oneField<"account.analytic", {
|
|
3264
|
+
readonly required: false;
|
|
3265
|
+
readonly computed: false;
|
|
3266
|
+
readonly inverse: false;
|
|
3267
|
+
readonly sequence: false;
|
|
3268
|
+
readonly computeName: undefined;
|
|
3269
|
+
readonly store: true;
|
|
3270
|
+
readonly hasDefault: false;
|
|
3271
|
+
readonly readonly: false;
|
|
3272
|
+
}>;
|
|
3080
3273
|
readonly quantity: import("shutro").DecimalField<{
|
|
3081
3274
|
readonly required: false;
|
|
3082
3275
|
readonly computed: false;
|
|
@@ -3428,6 +3621,16 @@ export declare const paymentShutro: import("shutro").Module<readonly [import("sh
|
|
|
3428
3621
|
readonly hasDefault: false;
|
|
3429
3622
|
readonly readonly: false;
|
|
3430
3623
|
}>;
|
|
3624
|
+
readonly analytic: import("shutro").Many2oneField<"account.analytic", {
|
|
3625
|
+
readonly required: false;
|
|
3626
|
+
readonly computed: false;
|
|
3627
|
+
readonly inverse: false;
|
|
3628
|
+
readonly sequence: false;
|
|
3629
|
+
readonly computeName: undefined;
|
|
3630
|
+
readonly store: true;
|
|
3631
|
+
readonly hasDefault: false;
|
|
3632
|
+
readonly readonly: false;
|
|
3633
|
+
}>;
|
|
3431
3634
|
readonly quantity: import("shutro").DecimalField<{
|
|
3432
3635
|
readonly required: false;
|
|
3433
3636
|
readonly computed: false;
|
|
@@ -5353,6 +5556,7 @@ export declare const paymentShutro: import("shutro").Module<readonly [import("sh
|
|
|
5353
5556
|
hasDefault: false;
|
|
5354
5557
|
sequence: false;
|
|
5355
5558
|
}>;
|
|
5559
|
+
readonly active: import("shutro").ActiveField;
|
|
5356
5560
|
readonly name: import("shutro").CharField<{
|
|
5357
5561
|
readonly required: true;
|
|
5358
5562
|
readonly computed: false;
|
package/dist/payment/module.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { randomBytes } from 'node:crypto';
|
|
9
9
|
import { accountPortalShutro } from '../account_portal/index.js';
|
|
10
10
|
import { integrationsShutro } from '../integrations/index.js';
|
|
11
|
-
import { defineModel, defineModule, f } from './.kosh/bindings.js';
|
|
11
|
+
import { defineModel, defineModule, f, method } from './.kosh/bindings.js';
|
|
12
12
|
const ALL = ['read', 'write', 'create', 'unlink', 'export', 'import'];
|
|
13
13
|
/** A transaction's reference: what the provider is told and gives back. */
|
|
14
14
|
export const newReference = () => `PAY-${randomBytes(9).toString('base64url')}`;
|
|
@@ -52,7 +52,8 @@ export const PaymentTransaction = defineModel('payment.transaction', {
|
|
|
52
52
|
fields: {
|
|
53
53
|
reference: f.char({ required: true, index: 'unique', default: newReference }),
|
|
54
54
|
provider: f.many2one('payment.provider', { required: true, checkCompany: true }),
|
|
55
|
-
|
|
55
|
+
/** The invoice paid; empty while another app's document waits for the payment (a shop's order). */
|
|
56
|
+
move: f.many2one('account.move', { label: 'Invoice', checkCompany: true }),
|
|
56
57
|
partner: f.many2one('res.partner', { label: 'Customer' }),
|
|
57
58
|
currency: f.many2one('res.currency', { required: true }),
|
|
58
59
|
amount: f.monetary({ currency: 'currency', required: true }),
|
|
@@ -67,11 +68,26 @@ export const PaymentTransaction = defineModel('payment.transaction', {
|
|
|
67
68
|
payment: f.many2one('account.payment', { label: 'Payment' }),
|
|
68
69
|
error: f.text(),
|
|
69
70
|
doneAt: f.datetime({ label: 'Paid at' }),
|
|
71
|
+
/** Where the customer goes back to once the provider is done (the portal's document when empty). */
|
|
72
|
+
returnUrl: f.char({ label: 'Back to' }),
|
|
73
|
+
},
|
|
74
|
+
methods: {
|
|
75
|
+
/**
|
|
76
|
+
* The posted documents each of these transactions pays, once the provider confirmed it: its invoice. A module
|
|
77
|
+
* whose transactions pay something else first makes the invoice there (`website_sale`: the order confirmed and
|
|
78
|
+
* invoiced) by overriding it.
|
|
79
|
+
*/
|
|
80
|
+
payable: method('payment.transaction', async function () {
|
|
81
|
+
const out = new Map();
|
|
82
|
+
for (const t of await this.load({}))
|
|
83
|
+
out.set(t.id, t.move === null ? [] : [t.move.id]);
|
|
84
|
+
return out;
|
|
85
|
+
}),
|
|
70
86
|
},
|
|
71
87
|
});
|
|
72
88
|
export const paymentShutro = defineModule({
|
|
73
89
|
name: 'payment',
|
|
74
|
-
version: '0.
|
|
90
|
+
version: '0.2.0',
|
|
75
91
|
depends: [accountPortalShutro, integrationsShutro],
|
|
76
92
|
models: [PaymentProvider, PaymentTransaction],
|
|
77
93
|
});
|
package/dist/payment/settle.js
CHANGED
|
@@ -41,8 +41,17 @@ export async function settle(env, result) {
|
|
|
41
41
|
await found.write({ state: 'failed', providerReference: result.providerReference, error });
|
|
42
42
|
return { ...same, state: 'failed', changed: true, payment: null };
|
|
43
43
|
}
|
|
44
|
+
const moves = (await found.payable()).get(tx.id) ?? [];
|
|
45
|
+
if (moves.length === 0) {
|
|
46
|
+
await found.write({
|
|
47
|
+
state: 'failed',
|
|
48
|
+
providerReference: result.providerReference,
|
|
49
|
+
error: 'Paid, but there is no document to register the payment against.',
|
|
50
|
+
});
|
|
51
|
+
return { ...same, state: 'failed', changed: true, payment: null };
|
|
52
|
+
}
|
|
44
53
|
const payment = await registerPayment(env, {
|
|
45
|
-
moves
|
|
54
|
+
moves,
|
|
46
55
|
journal: tx.provider.journal.id,
|
|
47
56
|
amount: amount.toFixed(),
|
|
48
57
|
memo: `${tx.provider.name} ${result.providerReference ?? tx.reference}`,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { defineModel, defineModule, extendModel, f, replace } from '../../server/orm.js';
|
|
2
|
+
import { type DefinitionHelpers } from '../../server/orm.js';
|
|
3
|
+
import type { DefaultLoaded, Env as CoreEnv, RecordSet as CoreRecordSet, Shutro as CoreShutro } from '../../server/orm.js';
|
|
4
|
+
import type { SchemaView } from './schema.js';
|
|
5
|
+
export type { SchemaView };
|
|
6
|
+
/** Every model visible in this view. */
|
|
7
|
+
export type ModelName = keyof SchemaView & string;
|
|
8
|
+
/** `Env` typed to this view. */
|
|
9
|
+
export type Env = CoreEnv<SchemaView>;
|
|
10
|
+
/** `Shutro` typed to this view. */
|
|
11
|
+
export type Shutro = CoreShutro<SchemaView>;
|
|
12
|
+
/** A recordset of `M`, with the default loaded shape unless `L` is given. */
|
|
13
|
+
export type Records<M extends ModelName, L = DefaultLoaded<SchemaView, M>> = CoreRecordSet<SchemaView, M, L>;
|
|
14
|
+
export declare const compute: DefinitionHelpers<SchemaView>['compute'];
|
|
15
|
+
export declare const check: DefinitionHelpers<SchemaView>['check'];
|
|
16
|
+
export declare const onchange: DefinitionHelpers<SchemaView>['onchange'];
|
|
17
|
+
export declare const records: DefinitionHelpers<SchemaView>['records'];
|
|
18
|
+
export declare const method: DefinitionHelpers<SchemaView>['method'];
|
|
19
|
+
/** Module data (RFC 0017): records, overrides of dependencies' records, and references, typed like creates. */
|
|
20
|
+
export declare const record: DefinitionHelpers<SchemaView>['record'];
|
|
21
|
+
export declare const override: DefinitionHelpers<SchemaView>['override'];
|
|
22
|
+
export declare const ref: DefinitionHelpers<SchemaView>['ref'];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: 2d906a93c12e483a
|
|
2
|
+
// Bindings of module `payroll`: import the definition API from here to get types scoped to what it can see.
|
|
3
|
+
export { defineModel, defineModule, extendModel, f, replace } from '../../server/orm.js';
|
|
4
|
+
import { definitions } from '../../server/orm.js';
|
|
5
|
+
/** Definition callbacks typed against this module's view: no casts in computes, checks, onchange, methods. */
|
|
6
|
+
const helpers = definitions();
|
|
7
|
+
export const compute = helpers.compute;
|
|
8
|
+
export const check = helpers.check;
|
|
9
|
+
export const onchange = helpers.onchange;
|
|
10
|
+
export const records = helpers.records;
|
|
11
|
+
export const method = helpers.method;
|
|
12
|
+
/** Module data (RFC 0017): records, overrides of dependencies' records, and references, typed like creates. */
|
|
13
|
+
export const record = helpers.record;
|
|
14
|
+
export const override = helpers.override;
|
|
15
|
+
export const ref = helpers.ref;
|