diff --git a/app_account_ztree/__init__.py b/app_account_ztree/__init__.py new file mode 100644 index 00000000..86764a0e --- /dev/null +++ b/app_account_ztree/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import models +from .hooks import post_init_hook \ No newline at end of file diff --git a/app_account_ztree/__manifest__.py b/app_account_ztree/__manifest__.py new file mode 100644 index 00000000..ae38824c --- /dev/null +++ b/app_account_ztree/__manifest__.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- + +# Created on 2018-08-15 +# 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: + +{ + 'name': "App Account Multi Level Chart, parent children tree", + 'version': '16.23.03.01', + 'author': 'Sunpop.cn', + 'category': 'Base', + 'website': 'https://www.sunpop.cn', + 'license': 'LGPL-3', + 'sequence': 2, + 'summary': """ + Use for parent children tree list select navigator. Multi Level Account Chart tree. + ztree widget. + """, + 'description': """ + zTree widget. + Advance search with real parent children tree, ListView or KanbanView , + eg: Account Chart tree, Product category tree,Department tree, stock location tree. + 超级方便的查询,树状视图。 + """, + 'price': 0.00, + 'currency': 'EUR', + 'depends': [ + 'account', + 'l10n_cn_standard_latest', + ], + 'images': ['static/description/banner.gif'], + 'data': [ + 'views/account_account_views.xml', + ], + 'demo': [ + ], + 'test': [ + ], + 'css': [ + ], + 'qweb': [ + 'static/src/xml/*.xml', + ], + 'js': [ + ], + 'post_load': None, + 'post_init_hook': 'post_init_hook', + 'installable': True, + 'application': True, + 'auto_install': False, +} diff --git a/app_account_ztree/hooks.py b/app_account_ztree/hooks.py new file mode 100644 index 00000000..f7bbfac4 --- /dev/null +++ b/app_account_ztree/hooks.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + +# Created on 2018-10-12 +# 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: + +def post_init_hook(cr, pool): + pass + # cr.execute("") diff --git a/app_account_ztree/i18n/zh_CN.po b/app_account_ztree/i18n/zh_CN.po new file mode 100644 index 00000000..f1e36e3e --- /dev/null +++ b/app_account_ztree/i18n/zh_CN.po @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-08 14:28+0000\n" +"PO-Revision-Date: 2018-01-08 14:28+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_account_ztree/models/__init__.py b/app_account_ztree/models/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/app_account_ztree/models/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/app_account_ztree/report/__init__.py b/app_account_ztree/report/__init__.py new file mode 100644 index 00000000..633f8661 --- /dev/null +++ b/app_account_ztree/report/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- + diff --git a/app_account_ztree/static/description/banner.gif b/app_account_ztree/static/description/banner.gif new file mode 100644 index 00000000..e69de29b diff --git a/app_account_ztree/static/description/demo1.jpg b/app_account_ztree/static/description/demo1.jpg new file mode 100644 index 00000000..fd538628 Binary files /dev/null and b/app_account_ztree/static/description/demo1.jpg differ diff --git a/app_account_ztree/static/description/demo11.jpg b/app_account_ztree/static/description/demo11.jpg new file mode 100644 index 00000000..72ad356b Binary files /dev/null and b/app_account_ztree/static/description/demo11.jpg differ diff --git a/app_account_ztree/static/description/demo12.jpg b/app_account_ztree/static/description/demo12.jpg new file mode 100644 index 00000000..ecc58186 Binary files /dev/null and b/app_account_ztree/static/description/demo12.jpg differ diff --git a/app_account_ztree/static/description/demo2.jpg b/app_account_ztree/static/description/demo2.jpg new file mode 100644 index 00000000..b856e71d Binary files /dev/null and b/app_account_ztree/static/description/demo2.jpg differ diff --git a/app_account_ztree/static/description/demo3.jpg b/app_account_ztree/static/description/demo3.jpg new file mode 100644 index 00000000..e82b0990 Binary files /dev/null and b/app_account_ztree/static/description/demo3.jpg differ diff --git a/app_account_ztree/static/description/demo4.jpg b/app_account_ztree/static/description/demo4.jpg new file mode 100644 index 00000000..4a4abce1 Binary files /dev/null and b/app_account_ztree/static/description/demo4.jpg differ diff --git a/app_account_ztree/static/description/demo5.jpg b/app_account_ztree/static/description/demo5.jpg new file mode 100644 index 00000000..849b7841 Binary files /dev/null and b/app_account_ztree/static/description/demo5.jpg differ diff --git a/app_account_ztree/static/description/icon.png b/app_account_ztree/static/description/icon.png new file mode 100644 index 00000000..57e223d0 Binary files /dev/null and b/app_account_ztree/static/description/icon.png differ diff --git a/app_account_ztree/static/description/index.html b/app_account_ztree/static/description/index.html new file mode 100644 index 00000000..19ed979a --- /dev/null +++ b/app_account_ztree/static/description/index.html @@ -0,0 +1,181 @@ +
+
+

App ztree widget, for parent children tree list. Demo for hr department employee

+

Very useful for parent child relationship, like product category, stock location, hr department

+
+
+ +
+
+
+
+ Key features: +
    +
  • + + Easy to make custom parent children tree. +
  • +
  • + + Free to Use in product category. +
  • +
  • + + Free to Use in stock location. +
  • +
  • + + Free to Use in hr department, employee. +
  • +
  • + + It's a widget, you can use it in anywhere in odoo. +
  • +
+
+
+ + + + Extend features. superbar advance search navigator + + +
    +
  • + + Easy to navigate product, employee in tree or kanban view. +
  • +
+
+ +
+
+
+ +
+
+

Use in hr department.

+
+ +
+
+
+ +
+
+

Use in hr employee.

+
+ +
+
+
+ +
+
+

Use in product.

+
+ +
+
+
+ +
+
+

Free to Use in product category.

+
+ +
+
+
+ +
+
+

Free to Use in stock location.

+
+ +
+
+
+ +
+
+

 

+

(!Need extra module and pay, release soon)Easy to navigator.

+

Product, employee in kanban view

+
+ +
+
+
+ +
+
+

(!Need extra module and pay, release soon)List view

+
+ +
+
+
+ +
+
+

Easy to setup just use widget='widget_select'. like this

+
+ +
+


Use follow param to setup widget:

+

ztree_parent_key: --the key field of parent children relation.

+

ztree_expend_level: --how many level to expend the tree for initialize. Default is 2

+

limit: --how many record to show ztree. Default is 16

+

order: --the field to order by

+
+
+
+
+
+

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.sunpop.cn

+
+
+
+
+ diff --git a/app_account_ztree/static/description/setup1.jpg b/app_account_ztree/static/description/setup1.jpg new file mode 100644 index 00000000..d5ade2b1 Binary files /dev/null and b/app_account_ztree/static/description/setup1.jpg differ diff --git a/app_account_ztree/static/img/icon_sunpop.png b/app_account_ztree/static/img/icon_sunpop.png new file mode 100644 index 00000000..aa490954 Binary files /dev/null and b/app_account_ztree/static/img/icon_sunpop.png differ diff --git a/app_account_ztree/static/img/logo_sunpop.png b/app_account_ztree/static/img/logo_sunpop.png new file mode 100644 index 00000000..90cbe0e2 Binary files /dev/null and b/app_account_ztree/static/img/logo_sunpop.png differ diff --git a/app_account_ztree/views/account_account_views.xml b/app_account_ztree/views/account_account_views.xml new file mode 100644 index 00000000..05be2788 --- /dev/null +++ b/app_account_ztree/views/account_account_views.xml @@ -0,0 +1,15 @@ + + + + + app.account.account.form + account.account + + + + ztree_select + + + + + \ No newline at end of file diff --git a/app_chatgpt/__manifest__.py b/app_chatgpt/__manifest__.py index 03a2f202..a61afa46 100644 --- a/app_chatgpt/__manifest__.py +++ b/app_chatgpt/__manifest__.py @@ -40,11 +40,11 @@ 'data': [ 'security/ir.model.access.csv', 'data/mail_channel_data.xml', - 'data/gpt_robot_data.xml', + 'data/ai_robot_data.xml', 'data/user_partner_data.xml', 'data/ir_config_parameter.xml', 'views/res_config_settings_views.xml', - 'views/gpt_robot_views.xml', + 'views/ai_robot_views.xml', 'views/res_users_views.xml', ], 'assets': { diff --git a/app_chatgpt/data/gpt_robot_data.xml b/app_chatgpt/data/gpt_robot_data.xml index 4f2be514..f90880da 100644 --- a/app_chatgpt/data/gpt_robot_data.xml +++ b/app_chatgpt/data/gpt_robot_data.xml @@ -1,14 +1,14 @@ - + ChatGPT odoo 1 - + ChatGPT Coding 6 - + ChatGPT Finance 7 diff --git a/app_chatgpt/data/user_partner_data.xml b/app_chatgpt/data/user_partner_data.xml index b36a5c50..67416530 100644 --- a/app_chatgpt/data/user_partner_data.xml +++ b/app_chatgpt/data/user_partner_data.xml @@ -9,7 +9,7 @@ chatgpt@sunpop.cn chatgpt - + @@ -25,7 +25,7 @@ chatgpt1@sunpop.cn chatgpt - + @@ -41,7 +41,7 @@ chatgpt2@sunpop.cn chatgpt - + diff --git a/app_chatgpt/models/__init__.py b/app_chatgpt/models/__init__.py index 74223a16..10f457fa 100644 --- a/app_chatgpt/models/__init__.py +++ b/app_chatgpt/models/__init__.py @@ -3,6 +3,6 @@ from . import mail_channel from . import res_config_settings -from . import gpt_robot +from . import ai_robot from . import res_users from . import mail_message diff --git a/app_chatgpt/models/gpt_robot.py b/app_chatgpt/models/ai_robot.py similarity index 90% rename from app_chatgpt/models/gpt_robot.py rename to app_chatgpt/models/ai_robot.py index 62f9b5fe..77563e17 100644 --- a/app_chatgpt/models/gpt_robot.py +++ b/app_chatgpt/models/ai_robot.py @@ -4,8 +4,8 @@ import requests from odoo import api, fields, models, _ -class GptRobot(models.Model): - _name = 'gpt.robot' +class AiRobot(models.Model): + _name = 'ai.robot' _description = 'Gpt Robot' _order = 'sequence, name' diff --git a/app_chatgpt/models/mail_channel.py b/app_chatgpt/models/mail_channel.py index 86e2e0b2..f8d10b6b 100644 --- a/app_chatgpt/models/mail_channel.py +++ b/app_chatgpt/models/mail_channel.py @@ -85,7 +85,7 @@ class Channel(models.Model): to_partner_id = self.env['res.partner'] user_id = self.env['res.users'] author_id = msg_vals.get('author_id') - gpt_id = self.env['gpt.robot'] + gpt_id = self.env['ai.robot'] channel_type = self.channel_type if channel_type == 'chat': channel_partner_ids = self.channel_partner_ids diff --git a/app_chatgpt/models/res_users.py b/app_chatgpt/models/res_users.py index a3cf2910..262c5223 100644 --- a/app_chatgpt/models/res_users.py +++ b/app_chatgpt/models/res_users.py @@ -6,7 +6,7 @@ from odoo import fields, models class ResUsers(models.Model): _inherit = "res.users" - gpt_id = fields.Many2one('gpt.robot', string='Bind to ChatGpt') + gpt_id = fields.Many2one('ai.robot', string='Bind to ChatGpt') gpt_policy = fields.Selection([ ('all', 'All Users'), ('limit', 'Selected Users') diff --git a/app_chatgpt/security/ir.model.access.csv b/app_chatgpt/security/ir.model.access.csv index 8222aad4..48a026f0 100644 --- a/app_chatgpt/security/ir.model.access.csv +++ b/app_chatgpt/security/ir.model.access.csv @@ -1,2 +1,2 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_gpt_robt_user,GptRobotUser,model_gpt_robot,base.group_user,1,1,1,1 \ No newline at end of file +access_gpt_robt_user,AiRobotUser,model_ai_robot,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/app_chatgpt/views/gpt_robot_views.xml b/app_chatgpt/views/ai_robot_views.xml similarity index 68% rename from app_chatgpt/views/gpt_robot_views.xml rename to app_chatgpt/views/ai_robot_views.xml index 0a4c14a2..e7aad6f2 100644 --- a/app_chatgpt/views/gpt_robot_views.xml +++ b/app_chatgpt/views/ai_robot_views.xml @@ -1,8 +1,8 @@ - - gpt.robot.tree - gpt.robot + + ai.robot.tree + ai.robot @@ -13,9 +13,9 @@ - - gpt.robot.form - gpt.robot + + ai.robot.form + ai.robot
@@ -32,9 +32,9 @@ - + GPT Robot - gpt.robot + ai.robot tree,form

@@ -43,21 +43,21 @@ - + Disconnect - - + + list,form code action = records.action_disconnect() \ No newline at end of file diff --git a/app_odoo_customize/models/res_config_settings.py b/app_odoo_customize/models/res_config_settings.py index 3d0805a7..3c887c59 100644 --- a/app_odoo_customize/models/res_config_settings.py +++ b/app_odoo_customize/models/res_config_settings.py @@ -285,6 +285,15 @@ class ResConfigSettings(models.TransientModel): company_id = self.env.company.id self = self.with_company(self.env.company) to_removes = [ + # 清除财务科目,用于重设 + 'res.partner.bank', + # 'account.invoice', + 'account.payment', + 'account.bank.statement', + # 'account.tax.account.tag', + 'account.tax', + # 'wizard_multi_charts_accounts', + # 'account.account', ] # todo: 要做 remove_hr,因为工资表会用到 account # 更新account关联,很多是多公司字段,故只存在 ir_property,故在原模型,只能用update @@ -354,8 +363,10 @@ class ResConfigSettings(models.TransientModel): pass # raise Warning(e) seqs = [] + self.env.company.write({ + 'chart_template_id': False, + }) res = self.remove_app_data(to_removes, seqs) - self.env.company.write({'chart_template_id': False}) return res def remove_project(self): diff --git a/l10n_cn_standard_latest/__manifest__.py b/l10n_cn_standard_latest/__manifest__.py index 2368b4a0..2a36a984 100644 --- a/l10n_cn_standard_latest/__manifest__.py +++ b/l10n_cn_standard_latest/__manifest__.py @@ -9,7 +9,7 @@ { 'name': '2023最新中国企业会计表.Latest Chinese Accounting for odoo16', - 'version': '16.23.02.14', + 'version': '16.23.03.01', 'author': 'Sunpop.cn', 'category': 'Accounting/Localizations/Account Charts', 'website': 'https://www.sunpop.cn', diff --git a/l10n_cn_standard_latest/data/account_chart_template_data.xml b/l10n_cn_standard_latest/data/account_chart_template_data.xml index 1aed1295..a6f3e804 100644 --- a/l10n_cn_standard_latest/data/account_chart_template_data.xml +++ b/l10n_cn_standard_latest/data/account_chart_template_data.xml @@ -11,8 +11,8 @@ - - - + + + diff --git a/l10n_cn_standard_latest/data/chart_data.xml b/l10n_cn_standard_latest/data/chart_data.xml index e30c59d3..790fe57e 100644 --- a/l10n_cn_standard_latest/data/chart_data.xml +++ b/l10n_cn_standard_latest/data/chart_data.xml @@ -4,7 +4,7 @@ - 2022中国企业会计科目表-odoo16 + 2023中国企业会计科目表-odoo16 1001 diff --git a/l10n_cn_standard_latest/models/account_chart_template.py b/l10n_cn_standard_latest/models/account_chart_template.py index 7e032b5a..f76d7e6c 100644 --- a/l10n_cn_standard_latest/models/account_chart_template.py +++ b/l10n_cn_standard_latest/models/account_chart_template.py @@ -23,6 +23,7 @@ class AccountChartTemplate(models.Model): @api.model def _prepare_transfer_account_template(self): + # 初始化时,使用 _load 方法,不再使用此方法了 ''' Prepare values to create the transfer account that is an intermediary account used when moving money from a liquidity account to another. @@ -55,27 +56,27 @@ class AccountChartTemplate(models.Model): 'chart_template_id': self.id, } - def load_for_current_company(self, sale_tax_rate, purchase_tax_rate): - res = super(AccountChartTemplate, self).load_for_current_company(sale_tax_rate, purchase_tax_rate) + def _load(self, company): + res = super(AccountChartTemplate, self)._load(company) # 更新父级 company = self.env.user.company_id acc_ids = self.env['account.account'].sudo().search([('company_id', '=', company.id)]) for acc in acc_ids: code = acc.code - parent_account = self.env['account.account.template'].sudo().search([ + todo_account = self.env['account.account.template'].sudo().search([ ('code', '=', code), ('chart_template_id', '=', self.id), ('parent_id', '!=', False) ], limit=1) - if len(parent_account) or code == '2221.01.01': - parent_code = parent_account[0].parent_id.code + if len(todo_account) or code == '2221.01.01': + parent_code = todo_account[0].parent_id.code if parent_code: parent = self.env['account.account'].sudo().search([ ('company_id', '=', company.id), ('code', '=', parent_code), ], limit=1) if len(parent): - acc.update({ + acc.write({ 'parent_id': parent.id, }) return res diff --git a/l10n_cn_standard_latest/views/account_account_views.xml b/l10n_cn_standard_latest/views/account_account_views.xml index 07c95285..428377a4 100644 --- a/l10n_cn_standard_latest/views/account_account_views.xml +++ b/l10n_cn_standard_latest/views/account_account_views.xml @@ -32,7 +32,7 @@ account.account - +