diff --git a/app_account_superbar/static/description/index.html b/app_account_superbar/static/description/index.html index daff7a66..c0ec3984 100644 --- a/app_account_superbar/static/description/index.html +++ b/app_account_superbar/static/description/index.html @@ -270,9 +270,9 @@

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

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

- guohuadeng@hotmail.com + odoo@china.com

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

. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +############################################################################## + +{ + 'name': 'Odoo Module Sample. module app addons template sample with widget. Developer guidelines. Odoo开发规范模板', + 'version': '15.23.10.07', + 'author': 'odooai.cn', + 'category': 'Base', + 'website': 'https://www.odooai.cn', + 'live_test_url': 'https://demo.odooapp.cn', + 'license': 'OPL-1', + 'sequence': 2, + 'price': 3.00, + 'currency': 'EUR', + 'images': ['static/description/banner.gif'], + 'summary': ''' + Odoo module template. module sample with 170+ widget list. Clone this sample to your name to quick create your odoo addons. + Developer reference guides, Developer Tutorials. + Sample manifest, .py, .xml views and data. report, action, menu.. + ''', + 'description': ''' + Just Rename the sample app to your name to quick create new module. + All file follow odoo rule with comments. + Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition + Odoo Developr rule from here + https://www.odooai.cn/documentation/16.0/developer.html + 1. A full Sample module app of odoo addons. All the code, views, data ,banner, icon and description sample follow the odoo rule. + 2. Sample manifest file. Including structure and name and description etc, all field sample. Security xml and csv file for role group access rule. + Sample icon, banner, index.html, install/uninstall hooks. + Follow most odoo rule follow + https://www.odooai.cn/documentation/16.0/contributing/development/coding_guidelines.html + 3. Sample .py models file, for new model and inherit model + 4. Sample .xml views file for models, with list, kanban, form, search + 5. Sample controllers file for website data publish and api developer. including how inherit odoo portal home. + 6. Sample report design file. .py file with how sql define. .xml file for graph and pivot. + 7. Sample action and menu file. Root menu and menu group and action menu. + 8. Ui misc sample. Alert like info and special field setup. + 9. Odoo Widget sample. 170+ widget list document and Frequently Used Sample. + 10. Quick access odoo developer Tutorials online. Document online for chinese and english. Fast visit in China. + 11. Multi-language Support. Multi-Company Support. + 12. Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition. + 13. Full Open Source. + ========== 中文说明 + 1. 一个完整的odoo插件模块应用程序示例,所有代码、视图和数据都遵循odoo规则 + 2. Manifest示例清单文件。包括结构、名称和描述等所有字段样例。安全xml和csv文件用于控制访问规则 + 全部遵循odoo规则 https://www.odooai.cn/documentation/16.0/zh_CN/developer/reference/backend/module.html#reference-module-manifest + 3. .py 示例文件,包括新模型和继承模型的示例 + 4. .xml 示例视图文件,包括列表、看板、表单、搜索等 + 5. controllers 示例文件,用于门户网站对外数据发布及 api 接口开发。例子包含对 odoo portal 门户的继承处理 + 6. report报告设计文件示例。包括如何定义 sql 生成视图的.py文件,用于 graph 和 pivot的.xml文件。 + 7. action 动作 和 menu 菜单文件示例。 + 8. 特殊Ui样例,包括 Alert role 信息及特殊字段展现设置。 + 9. Odoo Widget 使用指导,包括 170+小部件清单,常用 widget 用法。 + 10.快速访问在线Odoo开发人员教程。 + 11. 多语言支持,多公司支持 + 12. Odoo 17,16,15,14,13,12, 企业版,社区版,在线SaaS.sh版,等全版本支持 + 13. 代码完全开源 + ''', + 'depends': [ + 'app_common', + 'account', + # 'website', + ], + 'data': [ + # please add your file + # please comment follow on ur produce odoo + 'security/app_security.xml', + 'security/ir.model.access.csv', + 'views/model_new_views.xml', + 'report/model_new_report_views.xml', + 'views/menu_views.xml', + # 'views/website_templates.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/app_sample/controllers/__init__.py b/app_sample/controllers/__init__.py new file mode 100644 index 00000000..83118e09 --- /dev/null +++ b/app_sample/controllers/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +# from . import main diff --git a/app_sample/controllers/main.py b/app_sample/controllers/main.py new file mode 100644 index 00000000..af262e56 --- /dev/null +++ b/app_sample/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/app_sample/data/model_new_demo.xml b/app_sample/data/model_new_demo.xml new file mode 100644 index 00000000..e2eca3bc --- /dev/null +++ b/app_sample/data/model_new_demo.xml @@ -0,0 +1,46 @@ + + + + + + demo1 + demo1 + 888 + 2023-09-13 + + 0.5 + draft + + + + demo2 + demo2 + 1600 + 2023-10-03 + + 0.6 + done + + + + demo3 + demo3 + 3000 + 2023-09-16 + + 0.3 + cancel + + + + demo4 + demo4 + 40000 + 2023-10-06 + + 0.99 + draft + + + + \ No newline at end of file diff --git a/app_sample/hooks.py b/app_sample/hooks.py new file mode 100644 index 00000000..59dde92e --- /dev/null +++ b/app_sample/hooks.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + +# Created on 2023-10-06 +# author: 欧度智能,https://www.odooai.cn +# email: 300883@qq.com +# Copyright (C) 2009~2023 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 + +from odoo import api, SUPERUSER_ID, _ + + +def pre_init_hook(cr): + pass + # cr.execute("") + + +def post_init_hook(cr, registry): + pass + # cr.execute("") + + +def uninstall_hook(cr, registry): + pass + # cr.execute("") diff --git a/app_sample/i18n/README.txt b/app_sample/i18n/README.txt new file mode 100644 index 00000000..222b84cd --- /dev/null +++ b/app_sample/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/app_sample/i18n/zh_CN.po b/app_sample/i18n/zh_CN.po new file mode 100644 index 00000000..996305bc --- /dev/null +++ b/app_sample/i18n/zh_CN.po @@ -0,0 +1,16 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * app_odooai +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e-20230320\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-30 10:30+0000\n" +"PO-Revision-Date: 2023-03-30 10:30+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" diff --git a/app_sample/models/__init__.py b/app_sample/models/__init__.py new file mode 100644 index 00000000..9abe8612 --- /dev/null +++ b/app_sample/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 product_template +from . import model_new diff --git a/app_sample/models/model_new.py b/app_sample/models/model_new.py new file mode 100644 index 00000000..15971e06 --- /dev/null +++ b/app_sample/models/model_new.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# 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. + +# Create on 2023-10-06 +############################################################################## + +from odoo import models, fields, api, _ +from odoo.tools.translate import html_translate + +from datetime import datetime, timedelta +import logging +_logger = logging.getLogger(__name__) + + +# Template for model New +class ModelNew(models.Model): + + _name = 'model.new' + _rec_name = 'name' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = 'Model New' + _order = 'sequence,name' + + # Base field + name = fields.Char(string='Name', translate=True, required=True, readonly=False, copy=True) + ref = fields.Char(string='Reference', required=True, readonly=False, copy=False, index=True) + image = fields.Binary(string="Image") + amount = fields.Float(string="Amount", digits="Product Price") + note = fields.Text(string='Note', readonly=False, copy=True) + website_description = fields.Html( + 'Description for the website', translate=html_translate, + sanitize_overridable=True, + sanitize_attributes=False, sanitize_form=False) + date = fields.Datetime(string="Date", default=lambda self: fields.Datetime.now()) + + # Relation field + partner_ids = fields.Many2many(comodel_name="res.partner", + relation="model_new_res_partner_rel", + column1="new_id", column2="partner_id", + string="many2many_tags_avatar") + + partner_count = fields.Integer(string="#Partner", compute='_compute_partner_count', store=True) + + # product_ids = fields.One2many(comodel_name="product.product", + # inverse_name="model_new_id", + # string="Model New") + + user_id = fields.Many2one('res.users', string='many2one_avatar_user', + required=False, index=True, default=lambda self: self.env.user) + company_id = fields.Many2one('res.company', string='Company', + required=False, index=True, default=lambda self: self.env.company) + + # Extra field + color = fields.Integer(string='Color Index') + sequence = fields.Integer('Sequence', default=99, help="Determine the display order") + active = fields.Boolean(string="Active", default=True) + state = fields.Selection(string="State", selection=[ + ('draft', 'Draft'), + ('done', 'Done'), + ('cancel', "Cancelled"), + ], default='draft', required=False) + + # begin widget + # char, text, html + w_phone = fields.Char(string='phone', default='13925100000') + w_email = fields.Char(string='email', default='info@example.com') + w_image_url = fields.Char(string='image_url', default='https://www.odooai.cn/web/image/website/1/logo') + w_url = fields.Char(string='url', default='https://www.odooai.cn') + w_CopyClipboardURL = fields.Char(string='CopyClipboardURL', default='https://www.odooai.cn') + w_CopyClipboardChar = fields.Char(string='CopyClipboardChar', default='https://www.odooai.cn') + w_CopyClipboardText = fields.Char(string='CopyClipboardText', default='https://www.odooai.cn') + + # int + date_end = fields.Datetime(string="Date End", default=lambda self: fields.Datetime.now() + timedelta(days=30)) + day_max = fields.Integer(string="Left Days Max", default=100) + w_gauge = fields.Integer( + 'gauge', compute='_compute_gauge', + help='Left date to date end,剩下的天数') + w_progressbar = fields.Float(string='progressbar') + + # float + w_percentpie = fields.Float(string='percentpie', related='w_progressbar') + w_percentage = fields.Float(string='percentage') + + # selection + w_status_with_color = fields.Selection(string="status_with_color", selection=[ + ('color1', 'Color1'), + ('color2', 'Color2'), + ('color3', "Color3"), + ], default='color1', required=False) + w_color_s = fields.Integer(string='status_with_color Color Index') + + # m2o + w_selection_badge = fields.Many2one('res.partner', string='selection_badge') + + # m2m + w_autosave_many2many_tags = fields.Many2many(comodel_name="res.partner", + relation="model_new_res_partner_rel_w_autosave_many2many_tags", + column1="new_id", column2="partner_id", + string="autosave_many2many_tags") + + w_date_begin = fields.Char(string='Date Begin') + w_date_end = fields.Char(string='Date End') + w_toggle_button = fields.Boolean(string='toggle_button') + w_res_partner_many2one = fields.Char(string='Boolean toggle') + + _sql_constraints = [('uniq_ref', 'unique(ref)', 'The reference must be unique.')] + + @api.depends('date', 'date_end') + def _compute_gauge(self): + for rec in self: + rec.w_gauge = (rec.date_end - rec.date).days + + @api.depends('partner_ids') + def _compute_partner_count(self): + for rec in self: + rec.partner_count = len(rec.partner_ids) + + + diff --git a/app_sample/models/product_template.py b/app_sample/models/product_template.py new file mode 100644 index 00000000..136045ab --- /dev/null +++ b/app_sample/models/product_template.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# 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. + +# Create on 2023-10-06 +############################################################################## + +from odoo import models, fields, api, _ +from odoo.tools.translate import html_translate + +import logging +_logger = logging.getLogger(__name__) + +# Template for model inherit +class ProductTemplate(models.Model): + _inherit = 'product.template' + + short_name = fields.Char(string='Short Name', translate=True, readonly=False, copy=True) \ No newline at end of file diff --git a/app_sample/report/__init__.py b/app_sample/report/__init__.py new file mode 100644 index 00000000..88e2e9c2 --- /dev/null +++ b/app_sample/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/app_sample/report/model_new_report.py b/app_sample/report/model_new_report.py new file mode 100644 index 00000000..1789c71b --- /dev/null +++ b/app_sample/report/model_new_report.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +############################################################################## +# 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. + +# Create on 2023-10-06 +############################################################################## + +from odoo import fields, models, tools, api + + +class ModelNewReport(models.Model): + + # Model New Analysis + _name = 'model.new.report' + _auto = False + _description = 'Model New Analysis' + _rec_name = 'name' + + # Base field + name = fields.Char(string='Name', readonly=True) + ref = fields.Char(string='Reference', readonly=True) + amount = fields.Float(string="Amount", readonly=True) + date = fields.Datetime(string="Date", readonly=True) + user_id = fields.Many2one('res.users', string='User', readonly=True) + user_login = fields.Char(string='User Login', readonly=True) + company_id = fields.Many2one('res.company', 'Company', readonly=True) + active = fields.Boolean(string="Active", readonly=True) + + @api.model + def _select(self): + return ''' + SELECT + m.id, + m.name, + m.ref, + m.amount, + m.date, + m.user_id, + u.login AS user_login, + m.company_id, + m.active + ''' + + @api.model + def _from(self): + return ''' + FROM model_new AS m + ''' + + @api.model + def _join(self): + return ''' + JOIN res_users AS u ON m.user_id = u.id + ''' + + @api.model + def _where(self): + return '' + + def init(self): + tools.drop_view_if_exists(self._cr, self._table) + sql = ''' + CREATE OR REPLACE VIEW %s AS ( + %s + %s + %s + %s + ) + ''' % (self._table, self._select(), self._from(), self._join(), self._where()) + self._cr.execute(sql) diff --git a/app_sample/report/model_new_report_views.xml b/app_sample/report/model_new_report_views.xml new file mode 100644 index 00000000..f04ea2b3 --- /dev/null +++ b/app_sample/report/model_new_report_views.xml @@ -0,0 +1,88 @@ + + + + + app.model.new.report.graph + model.new.report + + + + + + + + + + + app.model.new.report.pivot + model.new.report + + + + + + + + + + + + app.model.new.report.tree + model.new.report + + + + + + + + + + + + + app.model.new.report.search + model.new.report + + + + + + + + + + + + + + + + + + + + + Model New Report + model.new.report + graph,pivot,tree + { + 'pivot_column_groupby': ['user_id'], + 'pivot_row_groupby': ['date:month'], + 'graph_mode': 'bar', + 'graph_groupbys': ['date:month', 'user_id'], + } + + [] + +

+ No data yet! +

+

+ Start Analysis +

+
+
+
diff --git a/app_sample/security/app_security.xml b/app_sample/security/app_security.xml new file mode 100644 index 00000000..99b55a21 --- /dev/null +++ b/app_sample/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/app_sample/security/ir.model.access.csv b/app_sample/security/ir.model.access.csv new file mode 100644 index 00000000..fc156047 --- /dev/null +++ b/app_sample/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/app_sample/static/description/banner.gif b/app_sample/static/description/banner.gif new file mode 100644 index 00000000..ebf93547 Binary files /dev/null and b/app_sample/static/description/banner.gif differ diff --git a/app_sample/static/description/banner.png b/app_sample/static/description/banner.png new file mode 100644 index 00000000..7716c0fe Binary files /dev/null and b/app_sample/static/description/banner.png differ diff --git a/app_sample/static/description/banner1.png b/app_sample/static/description/banner1.png new file mode 100644 index 00000000..91d450c8 Binary files /dev/null and b/app_sample/static/description/banner1.png differ diff --git a/app_sample/static/description/demo1.jpg b/app_sample/static/description/demo1.jpg new file mode 100644 index 00000000..539bb88b Binary files /dev/null and b/app_sample/static/description/demo1.jpg differ diff --git a/app_sample/static/description/demo10.jpg b/app_sample/static/description/demo10.jpg new file mode 100644 index 00000000..07d5f6c6 Binary files /dev/null and b/app_sample/static/description/demo10.jpg differ diff --git a/app_sample/static/description/demo2.jpg b/app_sample/static/description/demo2.jpg new file mode 100644 index 00000000..a54add90 Binary files /dev/null and b/app_sample/static/description/demo2.jpg differ diff --git a/app_sample/static/description/demo3.jpg b/app_sample/static/description/demo3.jpg new file mode 100644 index 00000000..ffbc61e4 Binary files /dev/null and b/app_sample/static/description/demo3.jpg differ diff --git a/app_sample/static/description/demo_controler.jpg b/app_sample/static/description/demo_controler.jpg new file mode 100644 index 00000000..a77011d7 Binary files /dev/null and b/app_sample/static/description/demo_controler.jpg differ diff --git a/app_sample/static/description/demo_form.jpg b/app_sample/static/description/demo_form.jpg new file mode 100644 index 00000000..883d5460 Binary files /dev/null and b/app_sample/static/description/demo_form.jpg differ diff --git a/app_sample/static/description/demo_graph.jpg b/app_sample/static/description/demo_graph.jpg new file mode 100644 index 00000000..5e506e95 Binary files /dev/null and b/app_sample/static/description/demo_graph.jpg differ diff --git a/app_sample/static/description/demo_kanban.jpg b/app_sample/static/description/demo_kanban.jpg new file mode 100644 index 00000000..46470d09 Binary files /dev/null and b/app_sample/static/description/demo_kanban.jpg differ diff --git a/app_sample/static/description/demo_list.jpg b/app_sample/static/description/demo_list.jpg new file mode 100644 index 00000000..6b5c1e34 Binary files /dev/null and b/app_sample/static/description/demo_list.jpg differ diff --git a/app_sample/static/description/demo_menu.jpg b/app_sample/static/description/demo_menu.jpg new file mode 100644 index 00000000..666a29f4 Binary files /dev/null and b/app_sample/static/description/demo_menu.jpg differ diff --git a/app_sample/static/description/demo_pivot.jpg b/app_sample/static/description/demo_pivot.jpg new file mode 100644 index 00000000..b546dc6b Binary files /dev/null and b/app_sample/static/description/demo_pivot.jpg differ diff --git a/app_sample/static/description/demo_report.jpg b/app_sample/static/description/demo_report.jpg new file mode 100644 index 00000000..72af4d57 Binary files /dev/null and b/app_sample/static/description/demo_report.jpg differ diff --git a/app_sample/static/description/demo_search.jpg b/app_sample/static/description/demo_search.jpg new file mode 100644 index 00000000..06efe6fa Binary files /dev/null and b/app_sample/static/description/demo_search.jpg differ diff --git a/app_sample/static/description/demo_ui.jpg b/app_sample/static/description/demo_ui.jpg new file mode 100644 index 00000000..fb493811 Binary files /dev/null and b/app_sample/static/description/demo_ui.jpg differ diff --git a/app_sample/static/description/demo_use.jpg b/app_sample/static/description/demo_use.jpg new file mode 100644 index 00000000..5a72fc16 Binary files /dev/null and b/app_sample/static/description/demo_use.jpg differ diff --git a/app_sample/static/description/demo_widget_list.jpg b/app_sample/static/description/demo_widget_list.jpg new file mode 100644 index 00000000..bb2d794a Binary files /dev/null and b/app_sample/static/description/demo_widget_list.jpg differ diff --git a/app_sample/static/description/demo_widget_use.jpg b/app_sample/static/description/demo_widget_use.jpg new file mode 100644 index 00000000..7f141573 Binary files /dev/null and b/app_sample/static/description/demo_widget_use.jpg differ diff --git a/app_sample/static/description/icon.png b/app_sample/static/description/icon.png new file mode 100644 index 00000000..adc7a494 Binary files /dev/null and b/app_sample/static/description/icon.png differ diff --git a/app_sample/static/description/index.html b/app_sample/static/description/index.html new file mode 100644 index 00000000..7aad6262 --- /dev/null +++ b/app_sample/static/description/index.html @@ -0,0 +1,408 @@ + + + + +
+

Odoo Module Template. App sample with widget.

+

Odoo开发规范模板,Widget清单与使用样例

+

Sample Description of app. video and brief and detail demo snap and text

+
+ + + +
+
+

Just Clone this sample to your name to quick create your odoo addons

+

- Demo Video of Odoo17. Change to your video -

+
+ +
+ +
+
+ +
+ +
+
+
+
+ +
+


+
+
+ Click above Play. or go + Youtube Video of odoo Advance Search Superbar +
+
+

Demo Gif Animation if you can not get video

+ +
+
+ + + +
+

- Features -

+
+
+
+
+
+
+
+ 1 +
+

+ A full Sample module app of odoo addons. +

+

All the code, views, data ,banner, icon and description sample follow the odoo rule.

+
+
+
+ 2 +
+

+ Sample manifest file. +

+

Including structure and name and description etc, all field sample. Security xml and csv file for role group access rule. Follow most odoo rule follow

+

https://www.odooai.cn/documentation/16.0/contributing/development/coding_guidelines.html

+
+
+
+ 3 +
+

+ Sample .py models file +

+

for new model and inherit model

+
+
+
+ 4 +
+

+ Sample .xml views file for models +

+

Sample xml views file for models, with list, kanban, form, search

+
+
+
+ 5 +
+

+ Sample controllers file +

+

for website data publish and api developer. including how inherit odoo portal home

+
+
+
+
+
+
+
+ 6 +
+

+ Sample report design file +

+

.py file with how sql define. .xml file for graph and pivot

+
+
+
+ 7 +
+

+ Sample action and menu file +

+

Root menu and menu group and action menu

+
+
+
+ 8 +
+

+ Ui misc sample +

+

Alert like info and special field setup.

+
+
+
+ 9 +
+

+ Odoo Widget sample +

+

170+ widget list document and Frequently Used Sample.

+
+
+
+ 10 +
+

+ Quick access odoo developer Tutorials online. +

+

Document online for chinese and english. Fast visit in China.

+
+
+
+ 11 +
+

+ Full Open Source.Multi-language Support. Multi-Company Support +

+

Support Odoo 16,15,14,13,12, Enterprise and Community and odoo.sh Edition.

+

代码完全开源,多语言支持,多公司支持。Odoo 16,15,14,13,12, 企业版,社区版,在线SaaS.sh版,等全版本支持

+
+
+
+
+
+
+
+ + + +
+
+

- Feature Guide -

+
+
+
+
+
+ +
+
+

+ A full Sample module app of odoo addons. +

+

All the code, views, data ,banner, icon and description sample follow the odoo rule.

+
+ +
+
+
+

+ Sample manifest file. +

+

Including structure and name and description etc, all field sample.

+

Security xml and csv file for role group access rule. + Sample icon, banner, index.html, install/uninstall hooks. + Follow most odoo rule follow

+

https://www.odooai.cn/documentation/16.0/contributing/development/coding_guidelines.html

+
+ +
+
+
+

+ Sample .py models file, for new model and inherit model +

+

Please comment the inherit .py file of product_template.py in produce odoo.

+
+ +
+
+
+

+ Sample .xml views file for models, with list, kanban, form, search +

+

List

+
+ +
+

Kanban

+
+ +
+

Form

+
+ +
+

Form

+
+ +
+
+
+

+ Sample controllers file for website data publish and api developer +

+

including how inherit odoo portal home.

+
+ +
+
+
+

+ Sample report design file. +

+

.py file with how sql define.

+
+ +
+

.xml file for graph and pivot.

+
+ +
+
+ +
+
+
+

+ Sample action and menu file. +

+

Root menu and menu group and action menu.

+
+ +
+
+
+

+ Ui misc sample. Alert like info and special field setup. +

+
+ +
+
+
+

+ Odoo Widget sample. +

+

170+ widget list document

+
+ +
+

Frequently Used Sample.

+
+ +
+
+
+

+ Quick access odoo developer Tutorials online. +

+

Click alert info to visit. Document online for chinese and english. Fast visit in China.

+
+ +
+
+
+
+
+
+ + + + + + +
+

- How to setup and use -

+

This app need no extra module. The price already included

+
+
+
+

+ 1. Buy and Install app_sample. +

+

+ 2. Clone this sample and rename to your module name to quick create your odoo addons. +

+

3. Check the demo we create

+
+
+ +
+
+
+
+ + + + + + +
+
+
+

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/app_sample/static/description/odoo17.mp4 b/app_sample/static/description/odoo17.mp4 new file mode 100644 index 00000000..35f410e4 Binary files /dev/null and b/app_sample/static/description/odoo17.mp4 differ diff --git a/app_sample/static/description/qr.png b/app_sample/static/description/qr.png new file mode 100644 index 00000000..959f15c0 Binary files /dev/null and b/app_sample/static/description/qr.png differ diff --git a/app_sample/static/img/icon_odooai.png b/app_sample/static/img/icon_odooai.png new file mode 100644 index 00000000..a022f8d0 Binary files /dev/null and b/app_sample/static/img/icon_odooai.png differ diff --git a/app_sample/static/img/icon_odooapp.png b/app_sample/static/img/icon_odooapp.png new file mode 100644 index 00000000..775a12ee Binary files /dev/null and b/app_sample/static/img/icon_odooapp.png differ diff --git a/app_sample/static/img/logo_odooai.png b/app_sample/static/img/logo_odooai.png new file mode 100644 index 00000000..482f2a50 Binary files /dev/null and b/app_sample/static/img/logo_odooai.png differ diff --git a/app_sample/static/src/js/odooai.cn b/app_sample/static/src/js/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/app_sample/static/src/scss/odooai.cn b/app_sample/static/src/scss/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/app_sample/static/src/scss/style.scss b/app_sample/static/src/scss/style.scss new file mode 100644 index 00000000..02d893e9 --- /dev/null +++ b/app_sample/static/src/scss/style.scss @@ -0,0 +1,18 @@ +// scss sample, 样例navbar在下方的特殊处理 +.o_web_client { + //userMenu + .o_burger_menu { + width: 80%; + .o_burger_menu_topbar { + height: var(--o-navbar-height); + } + &.flex-column { + flex-direction: column-reverse!important; + } + .oi:before, .fa:before, .dropdown-toggle { + font-size: 2em; + line-height: var(--o-navbar-height); + } + } +} + diff --git a/app_sample/static/src/xml/odooai.cn b/app_sample/static/src/xml/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/app_sample/views/menu_views.xml b/app_sample/views/menu_views.xml new file mode 100644 index 00000000..042514a6 --- /dev/null +++ b/app_sample/views/menu_views.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app_sample/views/model_new_views.xml b/app_sample/views/model_new_views.xml new file mode 100644 index 00000000..a3ad6ad6 --- /dev/null +++ b/app_sample/views/model_new_views.xml @@ -0,0 +1,271 @@ + + + + + + app.view.model.new.tree + model.new + 16 + + + + + + + + + + + + + + + + + + + + + + + app.view.model.new.form + model.new + 16 + +
+
+ +
+ +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + + app.model.new.kanban + model.new + + + + + + + + + + + + + + + + +
+
+
+

+
+
+ +
+
+
+
+ Image +
+

+ Ref: +

+
+ +
+
+
+
+ +
+ +
+
+ +
+
+
+ + + + + + + + + + app.view.model.new.search + model.new + 16 + + + + + + + + + + + + + + + + + + + Model New + model.new + kanban,tree,form + {'search_default_groupby_state': 1} + + \ No newline at end of file diff --git a/app_sample/views/product_template_views.xml b/app_sample/views/product_template_views.xml new file mode 100644 index 00000000..f9e6025b --- /dev/null +++ b/app_sample/views/product_template_views.xml @@ -0,0 +1,58 @@ + + + + + + app.view.product.template.tree + product.template + + + + + + + + + + + app.view.product.template.kanban + product.template + product.template.search.brand + product.template + + + +
+ + + +
+
+
+
+ + + + app.product.template.form + product.template + + + + + + + + + + + app.product.template.search + product.template + + + + + + + +
diff --git a/app_sample/views/website_templates.xml b/app_sample/views/website_templates.xml new file mode 100644 index 00000000..31b731ca --- /dev/null +++ b/app_sample/views/website_templates.xml @@ -0,0 +1,13 @@ + + + +