diff --git a/ai_saas_client/__init__.py b/ai_saas_client/__init__.py new file mode 100644 index 00000000..246bc10e --- /dev/null +++ b/ai_saas_client/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- + +# please comment follow for produce +from . import models +from . import report +from . import controllers + +# hook form install and uninstall diff --git a/ai_saas_client/__manifest__.py b/ai_saas_client/__manifest__.py new file mode 100644 index 00000000..0b2899fe --- /dev/null +++ b/ai_saas_client/__manifest__.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- + +# Created on 2023-10-06 +# author: 欧度智能,https://www.odooai.cn +# email: 300883@qq.com +# Copyright (C) 2009~2024 odooAi.cn + +# Odoo16在线用户手册(长期更新) +# https://www.odooai.cn/documentation/16.0/zh_CN/index.html + +# Odoo16在线开发者手册(长期更新) +# https://www.odooai.cn/documentation/16.0/zh_CN/developer.html + +# 行业应用说明,应该是带 Industry 的就会放入 + +############################################################################## +# Copyright (C) 2009-TODAY odooAi.cn Ltd. https://www.odooai.cn +# Author: Ivan Deng,300883@qq.com +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# See . +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +############################################################################## + +{ + 'name': 'Ai SaaS Client of odooai.cn.欧度智能云客户端应用,适用于云端用户', + 'version': '16.24.11.24', + 'author': 'odooai.cn', + 'category': 'Base', + 'website': 'https://www.odooai.cn', + 'live_test_url': 'https://demo.odooapp.cn', + 'license': 'OPL-1', + 'sequence': 2, + 'price': 0.00, + 'currency': 'EUR', + 'images': ['static/description/banner.png'], + 'summary': ''' + Odoo智能云服务客户端,模块持续更新中。 + 使用Ai通行证管理本实例 + 支持Odoo中文版在线更新及 www.odooapp.cn 的信息推送等。 + 安装即代表同意我司云服务用户协议及隐私政策。 https://www.odooapp.cn/conditions + ''', + 'description': ''' + 1. 快速访问Odoo中文应用商店并获取独享Odoo中文通行码 + 2. 一键获取最新应用信息,最新行业服务包 + 3. 一键获取Odoo中文翻译更新 + 4. 快速获取Odoo服务,Odoo升级评估 + 11.多语言支持,多公司支持 + 12.仅从Odoo18企业版,社区版版本开始支持 + 13.代码完全开源 + ''', + 'depends': [ + 'auth_oauth', + 'app_saas', + # 'website', + ], + 'data': [ + 'data/auth_oauth_data.xml', + ], + 'assets': { + 'web.assets_frontend': [ + # 'app_/static/src/scss/style.scss', + ], + 'web.assets_backend': [ + # 'app_/static/src/js/*.js', + ], + }, + 'demo': [ + # 'data/model_new_demo.xml', + # 'views/website_templates.xml', + ], + # 'pre_init_hook': 'pre_init_hook', + # 'post_init_hook': 'post_init_hook', + # 'uninstall_hook': 'uninstall_hook', + 'installable': True, + 'application': True, + 'auto_install': False, +} diff --git a/ai_saas_client/controllers/__init__.py b/ai_saas_client/controllers/__init__.py new file mode 100644 index 00000000..83118e09 --- /dev/null +++ b/ai_saas_client/controllers/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +# from . import main diff --git a/ai_saas_client/controllers/main.py b/ai_saas_client/controllers/main.py new file mode 100644 index 00000000..1e0963f0 --- /dev/null +++ b/ai_saas_client/controllers/main.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# +# from odoo import http +# from odoo.addons.portal.controllers.portal import CustomerPortal +# +# +# class appCustomerPortal(CustomerPortal): +# +# # Controler sample +# @http.route('/my/webclient/locale/', type='http', auth="none") +# def index(self, **kw): +# return "Hello, world" +# +# @http.route('/default/default/objects/', auth='public') +# def list(self, **kw): +# return http.request.render('default.listing', { +# 'root': '/default/default', +# 'objects': http.request.env['default.default'].search([]), +# }) +# +# @http.route('/default/default/objects//', auth='public') +# def object(self, obj, **kw): +# return http.request.render('default.object', { +# 'object': obj +# }) diff --git a/ai_saas_client/data/auth_oauth_data.xml b/ai_saas_client/data/auth_oauth_data.xml new file mode 100644 index 00000000..44043234 --- /dev/null +++ b/ai_saas_client/data/auth_oauth_data.xml @@ -0,0 +1,24 @@ + + + + + Ai Passport of odooai.cn + Ai Passport SSO + https://www.odooai.cn/oauth/authorize + https://www.odooai.cn/oauth/token + profile + https://www.odooai.cn/oauth/profile + + fa fa-2x fa-fw fa-sign-in text-primary + Log in with Ai Passport + + + + + + + + + diff --git a/ai_saas_client/i18n/README.txt b/ai_saas_client/i18n/README.txt new file mode 100644 index 00000000..222b84cd --- /dev/null +++ b/ai_saas_client/i18n/README.txt @@ -0,0 +1,2 @@ +Please follow this tutorial for more guides: +https://www.odoo.com/documentation/master/developer/misc/i18n/translations.html \ No newline at end of file diff --git a/ai_saas_client/i18n/zh_CN.po b/ai_saas_client/i18n/zh_CN.po new file mode 100644 index 00000000..51835a3a --- /dev/null +++ b/ai_saas_client/i18n/zh_CN.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * app_saas +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0+e-20241031\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-08 10:21+0000\n" +"PO-Revision-Date: 2024-11-08 10:21+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: app_saas +#: model_terms:ir.ui.view,arch_db:app_saas.app_res_config_settings_view_form +msgid "Save to Install Chinese PO App if downloaded." +msgstr "保存 后即可安装Odoo中文云翻译模块。本模块可至Odoo中文应用商店下载。" + +#. module: app_saas +#: model:ir.model.fields,help:app_saas.field_res_config_settings__module_app_cn_po +#: model_terms:ir.ui.view,arch_db:app_saas.app_res_config_settings_view_form +msgid "Checked to Sync Odoo Chinese from www.odooapp.cn" +msgstr "勾选后即可启用Odoo中文云翻译,相关服务由 www.odooapp.cn 提供" + +#. module: app_saas +#: model:ir.model,name:app_saas.model_res_config_settings +msgid "Config Settings" +msgstr "设置" + +#. module: app_saas +#: model_terms:ir.ui.view,arch_db:app_saas.app_res_config_settings_view_form +msgid "Or get the app from" +msgstr "您可以在此获取本应用模块" + +#. module: app_saas +#: model:ir.model.fields,field_description:app_saas.field_res_config_settings__module_app_cn_po +#: model_terms:ir.ui.view,arch_db:app_saas.app_res_config_settings_view_form +msgid "SaaS Chinese PO" +msgstr "中文云翻译PO" + +#. module: app_saas +#: model_terms:ir.ui.view,arch_db:app_saas.app_res_config_settings_view_form +msgid "https://www.odooapp.cn/apps/modules/app_cn_po" +msgstr "https://www.odooapp.cn/apps/modules/app_cn_po" diff --git a/ai_saas_client/models/__init__.py b/ai_saas_client/models/__init__.py new file mode 100644 index 00000000..427b1732 --- /dev/null +++ b/ai_saas_client/models/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Part of odooAi.cn. See LICENSE file for full copyright and licensing details. + +from . import auth_oauth_provider +from . import res_config_settings diff --git a/ai_saas_client/models/auth_oauth_provider.py b/ai_saas_client/models/auth_oauth_provider.py new file mode 100644 index 00000000..062608d1 --- /dev/null +++ b/ai_saas_client/models/auth_oauth_provider.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, modules, tools, _ + +import base64 +from datetime import timedelta + +class AuthOAuthProvider(models.Model): + + _inherit = 'auth.oauth.provider' + _order = 'sequence, name' + + # 取code的url,主要针对国内的先取code,再拿Token的方式 + code_endpoint = fields.Char(string='Token by Code Endpoint', help='Get Token from Code. Only for Code response type.') diff --git a/ai_saas_client/models/res_config_settings.py b/ai_saas_client/models/res_config_settings.py new file mode 100644 index 00000000..8d3fab9c --- /dev/null +++ b/ai_saas_client/models/res_config_settings.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +import logging + +from odoo import api, fields, models, _ +from odoo.exceptions import UserError, ValidationError + +_logger = logging.getLogger(__name__) + + +class ResConfigSettings(models.TransientModel): + _inherit = 'res.config.settings' + + ai_passport_root_user = fields.Many2one('res.users', string='Ai Passport Admin', help="Ai通行证用户绑定的本Odoo超管") diff --git a/ai_saas_client/report/__init__.py b/ai_saas_client/report/__init__.py new file mode 100644 index 00000000..1735152f --- /dev/null +++ b/ai_saas_client/report/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +# from . import model_new_report + diff --git a/ai_saas_client/security/app_security.xml b/ai_saas_client/security/app_security.xml new file mode 100644 index 00000000..99b55a21 --- /dev/null +++ b/ai_saas_client/security/app_security.xml @@ -0,0 +1,41 @@ + + + + + + App... + Helps you manage your ... + 8 + + + + + App User + + + The user will be able to ... + + + + + App Admin + + + The user will be able to config ... + + + + + + + + + + + + + + + + + diff --git a/ai_saas_client/security/ir.model.access.csv b/ai_saas_client/security/ir.model.access.csv new file mode 100644 index 00000000..fc156047 --- /dev/null +++ b/ai_saas_client/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_model_new,access_model_new,model_model_new,base.group_user,1,1,1,1 +access_model_new_report,access_model_new_report,model_model_new_report,base.group_user,1,1,1,1 diff --git a/ai_saas_client/static/description/banner.png b/ai_saas_client/static/description/banner.png new file mode 100644 index 00000000..db48c7e8 Binary files /dev/null and b/ai_saas_client/static/description/banner.png differ diff --git a/ai_saas_client/static/description/banner1.png b/ai_saas_client/static/description/banner1.png new file mode 100644 index 00000000..08b91f6c Binary files /dev/null and b/ai_saas_client/static/description/banner1.png differ diff --git a/ai_saas_client/static/description/demo1.jpg b/ai_saas_client/static/description/demo1.jpg new file mode 100644 index 00000000..f53cf780 Binary files /dev/null and b/ai_saas_client/static/description/demo1.jpg differ diff --git a/ai_saas_client/static/description/icon.png b/ai_saas_client/static/description/icon.png new file mode 100644 index 00000000..8c7b0fbb Binary files /dev/null and b/ai_saas_client/static/description/icon.png differ diff --git a/ai_saas_client/static/description/index.html b/ai_saas_client/static/description/index.html new file mode 100644 index 00000000..15f7d1e3 --- /dev/null +++ b/ai_saas_client/static/description/index.html @@ -0,0 +1,94 @@ + + + + +
+

odooapp.cn SaaS Client.Odoo中文应用商店SaaS云服务客户端

+

快速访问Odoo中文应用商店并获取独享Odoo中文通行码

+

一键获取最新应用信息,最新行业服务包,一键获取Odoo中文翻译更新,快速获取Odoo服务,Odoo升级评估

+
+ + + +
+
+

启用后快速获取Odoo中文应用商店模块及行业方案

+

未经用户明确同意,本应用不会获取任何用户系统数据

+

相关内容,请参考用户协议及我们的隐私政策:

+

https://www.odooapp.cn/conditions

+

https://www.odooapp.cn/privacy-policy

+
+ +
+
+
+ + + + +
+

- How to setup and use -

+

This app need no extra module. The price already included

+
+
+
+

+ 1. Buy and Install +

+

+ 2. Read the app description for user guide +

+

+ 3. Enjoy and easy use +

+
+
+ +
+
+

4. More information in our FAQ

+
+ https://www.odooai.cn/faq +
+
+
+ + + + + + +
+
+
+

Technical Help & Support

+
+
+
+

+ For any type of technical help & support requests, Feel free to contact us

+ + odoo@china.com +

+ Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)

+ + 300883@qq.com +
+
+

Visit our website for more support.

+

https://www.odooai.cn

+
+
+
+
+ + \ No newline at end of file diff --git a/ai_saas_client/static/description/qr.png b/ai_saas_client/static/description/qr.png new file mode 100644 index 00000000..b7433fc9 Binary files /dev/null and b/ai_saas_client/static/description/qr.png differ diff --git a/ai_saas_client/static/img/icon_odooai.png b/ai_saas_client/static/img/icon_odooai.png new file mode 100644 index 00000000..a022f8d0 Binary files /dev/null and b/ai_saas_client/static/img/icon_odooai.png differ diff --git a/ai_saas_client/static/img/icon_odooapp.png b/ai_saas_client/static/img/icon_odooapp.png new file mode 100644 index 00000000..775a12ee Binary files /dev/null and b/ai_saas_client/static/img/icon_odooapp.png differ diff --git a/ai_saas_client/static/img/logo_odooai.png b/ai_saas_client/static/img/logo_odooai.png new file mode 100644 index 00000000..482f2a50 Binary files /dev/null and b/ai_saas_client/static/img/logo_odooai.png differ diff --git a/ai_saas_client/static/src/js/odooai.cn b/ai_saas_client/static/src/js/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/ai_saas_client/static/src/scss/odooai.cn b/ai_saas_client/static/src/scss/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/ai_saas_client/static/src/scss/style.scss b/ai_saas_client/static/src/scss/style.scss new file mode 100644 index 00000000..210b0a1e --- /dev/null +++ b/ai_saas_client/static/src/scss/style.scss @@ -0,0 +1,3 @@ +// scss sample + + diff --git a/ai_saas_client/static/src/xml/odooai.cn b/ai_saas_client/static/src/xml/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/ai_saas_client/views/res_config_settings_views.xml b/ai_saas_client/views/res_config_settings_views.xml new file mode 100644 index 00000000..1d9d03d2 --- /dev/null +++ b/ai_saas_client/views/res_config_settings_views.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ai_saas_client/wizard/odooai.cn b/ai_saas_client/wizard/odooai.cn new file mode 100644 index 00000000..e69de29b