1 Star 0 Fork 45

supsys / odoojs

forked from odoowww / odoojs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
LGPL-3.0

联系我们

  1. QQ 群 2684913
  2. odoojs@outlook.com
  3. 微信号 winboy99 醉桥. 添加时, 请注明 odoojs
  4. 北京醉桥 负责维护 odoojs 的所有代码
  5. 欢迎有志于 odoo 前后端分离项目的 个人/团队, 共同维护 odoojs
  6. odoojs 团队提供 odoojs 前后端分离 解决方案付费培训服务, 请加入 qq 群, 联系群群管理员

最近更新 2023-11-17

  1. odoojs-rpc 支持 odoo17. 并向下兼容 odoo16. 经测试 支持 odoo13

odoojs 介绍

  1. odoojs 是 odoo 前后端分离解决方案
  2. odoojs 以 odoo 为服务端. 全新实现独立的前端
  3. 核心 node package: odoojs-rpc, odoojs-api
  4. 不限前端架构. 如 vue, react
  5. 不限前端 ui 库. 如 ant-design-vue, uni-uview-plus
  6. 支持多语言.

odoojs 需要您的支持

  1. 投资 odoojs, 建立核心管理团队. 长期服务于 odoo 前后端分离解决方案, 以及中国本地化 erp 的研发.
  2. 邀请 odoojs 成为您的技术合作伙伴. 由 odoojs 为您的 ERP 产品提供技术服务.
  3. 使用 odoojs demo 源码. 直接给 odoojs 的作者"醉桥"发红包.
  4. 参加 odoojs 茶馆活动. 一起参与 odoojs 的发展. 仅付点茶水费即可.
  5. odoojs 邀请您成为 odoojs 的合作伙伴. 共同完善 odoojs demo 代码.
  6. odoojs 目前需要一位资深前端专家的帮助. 评估现有 odoojs 的技术架构.
  7. odoojs 需要一位合作者, 建立和发展 odoojs 社区.

odoojs 发展路线

  1. 建立 odoojs 开源服务模式. 逐步形成 odoojs 社区
  2. 形成中国本地化 ERP 产品.
  3. 逐步探索 DIY(Do It Yourself)开发方式, 形成 DIY ERP 的低代码开发模式.
  4. 依托 odoojs 社区. 建立对 odoo 开发团队, odoo 末端用户的服务培训模式

odoojs 的现状(2023-10-30)

  1. odoojs 由醉桥维护. 微信号 winboy99. 邮箱 odoojs@outlook.com
  2. 目前国内有几个团队在使用 odoojs 解决方案.
  3. odoojs 得到同行的认可.
  4. bilibili 搜索 "醉桥 odoo odoojs" 可获得相关的视频

odoojs 适用场景

  1. odoo 实施服务团队, 基于官方 odoo 功能, 为客户提供标准化服务. 使用 odoojs 自定义前端部署, 适配客户个性化前端需求.
  2. odoo 实施开发团队, 开发自己的 ERP 产品, 使用 odoojs 前后端分离解决方案. 去 odoo 化, 形成独立的产品.
  3. 末端用户, 使用 odoo 为自己公司建立服务平台. 自行组建技术队伍. 使用 odoojs 前后端分离解决方案, 优化技术路线, 迭代式开发, 随需而动, 满足个性化业务场景.
  4. 跨平台, 多系统集成. odoo 只是一个子业务系统. 使用 odoojs 作为集成 odoo 的桥梁.
  5. 基于 odoo 做业务管理. 使用 odoojs 扩展搭建 业务分析平台. 扩展 BI 等前端应用.
  6. 基于 odoo 做业务管理. 使用 odoojs 扩展移动端应用.

odoojs 发展历史

  1. 第一阶段. 独立搭建 web 服务, 与 odoo 通过 xmlrpc 通讯. 自定义 ui 界面.
  2. 第二阶段. 使用 odoo 已有的 web 服务. 扩展 对外接口. 自定义 ui 界面.
  3. 第三阶段. 使用 odoo 已有的 web 服务. 使用 odoo 已有对外 jsonrpc 接口. 前端获取 odoo 的所有 menu/action/view, 进行解析渲染.
  4. 第四阶段. 扬弃官方 odoo 在服务端定义 menu/action/view 的设计思路. 在前端定义所有的 menu/action/view. 官方的 menu/action/view, 与业务数据的耦合性太高. 不符合前后端分离的设计思想. 在前端定义 menu/action/view. 这样, 官方 odoo 成为一个独立的业务数据服务. 而前端, 完全自主设计一切 ui/ue 要素. 这个阶段, 前后端分离解决方案, 正式形成. 并命名为 odoojs 前后端分离架构.
  5. 第五阶段. 整理前端代码. 形成 odoojs-rpc, odoojs-api 两个标准模块. 并标准化前端 demo 项目的结构. odoojs-rpc 负责与 odoo 的数据接口交互, 以及编辑页面临时数据的暂存. odoojs-api 负责管理所有的 menu/action/view, 多语言翻译. 以及 addons 的管理. 前端 demo 项目中, 形成适配 odoo 的标准组件.
  6. 至此, odoojs 前后端分离解决方案, 成型.

demo project

  1. 以下几个 demo, 演示如何使用 odoojs
  2. 文件夹 /demo-project/odoojs-demo-vue-antd-v1 2023-11-17. 该项目不再维护. 仅暂时保留于此. 用于 查找旧代码. 向新项目中移植
  3. 以下三个 demo 项目, 可以参考
  4. odoojs demo PC 端 使用: vue3, Vite, antdv
  5. odoojs demo 移动端 使用: vue3, Vite, uniapp, uview-plus
  6. odoojs demo 仅使用 odoojs-rpc 使用: vue3, Vite, uniapp, uview-plus
  7. 以下两个测试脚本, 演示如何调用 odoojs-rpc 及 odoojs-api
  8. 文件夹 /demo-project/test-odoojs-rpc
  9. 文件夹 /demo-project/test-odoojs-api

odoojs demo 项目 日常维护内容

  1. 跟进官方 odoo 的迭代升级. 更新 odoojs-rpc, odoojs-api 两个标准模块.
  2. 完善 demo 项目中的标准组件.
  3. 逐步复刻 官方 odoo. 形成可交付的 产品.

odoojs 技术原理

技术路线

  1. odoo 官方源码做服务端
  2. odoojs 实现前后端分离
  3. odoojs 前端 暂时选择 vue 架构. 但不限. 可以选择 react
  4. odoojs 前端 暂时选择 UI 库 antd-vue. 但不限. 可选择其他常用的 UI 库
  5. odoojs 完全支持 移动 web 端. 只需选择适用的 UI 库即可
  6. odoojs 完全支持 移动端 app. 只需直接使用 odoojs-rpc 做 服务端访问接口即可
  7. odoojs 完全支持小程序等特定的客户端. 只需要使用 小程序专用的组件即可

odoojs 流程

  1. odoojs 前端程序, 启动后, 首先加载所有自定义的 menu, action, view.
  2. 渲染 menu.
  3. 在一个 menu 选中后, 获取到对应的 action.
  4. 根据 action, 获取 相应的 tree view 或者 form view.
  5. 根据 view, 获取对应的 model, fields. 以及 html 要素.
  6. 根据 model, fields 从 odoo 服务端获取数据.
  7. 获取到的数据, 在 view 中, 各 field 自行使用相应组件进行渲染显示.
  8. view 中的 field, 支持 readonly, visible, required, domain 等属性.

odoojs 编辑页面的流程

  1. 需要编辑数据时, 将 view 设置为编辑状态.
  2. 在编辑状态下, 创建一个 editmodel.
  3. editmodel 由 odoojs-rpc 进行管理, 在前端页面中无需额外关心.
  4. 该 editmodel 管理所有的编辑中的数据.
  5. view 中某个字段 field 编辑后, 触发 onchange.
  6. onchange 在 editmodel 中进行排队. 以确保 onchange 顺序依次触发.
  7. onchange 访问 odoo 服务端, 获取数据. 更新到 editmodel. 并返回到 view.
  8. view 渲染数据.
  9. view 编辑完成, 触发 commit.
  10. commit 与 onchang 一样 在 editmodel 中排队.
  11. commit 访问 odoo 服务端, 发送 create or write 请求, 更新数据到服务端.
  12. commit 之后, 销毁 editmodel, view 回到只读状态.
  13. view 发送 read 请求, 重新获取数据, 并渲染到 view 中.

odoojs one2many 字段的处理

  1. main view 渲染显示数据.
  2. main view 中, 各 field 由相应的 field 组件进行渲染.
  3. one2many 字段的 sub tree view, sub form view 在 main view 中已定义
  4. main view 读取数据时, 已经嵌套获取 one2many 字段的数据
  5. one2many 字段 sub tree view 渲染数据.
  6. one2many 字段 sub form view 以弹窗方式 显示单条数据.

odoojs one2many 字段的编辑处理

  1. main view 进入编辑状态.
  2. one2many 字段 sub tree view 为编辑状态, 显示 create 按钮.
  3. pick one sub record or new sub record, 创建 sub form view.
  4. sub form view 创建 sub editmodel.
  5. sub form view 触发 onchange, 访问 odoo 服务端, 更新到 sub editmodel.
  6. sub form view 触发 commit. 销毁 sub editmodel. 更新数据到 sub tree view.
  7. sub tree view 触发 main view 的 onchage.
  8. main view 的 commit 之前, 从 sub tree view 获取 one2many 字段的数据.
  9. main view 触发 commit
GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.

简介

odoojs - odoo 前后端分离解决方案 展开 收起
NodeJS
LGPL-3.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
NodeJS
1
https://gitee.com/supsys/odoojs.git
git@gitee.com:supsys/odoojs.git
supsys
odoojs
odoojs
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891