diff --git a/app_mixin_name_en/__init__.py b/app_mixin_name_en/__init__.py new file mode 100644 index 00000000..0190a7f5 --- /dev/null +++ b/app_mixin_name_en/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- + +from .hooks import pre_init_hook +from .hooks import post_init_hook +from . import controllers +from . import models +from . import ir +from . import res \ No newline at end of file diff --git a/app_mixin_name_en/__manifest__.py b/app_mixin_name_en/__manifest__.py new file mode 100644 index 00000000..c109b2a3 --- /dev/null +++ b/app_mixin_name_en/__manifest__.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- + +# Created on 2023-08-28 +# 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 + +# Odoo13在线用户手册(长期更新) +# https://www.odooai.cn/documentation/user/13.0/zh_CN/index.html + +# Odoo13在线开发者手册(长期更新) +# https://www.odooai.cn/documentation/13.0/index.html + +# Odoo10在线中文用户手册(长期更新) +# https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html + +# Odoo10离线中文用户手册下载 +# https://www.odooai.cn/odoo10_user_manual_document_offline/ +# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备) +# https://www.odooai.cn/odoo10_developer_document_offline/ + +############################################################################## +# 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': 'mixin english name,增加英文名字段', + 'version': '16.23.07.27', + 'author': 'odooai.cn', + 'category': 'Base', + 'website': 'https://www.odooai.cn', + 'live_test_url': 'https://demo.odooapp.cn', + 'license': 'OPL-1', + 'sequence': 2, + 'price': 98.00, + 'currency': 'EUR', + 'images': ['static/description/banner.png'], + 'summary': ''' + Chinese enhance. Out of the box use in china. + Set all chinese default value. + Add quick set of english name. + Default country, timezone, currency, partner... + ''', + 'description': ''' + Support Odoo 16,15,14,13,12, Enterprise and Community and odoo.sh Edition + 1. + 2. + 11. Multi-language Support. Multi-Company Support. + 12. Support Odoo 16,15,14,13,12, Enterprise and Community and odoo.sh Edition. + 13. Full Open Source. + ========== + odoo Chinese Enhance. 中国化增强-基础 + 1. mixin, 增加英文名字段, 自动设定lang=en_US的名称为英文名 + 2. + 11. 多语言支持,多公司支持 + 12. Odoo 16,15,14,13,12, 企业版,社区版,在线SaaS.sh版,等全版本支持 + 13. 代码完全开源 + ''', + 'depends': [ + 'web', + ], + 'data': [ + 'views/res_partner_views.xml', + ], + 'assets': { + 'web.assets_frontend': [ + # 'app_/static/src/scss/*.scss', + ], + 'web.assets_backend': [ + # 'app_/static/src/js/*.js', + ], + }, + 'demo': [], + # '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_mixin_name_en/controllers/__init__.py b/app_mixin_name_en/controllers/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/app_mixin_name_en/controllers/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/app_mixin_name_en/hooks.py b/app_mixin_name_en/hooks.py new file mode 100644 index 00000000..c2efd3eb --- /dev/null +++ b/app_mixin_name_en/hooks.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- + +# Created on 2017-11-22 +# author: 广州尚鹏,https://www.sunpop.cn +# email: 300883@qq.com +# resource of Sunpop +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +# Odoo在线中文用户手册(长期更新) +# https://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html + +# Odoo10离线中文用户手册下载 +# https://www.sunpop.cn/odoo10_user_manual_document_offline/ +# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备) +# https://www.sunpop.cn/odoo10_developer_document_offline/ +# description: + +from odoo import api, SUPERUSER_ID, _ + + +def pre_init_hook(cr): + """ + 数据初始化,只在安装时执行,更新时不执行 + """ + pass + + +def post_init_hook(cr, registry): + """ + 数据初始化,只在安装后执行,更新时不执行 + """ + pass + +def uninstall_hook(cr, registry): + """ + 数据初始化,卸载时执行 + """ + pass diff --git a/app_mixin_name_en/i18n/zh_CN.po b/app_mixin_name_en/i18n/zh_CN.po new file mode 100644 index 00000000..1ccd6f04 --- /dev/null +++ b/app_mixin_name_en/i18n/zh_CN.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * app_mixin_name_en +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-07-01 08:44+0000\n" +"PO-Revision-Date: 2020-07-01 08:44+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_mixin_name_en +#: model:ir.model,name:app_mixin_name_en.model_res_partner +msgid "Contact" +msgstr "联系人" + +#. module: app_mixin_name_en +#: model:ir.model.fields,field_description:app_mixin_name_en.field_mixin_name_en__display_name +msgid "Display Name" +msgstr "" + +#. module: app_mixin_name_en +#: model:ir.model.fields,field_description:app_mixin_name_en.field_mixin_name_en__name_en_US +#: model:ir.model.fields,field_description:app_mixin_name_en.field_res_partner__name_en_US +#: model:ir.model.fields,field_description:app_mixin_name_en.field_res_users__name_en_US +msgid "English Name" +msgstr "英文名" + +#. module: app_mixin_name_en +#: model:ir.model.fields,field_description:app_mixin_name_en.field_mixin_name_en__id +msgid "ID" +msgstr "" + +#. module: app_mixin_name_en +#: model:ir.model.fields,field_description:app_mixin_name_en.field_mixin_name_en____last_update +msgid "Last Modified on" +msgstr "" + +#. module: app_mixin_name_en +#: model:ir.model,name:app_mixin_name_en.model_mixin_name_en +msgid "Mixin Auto english name" +msgstr "Mixin 自动英文名" diff --git a/app_mixin_name_en/ir/__init__.py b/app_mixin_name_en/ir/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/app_mixin_name_en/ir/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/app_mixin_name_en/models/__init__.py b/app_mixin_name_en/models/__init__.py new file mode 100644 index 00000000..79f9bac3 --- /dev/null +++ b/app_mixin_name_en/models/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- + +from . import mixin_name_en +from . import res_partner + + diff --git a/app_mixin_name_en/models/mixin_name_en.py b/app_mixin_name_en/models/mixin_name_en.py new file mode 100644 index 00000000..5dce7d4b --- /dev/null +++ b/app_mixin_name_en/models/mixin_name_en.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- + +import logging + +from odoo import api, fields, models, _ + +_logger = logging.getLogger(__name__) + + +class MixinNameEn(models.AbstractModel): + _name = 'mixin.name.en' + _description = 'Mixin Auto english name' + + # name_en_US 只要某个模型有此字段,且放在界面上,就会进行此处理 + # 无此字段不处理 + + name_en_US = fields.Char('English Name') + + # todo: 以下处理方式不同,最好直接做一个widget, + # 非开发者模式时,能显示出非英文时值,并可点击改多语种。 + # 将原 widget加 options 处理 + @api.model_create_multi + def create(self, vals_list): + res = super(MixinNameEn, self).create(vals_list) + if self.env.lang == 'en_US': + return res + + # todo: 这里已为了提高性能不检查。不需检查当前odoo是否有英文,没英文就不给安装此模块。同时也不检查条件 + # if name_field and name_field.translate and name_field.type in ["char", "text"]: + # # todo: 符合条件,后续为提高性能,无需做此判断 + # pass + # else: + # return res + # 处理写 en + for index, vals in enumerate(vals_list): + name_en_US = vals.get('name_en_US') + if name_en_US: + try: + res[index].with_context(lang='en_US').write(dict(name=name_en_US)) + except Exception as e: + _logger.error('============== name_en mixin create error from name_en_US: %s' % str(e)) + return res + + def write(self, vals): + res = super(MixinNameEn, self).write(vals) + if self.env.lang == 'en_US': + return res + + name_en_US = vals.get('name_en_US') + name = vals.get('name') + if name_en_US: + try: + self.with_context(lang='en_US').write(dict(name=name_en_US)) + except Exception as e: + _logger.error('============== name_en mixin write error:%s' % str(e)) + return res diff --git a/app_mixin_name_en/models/res_partner.py b/app_mixin_name_en/models/res_partner.py new file mode 100644 index 00000000..26ea8278 --- /dev/null +++ b/app_mixin_name_en/models/res_partner.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- + +from odoo import api, models, fields, _ +from odoo.exceptions import UserError, ValidationError + + +class ResPartner(models.Model): + _name = 'res.partner' + + _inherit = ['res.partner', 'mixin.name.en'] diff --git a/app_mixin_name_en/report/__init__.py b/app_mixin_name_en/report/__init__.py new file mode 100644 index 00000000..633f8661 --- /dev/null +++ b/app_mixin_name_en/report/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- + diff --git a/app_mixin_name_en/res/__init__.py b/app_mixin_name_en/res/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/app_mixin_name_en/res/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/app_mixin_name_en/static/description/banner.png b/app_mixin_name_en/static/description/banner.png new file mode 100644 index 00000000..daeedb74 Binary files /dev/null and b/app_mixin_name_en/static/description/banner.png differ diff --git a/app_mixin_name_en/static/description/banner1.png b/app_mixin_name_en/static/description/banner1.png new file mode 100644 index 00000000..595f1d04 Binary files /dev/null and b/app_mixin_name_en/static/description/banner1.png differ diff --git a/app_mixin_name_en/static/description/icon.png b/app_mixin_name_en/static/description/icon.png new file mode 100644 index 00000000..22cbd278 Binary files /dev/null and b/app_mixin_name_en/static/description/icon.png differ diff --git a/app_mixin_name_en/static/description/index.html b/app_mixin_name_en/static/description/index.html new file mode 100644 index 00000000..c3cfac4a --- /dev/null +++ b/app_mixin_name_en/static/description/index.html @@ -0,0 +1,244 @@ + + + + +
+

App Title

+

Description 1

+

Description 2

+
+ + + +
+

- Features -

+
+
+
+
+
+
+
+ 1 +
+

+ Quick Advance Search and navigator for all app data +

+

20+ free odoo app search in box.

+
+
+
+ 2 +
+

+ Quick search in tree list header +

+

Date range, Datetime, selection, number supported.

+
+
+
+ 3 +
+

+ Advance search sidebar for many2one, many2many field +

+

m2o search, m2m search for multi select.

+
+
+
+
+
+
+
+ 4 +
+

+ Advance siderbar for date range search, datetime search +

+

Extra for boolean search, selection search, number search.

+
+
+
+ 5 +
+

+ Search sidebar for list, kanban +

+

Add more pivot, graph views than origin odoo.

+
+
+
+ 6 +
+

+ 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版,等全版本支持

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

- Demo Video -

+
+
+
+
+
+
+
+ +
+


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

Demo Gif Animation if you can not get video

+ +
+
+ + + +
+
+

- Feature Guide -

+
+
+
+
+
+ +
+
+

+ All in One Search +

+

Quick Advance Search and navigator for all app data.

+
+ +
+

+
+ +
+

+
+

+ Product Search +

+

Use in product and Category.

+
+ +
+

Filter product or any data in search more windows

+
+ +
+
+
+

+ Multi-language,Multi-Company Support. +

+

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

+

Full Open Source.

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

- How to use -

+

This app need no extra module. The price already included

+
+
+
+

+ 1. Buy and Install app_web_superbar. +

+
+
+ +
+
+

2. Easy use of superbar

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

Technical Help & Support

+
+
+
+

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

+ + guohuadeng@hotmail.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_mixin_name_en/static/img/icon_odooai.png b/app_mixin_name_en/static/img/icon_odooai.png new file mode 100644 index 00000000..a022f8d0 Binary files /dev/null and b/app_mixin_name_en/static/img/icon_odooai.png differ diff --git a/app_mixin_name_en/static/img/icon_odooapp.png b/app_mixin_name_en/static/img/icon_odooapp.png new file mode 100644 index 00000000..775a12ee Binary files /dev/null and b/app_mixin_name_en/static/img/icon_odooapp.png differ diff --git a/app_mixin_name_en/static/img/logo_odooai.png b/app_mixin_name_en/static/img/logo_odooai.png new file mode 100644 index 00000000..4fb394b2 Binary files /dev/null and b/app_mixin_name_en/static/img/logo_odooai.png differ diff --git a/app_mixin_name_en/static/src/js/odooai.cn b/app_mixin_name_en/static/src/js/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/app_mixin_name_en/static/src/scss/app_style.scss b/app_mixin_name_en/static/src/scss/app_style.scss new file mode 100644 index 00000000..39bfb17d --- /dev/null +++ b/app_mixin_name_en/static/src/scss/app_style.scss @@ -0,0 +1,26 @@ +.o_form_view .o_address_format { + .o_address_country { + display: -webkit-inline-flex; + display: inline-flex; + width: 48%; + margin-right: 2%; + } +} +.o_form_view.o_form_editable .o_address_format { + div.o_address_state { + width: 50%; + margin-right: 0; + } + .o_address_city{ + width: 48%; + margin-right: 2%; + } + .o_address_city_id{ + width: 48%; + margin-right: 2%; + } + input.o_address_zip{ + width: 50%; + margin-right: 0; + } +} diff --git a/app_mixin_name_en/static/src/scss/odooai.cn b/app_mixin_name_en/static/src/scss/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/app_mixin_name_en/static/src/xml/odooai.cn b/app_mixin_name_en/static/src/xml/odooai.cn new file mode 100644 index 00000000..e69de29b diff --git a/app_mixin_name_en/views/res_partner_views.xml b/app_mixin_name_en/views/res_partner_views.xml new file mode 100644 index 00000000..3832fad5 --- /dev/null +++ b/app_mixin_name_en/views/res_partner_views.xml @@ -0,0 +1,18 @@ + + + + + + + app.res.partner.form + res.partner + + + + + + + + + +