opt ai通行证
8
ai_saas_client/__init__.py
Normal file
@@ -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
|
||||
80
ai_saas_client/__manifest__.py
Normal file
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# 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,
|
||||
}
|
||||
3
ai_saas_client/controllers/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# from . import main
|
||||
25
ai_saas_client/controllers/main.py
Normal file
@@ -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/<string:lang>', 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/<model("default.default"):obj>/', auth='public')
|
||||
# def object(self, obj, **kw):
|
||||
# return http.request.render('default.object', {
|
||||
# 'object': obj
|
||||
# })
|
||||
24
ai_saas_client/data/auth_oauth_data.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<record id="provider_ai_saas" model="auth.oauth.provider">
|
||||
<field name="name">Ai Passport of odooai.cn</field>
|
||||
<field name="body">Ai Passport SSO</field>
|
||||
<field name="auth_endpoint">https://www.odooai.cn/oauth/authorize</field>
|
||||
<field name="code_endpoint">https://www.odooai.cn/oauth/token</field>
|
||||
<field name="scope">profile</field>
|
||||
<field name="validation_endpoint">https://www.odooai.cn/oauth/profile</field>
|
||||
<field name="data_endpoint"></field>
|
||||
<field name="css_class">fa fa-2x fa-fw fa-sign-in text-primary</field>
|
||||
<field name="body">Log in with Ai Passport</field>
|
||||
<field name="enabled" eval="True"/>
|
||||
</record>
|
||||
<!-- Use database uuid as client_id for OpenERP oauth provider -->
|
||||
<function model="auth.oauth.provider" name="write">
|
||||
<value eval="[ref('ai_saas_client.provider_ai_saas')]"/>
|
||||
<value model="ir.config_parameter" eval="{
|
||||
'client_id': obj().env['ir.config_parameter'].get_param('database.uuid'),
|
||||
}"/>
|
||||
</function>
|
||||
</data>
|
||||
</odoo>
|
||||
2
ai_saas_client/i18n/README.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Please follow this tutorial for more guides:
|
||||
https://www.odoo.com/documentation/master/developer/misc/i18n/translations.html
|
||||
48
ai_saas_client/i18n/zh_CN.po
Normal file
@@ -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 "<strong>Save</strong> to Install Chinese PO App if downloaded."
|
||||
msgstr "<strong>保存</strong> 后即可安装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"
|
||||
5
ai_saas_client/models/__init__.py
Normal file
@@ -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
|
||||
14
ai_saas_client/models/auth_oauth_provider.py
Normal file
@@ -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.')
|
||||
14
ai_saas_client/models/res_config_settings.py
Normal file
@@ -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超管")
|
||||
5
ai_saas_client/report/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
# from . import model_new_report
|
||||
|
||||
41
ai_saas_client/security/app_security.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<!-- Create new App security category, 创建应用 -->
|
||||
<record model="ir.module.category" id="app_module_category_1">
|
||||
<field name="name">App...</field>
|
||||
<field name="description">Helps you manage your ...</field>
|
||||
<field name="sequence">8</field>
|
||||
</record>
|
||||
<!-- Cretate new App security group, 权限组 -->
|
||||
<!-- User group, 普通用记 -->
|
||||
<record id="group_app_user" model="res.groups">
|
||||
<field name="name">App User</field>
|
||||
<field name="category_id" ref="app_module_category_1"/>
|
||||
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||
<field name="comment">The user will be able to ...</field>
|
||||
</record>
|
||||
|
||||
<!-- Admin group,管理员,可以配置 -->
|
||||
<record id="group_app_admin" model="res.groups">
|
||||
<field name="name">App Admin</field>
|
||||
<field name="category_id" ref="app_module_category_1"/>
|
||||
<field name="implied_ids" eval="[(4, ref('group_app_user'))]"/>
|
||||
<field name="comment">The user will be able to config ...</field>
|
||||
</record>
|
||||
|
||||
<!-- Auto set erp admin full access,group_erp_manager自动有完整权限 -->
|
||||
<record id="base.group_erp_manager" model="res.groups">
|
||||
<field name="implied_ids" eval="[(4, ref('group_app_admin'))]"/>
|
||||
</record>
|
||||
|
||||
<!-- IR Rules, user can only see my record,记录集权限,用户只能见到自已的记录 -->
|
||||
<!-- <record id="rule_user" model="ir.rule">-->
|
||||
<!-- <field name="name">Users are allowed to access their own record</field>-->
|
||||
<!-- <field name="model_id" ref="model_app_order"/>-->
|
||||
<!-- <field name="domain_force">['|', ('partner_id', 'in', [user.partner_id.id]), ('user_id.id', '=', user.id)]</field>-->
|
||||
<!-- <field name="groups" eval="[(4, ref('base.group_user'))]"/>-->
|
||||
<!-- </record>-->
|
||||
<!--End -->
|
||||
</data>
|
||||
</odoo>
|
||||
3
ai_saas_client/security/ir.model.access.csv
Normal file
@@ -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
|
||||
|
BIN
ai_saas_client/static/description/banner.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
ai_saas_client/static/description/banner1.png
Normal file
|
After Width: | Height: | Size: 213 KiB |
BIN
ai_saas_client/static/description/demo1.jpg
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
ai_saas_client/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
94
ai_saas_client/static/description/index.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
# Copyright (C) 2009~2024 odooAi.cn
|
||||
##############################################################################
|
||||
-->
|
||||
<html>
|
||||
<!-- begin title-->
|
||||
<section class="oe_container container o_cc o_cc2">
|
||||
<h2 class="text-center bg-warning text-white pt24 pb24">odooapp.cn SaaS Client.Odoo中文应用商店SaaS云服务客户端</h2>
|
||||
<h3 class="text-center">快速访问Odoo中文应用商店并获取独享Odoo中文通行码</h3>
|
||||
<h4 class="text-center">一键获取最新应用信息,最新行业服务包,一键获取Odoo中文翻译更新,快速获取Odoo服务,Odoo升级评估</h4>
|
||||
</section>
|
||||
<!-- end title-->
|
||||
|
||||
<!-- quick demo-->
|
||||
<section class="oe_container container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<h2 class="bg-warning text-center pt8 pb8 mt16 mb16">启用后快速获取Odoo中文应用商店模块及行业方案</h2>
|
||||
<h4 class="oe_slogan">未经用户明确同意,本应用不会获取任何用户系统数据</h4>
|
||||
<p class="">相关内容,请参考用户协议及我们的隐私政策:</p>
|
||||
<p> https://www.odooapp.cn/conditions</p>
|
||||
<p> https://www.odooapp.cn/privacy-policy</p>
|
||||
<div class="oe_demo oe_screenshot img img-fluid">
|
||||
<img src="demo1.jpg"/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- end quick demo-->
|
||||
|
||||
<!-- begin howto-->
|
||||
<section class="oe_container container s_text_block o_colored_level pt16 pb16">
|
||||
<h2 class="text-center bg-info text-white pt16 pb16">- How to setup and use -</h2>
|
||||
<h3>This app need no extra module. The price already included</h3>
|
||||
</section>
|
||||
<section class="oe_container container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<h4 class="pt16">
|
||||
1. Buy and Install
|
||||
</h4>
|
||||
<h4 class="pt16">
|
||||
2. Read the app description for user guide
|
||||
</h4>
|
||||
<h4 class="pt16">
|
||||
3. Enjoy and easy use
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="oe_demo oe_screenshot img img-fluid">
|
||||
<img src="banner.png">
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="pt16">4. More information in our FAQ</h4>
|
||||
<div class="row">
|
||||
https://www.odooai.cn/faq
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- end howto-->
|
||||
|
||||
<!-- begin upsell-->
|
||||
<!-- end upsell-->
|
||||
|
||||
<!-- begin support-->
|
||||
<section class="container oe_dark">
|
||||
<div class="oe_row oe_spaced text-center">
|
||||
<div class="row">
|
||||
<h2 class="oe_slogan">Technical Help & Support</h2>
|
||||
</div>
|
||||
<div class="col-md-12 pad0">
|
||||
<div class="oe_mt16">
|
||||
<p><h4 class="pt16">
|
||||
For any type of technical help & support requests, Feel free to contact us</h4></p>
|
||||
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
||||
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:odoo@china.com"><span
|
||||
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||
<i class="fa fa-envelope"></i> odoo@china.com</a>
|
||||
<p><h4 class="pt16">
|
||||
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
|
||||
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
||||
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
|
||||
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||
<i class="fa fa-envelope"></i> 300883@qq.com</a>
|
||||
</div>
|
||||
<div class="oe_mt16">
|
||||
<h4 class="pt16">Visit our website for more support.</h4>
|
||||
<h4 class="pt16">https://www.odooai.cn</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- end support-->
|
||||
</html>
|
||||
BIN
ai_saas_client/static/description/qr.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
ai_saas_client/static/img/icon_odooai.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
ai_saas_client/static/img/icon_odooapp.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
ai_saas_client/static/img/logo_odooai.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
0
ai_saas_client/static/src/js/odooai.cn
Normal file
0
ai_saas_client/static/src/scss/odooai.cn
Normal file
3
ai_saas_client/static/src/scss/style.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
// scss sample
|
||||
|
||||
|
||||
0
ai_saas_client/static/src/xml/odooai.cn
Normal file
28
ai_saas_client/views/res_config_settings_views.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- <record id="app_res_config_settings_view_form" model="ir.ui.view">-->
|
||||
<!-- <field name="name">res.config.settings.view.form.inherit.app_common</field>-->
|
||||
<!-- <field name="model">res.config.settings</field>-->
|
||||
<!-- <field name="inherit_id" ref="base.res_config_settings_view_form"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//setting[@id='odooai_cloud_saas_ok']" position="after">-->
|
||||
<!-- <setting string="SaaS Chinese PO" help="Checked to Sync Odoo Chinese from www.odooapp.cn" id="module_app_cn_po">-->
|
||||
<!-- <field name="module_app_cn_po"/>-->
|
||||
<!-- <div class="content-group mt16" invisible="not module_app_cn_po" id="msg_module_app_cn_po">-->
|
||||
<!-- <div class="mt16 text-warning">-->
|
||||
<!-- <strong>Save</strong> to Install Chinese PO App if downloaded.-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="text-warning">-->
|
||||
<!-- Or get the app from-->
|
||||
<!-- <a href="https://www.odooapp.cn/apps/modules/app_cn_po" class="o_doc_link ml8"-->
|
||||
<!-- target="_blank">https://www.odooapp.cn/apps/modules/app_cn_po-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </setting>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
</data>
|
||||
</odoo>
|
||||