shutro-erp 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/dist/account_portal/.kosh/bindings.js +1 -1
  2. package/dist/account_portal/.kosh/schema.d.ts +54 -3
  3. package/dist/account_portal/module.d.ts +359 -6
  4. package/dist/accounting/.kosh/bindings.js +1 -1
  5. package/dist/accounting/.kosh/schema.d.ts +54 -3
  6. package/dist/accounting/index.js +214 -2
  7. package/dist/accounting/module.d.ts +217 -5
  8. package/dist/accounting/module.js +23 -2
  9. package/dist/calendar/.kosh/bindings.d.ts +22 -0
  10. package/dist/calendar/.kosh/bindings.js +15 -0
  11. package/dist/calendar/.kosh/schema.d.ts +795 -0
  12. package/dist/calendar/demo.d.ts +6 -0
  13. package/dist/calendar/demo.js +24 -0
  14. package/dist/calendar/index.d.ts +3 -0
  15. package/dist/calendar/index.js +291 -0
  16. package/dist/calendar/module.d.ts +1705 -0
  17. package/dist/calendar/module.js +180 -0
  18. package/dist/cli/init.js +48 -0
  19. package/dist/cli/templates.d.ts +1 -1
  20. package/dist/cli/templates.js +137 -0
  21. package/dist/contacts/.kosh/bindings.js +1 -1
  22. package/dist/contacts/.kosh/schema.d.ts +78 -3
  23. package/dist/contacts/demo.js +30 -1
  24. package/dist/contacts/index.d.ts +1 -1
  25. package/dist/contacts/index.js +155 -9
  26. package/dist/contacts/module.d.ts +338 -2
  27. package/dist/contacts/module.js +82 -5
  28. package/dist/crm/.kosh/bindings.d.ts +22 -0
  29. package/dist/crm/.kosh/bindings.js +15 -0
  30. package/dist/crm/.kosh/schema.d.ts +799 -0
  31. package/dist/crm/demo.d.ts +6 -0
  32. package/dist/crm/demo.js +45 -0
  33. package/dist/crm/index.d.ts +3 -0
  34. package/dist/crm/index.js +361 -0
  35. package/dist/crm/module.d.ts +1843 -0
  36. package/dist/crm/module.js +207 -0
  37. package/dist/event/.kosh/bindings.d.ts +22 -0
  38. package/dist/event/.kosh/bindings.js +15 -0
  39. package/dist/event/.kosh/schema.d.ts +843 -0
  40. package/dist/event/demo.d.ts +6 -0
  41. package/dist/event/demo.js +65 -0
  42. package/dist/event/index.d.ts +14 -0
  43. package/dist/event/index.js +333 -0
  44. package/dist/event/mails.d.ts +15 -0
  45. package/dist/event/mails.js +112 -0
  46. package/dist/event/module.d.ts +2800 -0
  47. package/dist/event/module.js +323 -0
  48. package/dist/event/web/CheckInBox.d.ts +9 -0
  49. package/dist/event/web/CheckInBox.js +87 -0
  50. package/dist/event/web/index.d.ts +11 -0
  51. package/dist/event/web/index.js +16 -0
  52. package/dist/event/web/messages.d.ts +2 -0
  53. package/dist/event/web/messages.js +23 -0
  54. package/dist/event_account/.kosh/bindings.d.ts +22 -0
  55. package/dist/event_account/.kosh/bindings.js +15 -0
  56. package/dist/event_account/.kosh/schema.d.ts +1639 -0
  57. package/dist/event_account/index.d.ts +3 -0
  58. package/dist/event_account/index.js +28 -0
  59. package/dist/event_account/module.d.ts +6968 -0
  60. package/dist/event_account/module.js +90 -0
  61. package/dist/hr/.kosh/bindings.d.ts +22 -0
  62. package/dist/hr/.kosh/bindings.js +15 -0
  63. package/dist/hr/.kosh/schema.d.ts +878 -0
  64. package/dist/hr/demo.d.ts +6 -0
  65. package/dist/hr/demo.js +60 -0
  66. package/dist/hr/index.d.ts +3 -0
  67. package/dist/hr/index.js +483 -0
  68. package/dist/hr/module.d.ts +2611 -0
  69. package/dist/hr/module.js +350 -0
  70. package/dist/l10n_bd/.kosh/bindings.js +1 -1
  71. package/dist/l10n_bd/.kosh/schema.d.ts +54 -3
  72. package/dist/l10n_bd/module.d.ts +359 -6
  73. package/dist/l10n_in/.kosh/bindings.js +1 -1
  74. package/dist/l10n_in/.kosh/schema.d.ts +54 -3
  75. package/dist/l10n_in/module.d.ts +380 -7
  76. package/dist/maintenance/.kosh/bindings.d.ts +22 -0
  77. package/dist/maintenance/.kosh/bindings.js +15 -0
  78. package/dist/maintenance/.kosh/schema.d.ts +911 -0
  79. package/dist/maintenance/demo.d.ts +6 -0
  80. package/dist/maintenance/demo.js +60 -0
  81. package/dist/maintenance/index.d.ts +3 -0
  82. package/dist/maintenance/index.js +422 -0
  83. package/dist/maintenance/module.d.ts +3545 -0
  84. package/dist/maintenance/module.js +446 -0
  85. package/dist/maintenance_stock/.kosh/bindings.d.ts +22 -0
  86. package/dist/maintenance_stock/.kosh/bindings.js +15 -0
  87. package/dist/maintenance_stock/.kosh/schema.d.ts +1371 -0
  88. package/dist/maintenance_stock/index.d.ts +9 -0
  89. package/dist/maintenance_stock/index.js +52 -0
  90. package/dist/maintenance_stock/module.d.ts +6953 -0
  91. package/dist/maintenance_stock/module.js +192 -0
  92. package/dist/modules-sdk/index.d.ts +1 -1
  93. package/dist/modules-sdk/manifest.d.ts +70 -0
  94. package/dist/modules-sdk/manifest.js +35 -1
  95. package/dist/mrp/.kosh/bindings.d.ts +22 -0
  96. package/dist/mrp/.kosh/bindings.js +15 -0
  97. package/dist/mrp/.kosh/schema.d.ts +1378 -0
  98. package/dist/mrp/demo.d.ts +7 -0
  99. package/dist/mrp/demo.js +42 -0
  100. package/dist/mrp/index.d.ts +3 -0
  101. package/dist/mrp/index.js +392 -0
  102. package/dist/mrp/module.d.ts +8608 -0
  103. package/dist/mrp/module.js +695 -0
  104. package/dist/mrp_account/.kosh/bindings.d.ts +22 -0
  105. package/dist/mrp_account/.kosh/bindings.js +15 -0
  106. package/dist/mrp_account/.kosh/schema.d.ts +2106 -0
  107. package/dist/mrp_account/index.d.ts +3 -0
  108. package/dist/mrp_account/index.js +22 -0
  109. package/dist/mrp_account/module.d.ts +20840 -0
  110. package/dist/mrp_account/module.js +123 -0
  111. package/dist/payment/.kosh/bindings.js +1 -1
  112. package/dist/payment/.kosh/schema.d.ts +54 -3
  113. package/dist/payment/module.d.ts +359 -6
  114. package/dist/portal/.kosh/bindings.js +1 -1
  115. package/dist/portal/.kosh/schema.d.ts +78 -3
  116. package/dist/portal/module.d.ts +166 -2
  117. package/dist/pos/.kosh/bindings.d.ts +22 -0
  118. package/dist/pos/.kosh/bindings.js +15 -0
  119. package/dist/pos/.kosh/schema.d.ts +1690 -0
  120. package/dist/pos/accounting.d.ts +10 -0
  121. package/dist/pos/accounting.js +149 -0
  122. package/dist/pos/demo.d.ts +6 -0
  123. package/dist/pos/demo.js +90 -0
  124. package/dist/pos/index.d.ts +9 -0
  125. package/dist/pos/index.js +349 -0
  126. package/dist/pos/module.d.ts +9636 -0
  127. package/dist/pos/module.js +423 -0
  128. package/dist/pos/routes.d.ts +39 -0
  129. package/dist/pos/routes.js +368 -0
  130. package/dist/pos/web/Register.d.ts +9 -0
  131. package/dist/pos/web/Register.js +252 -0
  132. package/dist/pos/web/index.d.ts +11 -0
  133. package/dist/pos/web/index.js +16 -0
  134. package/dist/pos/web/messages.d.ts +2 -0
  135. package/dist/pos/web/messages.js +87 -0
  136. package/dist/pos_stock/.kosh/bindings.d.ts +22 -0
  137. package/dist/pos_stock/.kosh/bindings.js +15 -0
  138. package/dist/pos_stock/.kosh/schema.d.ts +2015 -0
  139. package/dist/pos_stock/index.d.ts +9 -0
  140. package/dist/pos_stock/index.js +35 -0
  141. package/dist/pos_stock/module.d.ts +11935 -0
  142. package/dist/pos_stock/module.js +115 -0
  143. package/dist/product/.kosh/bindings.js +1 -1
  144. package/dist/product/.kosh/schema.d.ts +51 -1
  145. package/dist/product/index.js +81 -4
  146. package/dist/product/module.d.ts +43 -1
  147. package/dist/product/module.js +9 -2
  148. package/dist/project/.kosh/bindings.js +1 -1
  149. package/dist/project/.kosh/schema.d.ts +54 -3
  150. package/dist/project/index.js +147 -7
  151. package/dist/project/module.d.ts +210 -2
  152. package/dist/project/module.js +52 -5
  153. package/dist/project_portal/.kosh/bindings.js +1 -1
  154. package/dist/project_portal/.kosh/schema.d.ts +54 -3
  155. package/dist/project_portal/module.d.ts +353 -4
  156. package/dist/purchase/.kosh/bindings.js +1 -1
  157. package/dist/purchase/.kosh/schema.d.ts +54 -3
  158. package/dist/purchase/index.js +163 -3
  159. package/dist/purchase/module.d.ts +215 -3
  160. package/dist/purchase/module.js +21 -3
  161. package/dist/purchase_account/.kosh/bindings.js +1 -1
  162. package/dist/purchase_account/.kosh/schema.d.ts +55 -3
  163. package/dist/purchase_account/index.js +26 -1
  164. package/dist/purchase_account/module.d.ts +393 -7
  165. package/dist/purchase_portal/.kosh/bindings.js +1 -1
  166. package/dist/purchase_portal/.kosh/schema.d.ts +54 -3
  167. package/dist/purchase_portal/module.d.ts +366 -5
  168. package/dist/purchase_stock/.kosh/bindings.d.ts +22 -0
  169. package/dist/purchase_stock/.kosh/bindings.js +15 -0
  170. package/dist/purchase_stock/.kosh/schema.d.ts +1310 -0
  171. package/dist/purchase_stock/index.d.ts +7 -0
  172. package/dist/purchase_stock/index.js +91 -0
  173. package/dist/purchase_stock/module.d.ts +6763 -0
  174. package/dist/purchase_stock/module.js +144 -0
  175. package/dist/purchase_stock_account/.kosh/bindings.d.ts +22 -0
  176. package/dist/purchase_stock_account/.kosh/bindings.js +15 -0
  177. package/dist/purchase_stock_account/.kosh/schema.d.ts +1959 -0
  178. package/dist/purchase_stock_account/index.d.ts +3 -0
  179. package/dist/purchase_stock_account/index.js +24 -0
  180. package/dist/purchase_stock_account/module.d.ts +35366 -0
  181. package/dist/purchase_stock_account/module.js +162 -0
  182. package/dist/recruitment/.kosh/bindings.d.ts +22 -0
  183. package/dist/recruitment/.kosh/bindings.js +15 -0
  184. package/dist/recruitment/.kosh/schema.d.ts +990 -0
  185. package/dist/recruitment/demo.d.ts +6 -0
  186. package/dist/recruitment/demo.js +45 -0
  187. package/dist/recruitment/index.d.ts +3 -0
  188. package/dist/recruitment/index.js +385 -0
  189. package/dist/recruitment/module.d.ts +3247 -0
  190. package/dist/recruitment/module.js +193 -0
  191. package/dist/recruitment/web/HireButton.d.ts +9 -0
  192. package/dist/recruitment/web/HireButton.js +32 -0
  193. package/dist/recruitment/web/index.d.ts +11 -0
  194. package/dist/recruitment/web/index.js +16 -0
  195. package/dist/recruitment/web/messages.d.ts +2 -0
  196. package/dist/recruitment/web/messages.js +19 -0
  197. package/dist/reporting/documents.d.ts +5 -0
  198. package/dist/reporting/documents.js +28 -1
  199. package/dist/reporting/index.d.ts +1 -1
  200. package/dist/reporting/index.js +4 -2
  201. package/dist/reporting/models.js +9 -0
  202. package/dist/reporting/overviews.d.ts +16 -0
  203. package/dist/reporting/overviews.js +56 -0
  204. package/dist/reporting/routes-documents.js +1 -1
  205. package/dist/reporting/routes.js +138 -80
  206. package/dist/reporting/web/DashboardView.d.ts +11 -0
  207. package/dist/reporting/web/DashboardView.js +2 -2
  208. package/dist/reporting/web/DesignerView.js +5 -0
  209. package/dist/reporting/web/Overview.d.ts +9 -0
  210. package/dist/reporting/web/Overview.js +53 -0
  211. package/dist/reporting/web/index.d.ts +1 -0
  212. package/dist/reporting/web/index.js +4 -1
  213. package/dist/reporting/web/messages.js +9 -0
  214. package/dist/sale_account/.kosh/bindings.js +1 -1
  215. package/dist/sale_account/.kosh/schema.d.ts +59 -3
  216. package/dist/sale_account/index.js +22 -1
  217. package/dist/sale_account/module.d.ts +461 -7
  218. package/dist/sale_portal/.kosh/bindings.js +1 -1
  219. package/dist/sale_portal/.kosh/schema.d.ts +58 -3
  220. package/dist/sale_portal/module.d.ts +434 -5
  221. package/dist/sale_project/.kosh/bindings.js +1 -1
  222. package/dist/sale_project/.kosh/schema.d.ts +60 -3
  223. package/dist/sale_project/module.d.ts +476 -6
  224. package/dist/sale_stock/.kosh/bindings.d.ts +22 -0
  225. package/dist/sale_stock/.kosh/bindings.js +15 -0
  226. package/dist/sale_stock/.kosh/schema.d.ts +1228 -0
  227. package/dist/sale_stock/index.d.ts +7 -0
  228. package/dist/sale_stock/index.js +84 -0
  229. package/dist/sale_stock/module.d.ts +6791 -0
  230. package/dist/sale_stock/module.js +146 -0
  231. package/dist/sales/.kosh/bindings.js +1 -1
  232. package/dist/sales/.kosh/schema.d.ts +58 -3
  233. package/dist/sales/index.js +191 -4
  234. package/dist/sales/module.d.ts +355 -3
  235. package/dist/sales/module.js +78 -3
  236. package/dist/server/api/metadata.d.ts +5 -0
  237. package/dist/server/api/metadata.js +5 -0
  238. package/dist/server/api/rest.js +64 -1
  239. package/dist/server/api/views.js +1 -0
  240. package/dist/server/app-settings.d.ts +7 -0
  241. package/dist/server/app-settings.js +10 -0
  242. package/dist/server/auth/base.js +9 -0
  243. package/dist/server/index.d.ts +1 -0
  244. package/dist/server/index.js +1 -0
  245. package/dist/settings/app-settings.d.ts +2 -0
  246. package/dist/settings/app-settings.js +518 -0
  247. package/dist/settings/index.d.ts +1 -0
  248. package/dist/settings/index.js +15 -0
  249. package/dist/settings/people.js +29 -5
  250. package/dist/settings/web/AppSettingsPage.d.ts +11 -0
  251. package/dist/settings/web/AppSettingsPage.js +210 -0
  252. package/dist/settings/web/OverviewPage.js +16 -3
  253. package/dist/settings/web/PeoplePage.js +20 -6
  254. package/dist/settings/web/index.d.ts +1 -0
  255. package/dist/settings/web/index.js +3 -0
  256. package/dist/settings/web/messages.js +118 -2
  257. package/dist/stock/.kosh/bindings.d.ts +22 -0
  258. package/dist/stock/.kosh/bindings.js +15 -0
  259. package/dist/stock/.kosh/schema.d.ts +1147 -0
  260. package/dist/stock/demo.d.ts +7 -0
  261. package/dist/stock/demo.js +55 -0
  262. package/dist/stock/index.d.ts +3 -0
  263. package/dist/stock/index.js +674 -0
  264. package/dist/stock/module.d.ts +6330 -0
  265. package/dist/stock/module.js +1325 -0
  266. package/dist/stock/web/ScanBox.d.ts +8 -0
  267. package/dist/stock/web/ScanBox.js +90 -0
  268. package/dist/stock/web/index.d.ts +11 -0
  269. package/dist/stock/web/index.js +16 -0
  270. package/dist/stock/web/messages.d.ts +2 -0
  271. package/dist/stock/web/messages.js +25 -0
  272. package/dist/stock_account/.kosh/bindings.d.ts +22 -0
  273. package/dist/stock_account/.kosh/bindings.js +15 -0
  274. package/dist/stock_account/.kosh/schema.d.ts +1875 -0
  275. package/dist/stock_account/index.d.ts +3 -0
  276. package/dist/stock_account/index.js +130 -0
  277. package/dist/stock_account/module.d.ts +10655 -0
  278. package/dist/stock_account/module.js +339 -0
  279. package/dist/storage/attachments.d.ts +5 -0
  280. package/dist/storage/attachments.js +12 -1
  281. package/dist/storage/models.js +3 -0
  282. package/dist/storage/routes.js +13 -2
  283. package/dist/todo/.kosh/bindings.d.ts +22 -0
  284. package/dist/todo/.kosh/bindings.js +15 -0
  285. package/dist/todo/.kosh/schema.d.ts +732 -0
  286. package/dist/todo/demo.d.ts +6 -0
  287. package/dist/todo/demo.js +35 -0
  288. package/dist/todo/index.d.ts +3 -0
  289. package/dist/todo/index.js +187 -0
  290. package/dist/todo/module.d.ts +1180 -0
  291. package/dist/todo/module.js +130 -0
  292. package/dist/trade_finance/.kosh/bindings.d.ts +22 -0
  293. package/dist/trade_finance/.kosh/bindings.js +15 -0
  294. package/dist/trade_finance/.kosh/schema.d.ts +884 -0
  295. package/dist/trade_finance/demo.d.ts +6 -0
  296. package/dist/trade_finance/demo.js +63 -0
  297. package/dist/trade_finance/index.d.ts +3 -0
  298. package/dist/trade_finance/index.js +413 -0
  299. package/dist/trade_finance/module.d.ts +3779 -0
  300. package/dist/trade_finance/module.js +505 -0
  301. package/dist/trade_finance_account/.kosh/bindings.d.ts +22 -0
  302. package/dist/trade_finance_account/.kosh/bindings.js +15 -0
  303. package/dist/trade_finance_account/.kosh/schema.d.ts +1711 -0
  304. package/dist/trade_finance_account/index.d.ts +3 -0
  305. package/dist/trade_finance_account/index.js +92 -0
  306. package/dist/trade_finance_account/module.d.ts +7928 -0
  307. package/dist/trade_finance_account/module.js +244 -0
  308. package/dist/trade_finance_purchase/.kosh/bindings.d.ts +22 -0
  309. package/dist/trade_finance_purchase/.kosh/bindings.js +15 -0
  310. package/dist/trade_finance_purchase/.kosh/schema.d.ts +1153 -0
  311. package/dist/trade_finance_purchase/index.d.ts +8 -0
  312. package/dist/trade_finance_purchase/index.js +50 -0
  313. package/dist/trade_finance_purchase/module.d.ts +4252 -0
  314. package/dist/trade_finance_purchase/module.js +44 -0
  315. package/dist/trade_finance_sale/.kosh/bindings.d.ts +22 -0
  316. package/dist/trade_finance_sale/.kosh/bindings.js +15 -0
  317. package/dist/trade_finance_sale/.kosh/schema.d.ts +1071 -0
  318. package/dist/trade_finance_sale/index.d.ts +8 -0
  319. package/dist/trade_finance_sale/index.js +50 -0
  320. package/dist/trade_finance_sale/module.d.ts +4280 -0
  321. package/dist/trade_finance_sale/module.js +44 -0
  322. package/dist/ui/api.d.ts +2 -1
  323. package/dist/ui/api.js +2 -1
  324. package/dist/ui/app.js +2 -1
  325. package/dist/ui/components/AppIcon.js +23 -1
  326. package/dist/ui/components/primitives.d.ts +2 -0
  327. package/dist/ui/components/primitives.js +7 -1
  328. package/dist/ui/i18n/messages.d.ts +23 -0
  329. package/dist/ui/i18n/messages.js +38 -0
  330. package/dist/ui/index.d.ts +1 -0
  331. package/dist/ui/index.js +1 -0
  332. package/dist/ui/offline/queue.d.ts +5 -1
  333. package/dist/ui/offline/queue.js +2 -0
  334. package/dist/ui/registry.d.ts +5 -0
  335. package/dist/ui/shell/Home.js +55 -4
  336. package/dist/ui/views/FormView.js +98 -17
  337. package/dist/ui/views/KanbanView.d.ts +2 -0
  338. package/dist/ui/views/KanbanView.js +32 -3
  339. package/dist/ui/views/ListView.js +108 -11
  340. package/dist/ui/views/StatsRow.d.ts +14 -0
  341. package/dist/ui/views/StatsRow.js +88 -0
  342. package/dist/ui/views/widgets.d.ts +2 -1
  343. package/dist/ui/views/widgets.js +194 -1
  344. package/dist/views/builders.d.ts +19 -2
  345. package/dist/views/builders.js +21 -1
  346. package/dist/views/condition.d.ts +6 -0
  347. package/dist/views/condition.js +20 -0
  348. package/dist/views/documents.d.ts +8 -0
  349. package/dist/views/extend.d.ts +2 -2
  350. package/dist/views/extend.js +11 -1
  351. package/dist/views/index.d.ts +2 -2
  352. package/dist/views/index.js +2 -2
  353. package/dist/views/types.d.ts +52 -5
  354. package/dist/views/validate.js +39 -1
  355. package/dist/website/.kosh/bindings.d.ts +22 -0
  356. package/dist/website/.kosh/bindings.js +15 -0
  357. package/dist/website/.kosh/schema.d.ts +881 -0
  358. package/dist/website/demo.d.ts +6 -0
  359. package/dist/website/demo.js +115 -0
  360. package/dist/website/index.d.ts +9 -0
  361. package/dist/website/index.js +250 -0
  362. package/dist/website/module.d.ts +2987 -0
  363. package/dist/website/module.js +281 -0
  364. package/dist/website/render.d.ts +45 -0
  365. package/dist/website/render.js +102 -0
  366. package/dist/website/routes.d.ts +12 -0
  367. package/dist/website/routes.js +246 -0
  368. package/dist/website/web/PagePreview.d.ts +7 -0
  369. package/dist/website/web/PagePreview.js +33 -0
  370. package/dist/website/web/index.d.ts +11 -0
  371. package/dist/website/web/index.js +16 -0
  372. package/dist/website/web/messages.d.ts +2 -0
  373. package/dist/website/web/messages.js +15 -0
  374. package/dist/website_crm/.kosh/bindings.d.ts +22 -0
  375. package/dist/website_crm/.kosh/bindings.js +15 -0
  376. package/dist/website_crm/.kosh/schema.d.ts +966 -0
  377. package/dist/website_crm/index.d.ts +3 -0
  378. package/dist/website_crm/index.js +39 -0
  379. package/dist/website_crm/module.d.ts +2955 -0
  380. package/dist/website_crm/module.js +44 -0
  381. package/package.json +118 -1
@@ -0,0 +1,115 @@
1
+ /**
2
+ * The data layer of the Counter ↔ Stockroom bridge (RFC 0021, Counter step 2): a closed session's sold goods leave
3
+ * the shop's warehouse as **one delivery per session**, done at once when the stock is there; when it is short the
4
+ * delivery stays confirmed for a manager to finish from Stockroom. Returns (negative quantities) come back in it.
5
+ */
6
+ import { posShutro } from '../pos/index.js';
7
+ import { orm } from '../server/orm.js';
8
+ import { defaultLocations, stockShutro } from '../stock/index.js';
9
+ import { defineModule, extendModel, f } from './.kosh/bindings.js';
10
+ const ZERO = orm.toDecimal(0);
11
+ export const ShopWarehouse = extendModel('pos.shop', {
12
+ fields: {
13
+ /** The warehouse the shop sells from; the company's first one otherwise. */
14
+ warehouse: f.many2one('stock.warehouse', { ondelete: 'restrict' }),
15
+ },
16
+ });
17
+ export const SessionDelivery = extendModel('pos.session', {
18
+ fields: {
19
+ delivery: f.many2one('stock.picking', { ondelete: 'set null', label: 'Stock delivery' }),
20
+ },
21
+ overrides: {
22
+ closed: async function (next) {
23
+ await next();
24
+ const sessions = this;
25
+ const env = sessions.env;
26
+ await env.asSuperuser({ reason: 'counter session to stock' }, async (su) => {
27
+ for (const s of await su
28
+ .model('pos.session')
29
+ .browse(sessions.ids)
30
+ .load({ shop: true, company: true, orders: { lines: { product: { uom: true } } } })) {
31
+ if (s.delivery !== null)
32
+ continue;
33
+ // What left the shelves: the paid sales' goods, by product (returns take away).
34
+ const sold = new Map();
35
+ for (const o of s.orders) {
36
+ if (o.state !== 'paid')
37
+ continue;
38
+ for (const l of o.lines) {
39
+ if (l.product.kind !== 'goods')
40
+ continue;
41
+ const slot = sold.get(l.product.id) ?? {
42
+ product: l.product.id,
43
+ name: l.product.name,
44
+ uom: l.product.uom?.id ?? null,
45
+ quantity: ZERO,
46
+ };
47
+ slot.quantity = slot.quantity.plus(l.quantity);
48
+ sold.set(l.product.id, slot);
49
+ }
50
+ }
51
+ const moves = [...sold.values()].filter((m) => m.quantity.gt(0));
52
+ if (moves.length === 0)
53
+ continue;
54
+ const shopWarehouse = s.shop.warehouse;
55
+ const places = await defaultLocations(su, 'delivery', shopWarehouse?.id ?? null, s.company.id);
56
+ if (places.source === null || places.destination === null)
57
+ throw new orm.ValidationError('pos.session', ['state'], `The company of ${s.name} has no warehouse to sell from.`, 'Add a warehouse in Stockroom › Configuration › Warehouses.');
58
+ const made = await su.model('stock.picking').create([
59
+ {
60
+ kind: 'delivery',
61
+ company: s.company.id,
62
+ warehouse: places.warehouse,
63
+ source: places.source,
64
+ destination: places.destination,
65
+ origin: s.name,
66
+ moves: {
67
+ create: moves.map((m) => ({
68
+ product: m.product,
69
+ name: m.name,
70
+ quantity: m.quantity,
71
+ quantityDone: m.quantity,
72
+ uom: m.uom,
73
+ })),
74
+ },
75
+ },
76
+ ]);
77
+ await su.flush();
78
+ await made.confirm();
79
+ await su.flush();
80
+ await made.reserve();
81
+ await su.flush();
82
+ // Done at once when the stock is there; else it waits for a manager in Stockroom.
83
+ try {
84
+ await made.validate();
85
+ await su.flush();
86
+ }
87
+ catch (error) {
88
+ const name = error.name;
89
+ // Short stock: the guard of validate refuses; the delivery stays confirmed for Stockroom.
90
+ if (!(error instanceof orm.ValidationError || name === 'TransitionGuardError'))
91
+ throw error;
92
+ }
93
+ await su
94
+ .model('pos.session')
95
+ .browse([s.id])
96
+ .write({ delivery: made.ids[0] ?? null });
97
+ }
98
+ });
99
+ },
100
+ },
101
+ });
102
+ export const posStockShutro = defineModule({
103
+ name: 'pos_stock',
104
+ version: '0.1.0',
105
+ depends: [posShutro, stockShutro],
106
+ groups: [
107
+ orm.defineGroup({
108
+ code: 'pos_stock.user',
109
+ label: 'Counter sales from stock',
110
+ implies: ['pos.cashier'],
111
+ }),
112
+ ],
113
+ models: [],
114
+ extensions: [ShopWarehouse, SessionDelivery],
115
+ });
@@ -1,4 +1,4 @@
1
- // GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: cc95697afc48b244
1
+ // GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: 95df3fbe8a5c3d67
2
2
  // Bindings of module `product`: import the definition API from here to get types scoped to what it can see.
3
3
  export { defineModel, defineModule, extendModel, f, replace } from '../../server/orm.js';
4
4
  import { definitions } from '../../server/orm.js';
@@ -1,4 +1,4 @@
1
- // GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: cc95697afc48b244
1
+ // GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: 95df3fbe8a5c3d67
2
2
  // Schema view of module `product` (RFC 0002 §7.7): the models it owns or depends on, with the extensions it can see.
3
3
  import type { F } from '../../server/orm.js';
4
4
 
@@ -14,6 +14,7 @@ export interface SchemaView {
14
14
  readonly 'auth.user_group': AuthUserGroup;
15
15
  readonly 'kosh.image': KoshImage;
16
16
  readonly 'kosh.saved_view': KoshSavedView;
17
+ readonly 'kosh.setting': KoshSetting;
17
18
  readonly 'oauth.app': OauthApp;
18
19
  readonly 'oauth.code': OauthCode;
19
20
  readonly 'oauth.grant': OauthGrant;
@@ -23,6 +24,7 @@ export interface SchemaView {
23
24
  readonly 'res.company': ResCompany;
24
25
  readonly 'res.currency': ResCurrency;
25
26
  readonly 'res.users': ResUsers;
27
+ readonly 'storage.attachment': StorageAttachment;
26
28
  readonly 'uom.uom': UomUom;
27
29
  }
28
30
 
@@ -270,6 +272,26 @@ export interface KoshSavedView {
270
272
  export interface KoshSavedViewMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'kosh.saved_view'> {
271
273
  }
272
274
 
275
+ /** `kosh.setting` (owner: base). */
276
+ export interface KoshSetting {
277
+ readonly name: 'kosh.setting';
278
+ readonly fields: {
279
+ readonly id: F.Id<'kosh.setting'>;
280
+ readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
281
+ readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
282
+ readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
283
+ readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
284
+ readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
285
+ readonly key: F.Char<{ readonly required: true }>;
286
+ readonly value: F.Json;
287
+ };
288
+ readonly methods: KoshSettingMethods;
289
+ }
290
+
291
+ /** Methods of `kosh.setting`: declared ones and transitions. */
292
+ export interface KoshSettingMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'kosh.setting'> {
293
+ }
294
+
273
295
  /** `oauth.app` (owner: base). */
274
296
  export interface OauthApp {
275
297
  readonly name: 'oauth.app';
@@ -406,6 +428,7 @@ export interface ProductProduct {
406
428
  readonly category: F.Many2one<'product.category'>;
407
429
  readonly uom: F.Many2one<'uom.uom'>;
408
430
  readonly barcode: F.Char;
431
+ readonly image: F.Many2one<'storage.attachment'>;
409
432
  readonly listPrice: F.Decimal<{ readonly required: true; readonly default: true }>;
410
433
  readonly standardPrice: F.Decimal<{ readonly required: true; readonly default: true }>;
411
434
  readonly saleOk: F.Bool<{ readonly required: true; readonly default: true }>;
@@ -500,6 +523,33 @@ export interface ResUsers {
500
523
  export interface ResUsersMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'res.users'> {
501
524
  }
502
525
 
526
+ /** `storage.attachment` (owner: storage). */
527
+ export interface StorageAttachment {
528
+ readonly name: 'storage.attachment';
529
+ readonly fields: {
530
+ readonly id: F.Id<'storage.attachment'>;
531
+ readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
532
+ readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
533
+ readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
534
+ readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
535
+ readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
536
+ readonly name: F.Char<{ readonly required: true }>;
537
+ readonly mime: F.Char<{ readonly required: true }>;
538
+ readonly size: F.Integer<{ readonly required: true }>;
539
+ readonly sha256: F.Char<{ readonly required: true }>;
540
+ readonly key: F.Char<{ readonly required: true }>;
541
+ readonly resModel: F.Char<{ readonly required: true }>;
542
+ readonly resId: F.Integer<{ readonly required: true }>;
543
+ readonly variantOf: F.Many2one<'storage.attachment'>;
544
+ readonly width: F.Integer;
545
+ };
546
+ readonly methods: StorageAttachmentMethods;
547
+ }
548
+
549
+ /** Methods of `storage.attachment`: declared ones and transitions. */
550
+ export interface StorageAttachmentMethods extends F.Methods<typeof import('../../storage/index.js').storageShutro, 'storage.attachment'> {
551
+ }
552
+
503
553
  /** `uom.uom` (owner: product). */
504
554
  export interface UomUom {
505
555
  readonly name: 'uom.uom';
@@ -4,7 +4,9 @@
4
4
  * categories, units of measure and taxes. Sales and Purchase sell and buy them.
5
5
  */
6
6
  import { defineModule } from '../modules-sdk/index.js';
7
+ import { reporting } from '../reporting/index.js';
7
8
  import { base } from '../server/index.js';
9
+ import { storage } from '../storage/index.js';
8
10
  import { action, form, kanban, list, search } from '../views/index.js';
9
11
  import { productDemo } from './demo.js';
10
12
  import { AccountTax, ProductCategory, ProductProduct, productShutro, UomUom } from './module.js';
@@ -14,7 +16,7 @@ export const product = defineModule({
14
16
  shutro: productShutro,
15
17
  kosh: '^0.1.0',
16
18
  hooks: { demo: productDemo },
17
- depends: [base],
19
+ depends: [base, storage, reporting],
18
20
  app: {
19
21
  code: 'product',
20
22
  label: 'Products',
@@ -27,6 +29,63 @@ export const product = defineModule({
27
29
  user: { label: 'User', groups: ['product.user'] },
28
30
  manager: { label: 'Manager', groups: ['product.manager'], implies: ['user'] },
29
31
  },
32
+ // The Overview (RFC 0022 step 2): the catalogue at a glance.
33
+ overview: {
34
+ cards: [
35
+ {
36
+ id: 'products_all',
37
+ title: 'Products',
38
+ kind: 'kpi',
39
+ model: 'product.product',
40
+ measure: 'count',
41
+ w: 3,
42
+ },
43
+ {
44
+ id: 'goods',
45
+ title: 'Goods',
46
+ kind: 'kpi',
47
+ model: 'product.product',
48
+ measure: 'count',
49
+ filter: { kind: 'goods' },
50
+ w: 3,
51
+ },
52
+ {
53
+ id: 'services',
54
+ title: 'Services',
55
+ kind: 'kpi',
56
+ model: 'product.product',
57
+ measure: 'count',
58
+ filter: { kind: 'service' },
59
+ w: 3,
60
+ },
61
+ {
62
+ id: 'average_price',
63
+ title: 'Average sales price',
64
+ kind: 'kpi',
65
+ model: 'product.product',
66
+ measure: 'avg:listPrice',
67
+ w: 3,
68
+ },
69
+ {
70
+ id: 'by_category',
71
+ title: 'By category',
72
+ kind: 'chart',
73
+ model: 'product.product',
74
+ measure: 'count',
75
+ groupBy: 'category',
76
+ chart: 'pie',
77
+ w: 6,
78
+ },
79
+ {
80
+ id: 'priciest',
81
+ title: 'Highest sales prices',
82
+ kind: 'list',
83
+ model: 'product.product',
84
+ measure: 'sum:listPrice',
85
+ w: 6,
86
+ },
87
+ ],
88
+ },
30
89
  actions: {
31
90
  'product.action_products': action(ProductProduct, {
32
91
  label: 'Products',
@@ -71,15 +130,33 @@ export const product = defineModule({
71
130
  views: {
72
131
  'product.product.kanban': kanban(ProductProduct, {
73
132
  groupBy: 'kind',
74
- card: { title: 'name', subtitle: 'code', footer: ['listPrice', 'uom'] },
133
+ card: { title: 'name', subtitle: 'code', footer: ['listPrice', 'uom'], image: 'image' },
75
134
  }),
76
135
  'product.product.list': list(ProductProduct, {
77
- columns: ['code', 'name', 'kind', 'category', 'listPrice', 'standardPrice', 'uom'],
136
+ columns: [
137
+ { field: 'image', widget: 'avatar' },
138
+ 'code',
139
+ 'name',
140
+ 'kind',
141
+ 'category',
142
+ 'listPrice',
143
+ 'standardPrice',
144
+ 'uom',
145
+ ],
78
146
  defaultOrder: ['name asc'],
79
147
  }),
80
148
  'product.product.form': form(ProductProduct, (k) => ({
81
149
  sheet: [
82
- k.group('identity', ['name', 'code', 'kind', 'category', 'barcode']),
150
+ // Sold, bought, on hand: Sales, Purchase and Stockroom append their tiles (RFC 0022 §3.1).
151
+ k.stats('related', []),
152
+ k.group('identity', [
153
+ { field: 'image', widget: 'image' },
154
+ 'name',
155
+ 'code',
156
+ 'kind',
157
+ 'category',
158
+ 'barcode',
159
+ ]),
83
160
  k.group('prices', ['listPrice', 'standardPrice', 'uom'], { label: 'Prices' }),
84
161
  k.notebook('more', [
85
162
  k.page('sales', 'Sales & purchase', [
@@ -543,6 +543,16 @@ export declare const ProductProduct: import("../server/orm.js").Model<"product.p
543
543
  readonly hasDefault: false;
544
544
  readonly readonly: false;
545
545
  }, string>;
546
+ readonly image: import("../server/orm.js").Many2oneField<"storage.attachment", {
547
+ readonly required: false;
548
+ readonly computed: false;
549
+ readonly inverse: false;
550
+ readonly sequence: false;
551
+ readonly computeName: undefined;
552
+ readonly store: true;
553
+ readonly hasDefault: false;
554
+ readonly readonly: false;
555
+ }>;
546
556
  readonly listPrice: import("../server/orm.js").DecimalField<{
547
557
  readonly required: true;
548
558
  readonly computed: false;
@@ -695,6 +705,17 @@ export declare const ProductProduct: import("../server/orm.js").Model<"product.p
695
705
  readonly hasDefault: false;
696
706
  readonly readonly: false;
697
707
  }, string>;
708
+ /** A picture: an attachment of the product (RFC 0022 §3.3), with its 256 px thumbnail. */
709
+ readonly image: import("../server/orm.js").Many2oneField<"storage.attachment", {
710
+ readonly required: false;
711
+ readonly computed: false;
712
+ readonly inverse: false;
713
+ readonly sequence: false;
714
+ readonly computeName: undefined;
715
+ readonly store: true;
716
+ readonly hasDefault: false;
717
+ readonly readonly: false;
718
+ }>;
698
719
  /** The sales price, in the company currency. */
699
720
  readonly listPrice: import("../server/orm.js").DecimalField<{
700
721
  readonly required: true;
@@ -1333,6 +1354,16 @@ export declare const productShutro: import("../server/orm.js").Module<readonly [
1333
1354
  readonly hasDefault: false;
1334
1355
  readonly readonly: false;
1335
1356
  }, string>;
1357
+ readonly image: import("../server/orm.js").Many2oneField<"storage.attachment", {
1358
+ readonly required: false;
1359
+ readonly computed: false;
1360
+ readonly inverse: false;
1361
+ readonly sequence: false;
1362
+ readonly computeName: undefined;
1363
+ readonly store: true;
1364
+ readonly hasDefault: false;
1365
+ readonly readonly: false;
1366
+ }>;
1336
1367
  readonly listPrice: import("../server/orm.js").DecimalField<{
1337
1368
  readonly required: true;
1338
1369
  readonly computed: false;
@@ -1485,6 +1516,17 @@ export declare const productShutro: import("../server/orm.js").Module<readonly [
1485
1516
  readonly hasDefault: false;
1486
1517
  readonly readonly: false;
1487
1518
  }, string>;
1519
+ /** A picture: an attachment of the product (RFC 0022 §3.3), with its 256 px thumbnail. */
1520
+ readonly image: import("../server/orm.js").Many2oneField<"storage.attachment", {
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
+ }>;
1488
1530
  /** The sales price, in the company currency. */
1489
1531
  readonly listPrice: import("../server/orm.js").DecimalField<{
1490
1532
  readonly required: true;
@@ -1580,4 +1622,4 @@ export declare const productShutro: import("../server/orm.js").Module<readonly [
1580
1622
  readonly hasDefault: false;
1581
1623
  readonly readonly: false;
1582
1624
  }>;
1583
- }>>], readonly [import("../server/orm.js").Module<readonly import("../server/orm.js").AnyModel[], readonly import("../server/orm.js").ModuleBase[], readonly import("../server/orm.js").AnyExtension[]>], readonly []>;
1625
+ }>>], readonly [import("../server/orm.js").Module<readonly import("../server/orm.js").AnyModel[], readonly import("../server/orm.js").ModuleBase[], readonly import("../server/orm.js").AnyExtension[]>, import("../server/orm.js").Module<readonly import("../server/orm.js").AnyModel[], readonly import("../server/orm.js").ModuleBase[], readonly import("../server/orm.js").AnyExtension[]>], readonly []>;
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { baseShutro } from '../server/index.js';
7
7
  import { orm } from '../server/orm.js';
8
+ import { storageShutro } from '../storage/index.js';
8
9
  import { check, defineModel, defineModule, f, record } from './.kosh/bindings.js';
9
10
  const ALL = ['read', 'write', 'create', 'unlink', 'export', 'import'];
10
11
  const READ = ['read'];
@@ -90,6 +91,8 @@ export const ProductProduct = defineModel('product.product', {
90
91
  category: f.many2one('product.category'),
91
92
  uom: f.many2one('uom.uom', { label: 'Unit of measure' }),
92
93
  barcode: f.char({ index: 'unique' }),
94
+ /** A picture: an attachment of the product (RFC 0022 §3.3), with its 256 px thumbnail. */
95
+ image: f.many2one('storage.attachment', { ondelete: 'set null', label: 'Picture' }),
93
96
  /** The sales price, in the company currency. */
94
97
  listPrice: f.decimal({ scale: 2, required: true, default: '0', label: 'Sales price' }),
95
98
  /** The cost: the default purchase price. */
@@ -138,9 +141,13 @@ export const productShutro = defineModule({
138
141
  },
139
142
  },
140
143
  ],
141
- depends: [baseShutro],
144
+ depends: [baseShutro, storageShutro],
142
145
  groups: [
143
- orm.defineGroup({ code: 'product.user', label: 'Products user', implies: ['base.user'] }),
146
+ orm.defineGroup({
147
+ code: 'product.user',
148
+ label: 'Products user',
149
+ implies: ['base.user', 'storage.user'],
150
+ }),
144
151
  orm.defineGroup({
145
152
  code: 'product.manager',
146
153
  label: 'Products manager',
@@ -1,4 +1,4 @@
1
- // GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: 695505b1c9a0d796
1
+ // GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: 32f956c99138a8eb
2
2
  // Bindings of module `project`: import the definition API from here to get types scoped to what it can see.
3
3
  export { defineModel, defineModule, extendModel, f, replace } from '../../server/orm.js';
4
4
  import { definitions } from '../../server/orm.js';
@@ -1,4 +1,4 @@
1
- // GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: 695505b1c9a0d796
1
+ // GENERATED by `pnpm generate:models` (Shutro’s generator). Do not edit. definitions-hash: 32f956c99138a8eb
2
2
  // Schema view of module `project` (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
 
@@ -13,6 +13,7 @@ export interface SchemaView {
13
13
  readonly 'auth.user_group': AuthUserGroup;
14
14
  readonly 'kosh.image': KoshImage;
15
15
  readonly 'kosh.saved_view': KoshSavedView;
16
+ readonly 'kosh.setting': KoshSetting;
16
17
  readonly 'mail.activity': MailActivity;
17
18
  readonly 'mail.activity.type': MailActivityType;
18
19
  readonly 'mail.channel': MailChannel;
@@ -31,6 +32,7 @@ export interface SchemaView {
31
32
  readonly 'res.company': ResCompany;
32
33
  readonly 'res.currency': ResCurrency;
33
34
  readonly 'res.partner': ResPartner;
35
+ readonly 'res.partner.tag': ResPartnerTag;
34
36
  readonly 'res.users': ResUsers;
35
37
  readonly 'storage.attachment': StorageAttachment;
36
38
  }
@@ -251,6 +253,26 @@ export interface KoshSavedView {
251
253
  export interface KoshSavedViewMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'kosh.saved_view'> {
252
254
  }
253
255
 
256
+ /** `kosh.setting` (owner: base). */
257
+ export interface KoshSetting {
258
+ readonly name: 'kosh.setting';
259
+ readonly fields: {
260
+ readonly id: F.Id<'kosh.setting'>;
261
+ readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
262
+ readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
263
+ readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
264
+ readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
265
+ readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
266
+ readonly key: F.Char<{ readonly required: true }>;
267
+ readonly value: F.Json;
268
+ };
269
+ readonly methods: KoshSettingMethods;
270
+ }
271
+
272
+ /** Methods of `kosh.setting`: declared ones and transitions. */
273
+ export interface KoshSettingMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'kosh.setting'> {
274
+ }
275
+
254
276
  /** `mail.activity` (owner: messaging). */
255
277
  export interface MailActivity {
256
278
  readonly name: 'mail.activity';
@@ -638,7 +660,7 @@ export interface ProjectTimesheet {
638
660
  export interface ProjectTimesheetMethods extends F.Methods<typeof import('../module.js').projectShutro, 'project.timesheet'> {
639
661
  }
640
662
 
641
- /** `res.company` (owner: base). */
663
+ /** `res.company` (owner: base; extended by: contacts, project). */
642
664
  export interface ResCompany {
643
665
  readonly name: 'res.company';
644
666
  readonly fields: {
@@ -658,12 +680,16 @@ export interface ResCompany {
658
680
  readonly email: F.Char;
659
681
  readonly phone: F.Char;
660
682
  readonly website: F.Char;
683
+ readonly contactTaxIdRequired: F.Bool<{ readonly required: true; readonly default: true }>; // contacts
684
+ readonly contactUniqueEmail: F.Bool<{ readonly required: true; readonly default: true }>; // contacts
685
+ readonly projectPlannedHoursDefault: F.Decimal; // project
686
+ readonly projectTimesheetStep: F.Selection<'none' | 'quarter' | 'half' | 'whole', { readonly default: true }>; // project
661
687
  };
662
688
  readonly methods: ResCompanyMethods;
663
689
  }
664
690
 
665
691
  /** Methods of `res.company`: declared ones and transitions. */
666
- export interface ResCompanyMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'res.company'> {
692
+ export interface ResCompanyMethods extends F.Methods<typeof import('../../server/index.js').baseShutro, 'res.company'>, F.Methods<typeof import('../../contacts/index.js').contactsShutro, 'res.company'>, F.Methods<typeof import('../module.js').projectShutro, 'res.company'> {
667
693
  }
668
694
 
669
695
  /** `res.currency` (owner: base). */
@@ -700,6 +726,10 @@ export interface ResPartner {
700
726
  readonly active: F.Bool<{ readonly required: true; readonly default: true }>;
701
727
  readonly company: F.Many2one<'res.company', { readonly default: true }>;
702
728
  readonly name: F.Char<{ readonly required: true }>;
729
+ readonly image: F.Many2one<'storage.attachment'>;
730
+ readonly tags: F.Many2many<'res.partner.tag', { readonly required: true }>;
731
+ readonly latitude: F.Decimal;
732
+ readonly longitude: F.Decimal;
703
733
  readonly isCompany: F.Bool<{ readonly required: true; readonly default: true }>;
704
734
  readonly parent: F.Many2one<'res.partner'>;
705
735
  readonly contacts: F.One2many<'res.partner', { readonly required: true }>;
@@ -725,6 +755,25 @@ export interface ResPartner {
725
755
  export interface ResPartnerMethods extends F.Methods<typeof import('../../contacts/index.js').contactsShutro, 'res.partner'> {
726
756
  }
727
757
 
758
+ /** `res.partner.tag` (owner: contacts). */
759
+ export interface ResPartnerTag {
760
+ readonly name: 'res.partner.tag';
761
+ readonly fields: {
762
+ readonly id: F.Id<'res.partner.tag'>;
763
+ readonly createdAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
764
+ readonly updatedAt: F.Datetime<{ readonly required: true; readonly readonly: true }>;
765
+ readonly createdBy: F.Many2one<'res.users', { readonly readonly: true }>;
766
+ readonly updatedBy: F.Many2one<'res.users', { readonly readonly: true }>;
767
+ readonly displayName: F.Char<{ readonly required: true; readonly readonly: true; readonly compute: true }>;
768
+ readonly name: F.Char<{ readonly required: true }>;
769
+ };
770
+ readonly methods: ResPartnerTagMethods;
771
+ }
772
+
773
+ /** Methods of `res.partner.tag`: declared ones and transitions. */
774
+ export interface ResPartnerTagMethods extends F.Methods<typeof import('../../contacts/index.js').contactsShutro, 'res.partner.tag'> {
775
+ }
776
+
728
777
  /** `res.users` (owner: base). */
729
778
  export interface ResUsers {
730
779
  readonly name: 'res.users';
@@ -770,6 +819,8 @@ export interface StorageAttachment {
770
819
  readonly key: F.Char<{ readonly required: true }>;
771
820
  readonly resModel: F.Char<{ readonly required: true }>;
772
821
  readonly resId: F.Integer<{ readonly required: true }>;
822
+ readonly variantOf: F.Many2one<'storage.attachment'>;
823
+ readonly width: F.Integer;
773
824
  };
774
825
  readonly methods: StorageAttachmentMethods;
775
826
  }