mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
Merge branch '17.0' of https://github.com/guohuadeng/app-odoo into 17.0
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
from odoo import api, SUPERUSER_ID, _
|
||||
|
||||
|
||||
def pre_init_hook(cr):
|
||||
def pre_init_hook(env):
|
||||
"""
|
||||
数据初始化,只在安装时执行,更新时不执行
|
||||
"""
|
||||
@@ -26,25 +26,24 @@ def pre_init_hook(cr):
|
||||
pass
|
||||
|
||||
|
||||
def post_init_hook(cr, registry):
|
||||
def post_init_hook(env):
|
||||
"""
|
||||
数据初始化,只在安装后执行,更新时不执行
|
||||
"""
|
||||
try:
|
||||
env = api.Environment(cr, SUPERUSER_ID, {'active_test': False})
|
||||
ids = env['product.category'].sudo().with_context(lang='zh_CN').search([
|
||||
ids = env['product.category'].sudo().with_context(lang='zh_CN', active_test=False).search([
|
||||
('parent_id', '!=', False)
|
||||
], order='parent_path')
|
||||
for rec in ids:
|
||||
rec._compute_complete_name()
|
||||
ids = env['stock.location'].sudo().with_context(lang='zh_CN').search([
|
||||
ids = env['stock.location'].sudo().with_context(lang='zh_CN', active_test=False).search([
|
||||
('location_id', '!=', False),
|
||||
('usage', '!=', 'views'),
|
||||
], order='parent_path')
|
||||
for rec in ids:
|
||||
rec._compute_complete_name()
|
||||
# 超级用户改时区为中国
|
||||
ids = env['res.users'].sudo().with_context(lang='zh_CN').browse([1, 2])
|
||||
ids = env['res.users'].sudo().with_context(lang='zh_CN', active_test=False).browse([1, 2])
|
||||
ids.write({'tz': "Etc/GMT-8"})
|
||||
# 公司价格改人民币
|
||||
ids = env['res.company'].sudo().search([], limit=1)
|
||||
@@ -57,7 +56,7 @@ def post_init_hook(cr, registry):
|
||||
except Exception as e:
|
||||
raise Warning(e)
|
||||
|
||||
def uninstall_hook(cr, registry):
|
||||
def uninstall_hook(env):
|
||||
"""
|
||||
数据初始化,卸载时执行
|
||||
"""
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
from odoo import api, SUPERUSER_ID, _
|
||||
|
||||
|
||||
def pre_init_hook(cr):
|
||||
def pre_init_hook(env):
|
||||
pass
|
||||
# cr.execute("")
|
||||
|
||||
def post_init_hook(cr, registry):
|
||||
def post_init_hook(env):
|
||||
pass
|
||||
# cr.execute("")
|
||||
|
||||
def uninstall_hook(cr, registry):
|
||||
def uninstall_hook(env):
|
||||
pass
|
||||
# cr.execute("")
|
||||
|
||||
|
||||
@@ -18,32 +18,31 @@
|
||||
from odoo import api, SUPERUSER_ID, _
|
||||
|
||||
|
||||
def pre_init_hook(cr):
|
||||
def pre_init_hook(env):
|
||||
try:
|
||||
# 更新企业版指向
|
||||
sql = "UPDATE ir_module_module SET website = '%s' WHERE license like '%s' and website <> ''" % ('https://www.odooai.cn', 'OEEL%')
|
||||
cr.execute(sql)
|
||||
cr.commit()
|
||||
env.cr.execute(sql)
|
||||
env.cr.commit()
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
def post_init_hook(cr):
|
||||
def post_init_hook(env):
|
||||
# a = check_module_installed(cr, ['app_web_superbar','aaaaa'])
|
||||
pass
|
||||
# cr.execute("")
|
||||
|
||||
def uninstall_hook(cr, registry):
|
||||
def uninstall_hook(env):
|
||||
"""
|
||||
数据初始化,卸载时执行
|
||||
"""
|
||||
pass
|
||||
|
||||
def check_module_installed(cr, modules):
|
||||
def check_module_installed(env, modules):
|
||||
# modules 输入参数是个 list,如 ['base', 'sale']
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
installed = False
|
||||
m = env['ir.module.module'].sudo().search([('name', 'in', modules), ('state', 'in', ['installed', 'to install', 'to upgrade'])])
|
||||
if len(m) == len(modules):
|
||||
installed = True
|
||||
return len(m)
|
||||
return installed
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 546 KiB After Width: | Height: | Size: 548 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 79 KiB |
@@ -20,7 +20,7 @@
|
||||
<section class="container app">
|
||||
<div class="oe_row oe_spaced" style="max-width: 95%;">
|
||||
<div class="row">
|
||||
<h2 class="oe_slogan">This is a Long Term Support Apps.Update: v17.24.02.27</h2>
|
||||
<h2 class="oe_slogan">This is a Long Term Support Apps.Update: v17.24.03.01</h2>
|
||||
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">1. Deletes Odoo label in footer</li>
|
||||
@@ -299,6 +299,10 @@
|
||||
<div class="row">
|
||||
<h2 class="oe_slogan">This is a Long Term Support Apps.</h2>
|
||||
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
|
||||
<h3>Update: v17.24.03.01</h3>
|
||||
<p>Add more function for odoo 17.Dialog, language switcher.</p>
|
||||
<h3>Update: v17.24.02.26</h3>
|
||||
<p>Fix bug for odoo 17 origin update.</p>
|
||||
<h3>Update: v16.23.09.13</h3>
|
||||
<p>UI enhance. follow odoo16 setup UI.</p>
|
||||
<p>46. Add Help documentation anywhere. easy get help for any odoo operation or action.</p>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<template id="replace_copyright_name" name="Copyright Name" inherit_id="web.frontend_layout">
|
||||
<xpath expr="//span[hasclass('o_footer_copyright_name')]" position="replace">
|
||||
<span class="o_footer_copyright_name me-2">Copyright &copy;
|
||||
<span class="copyright_name_before" contenteditable="true">2009-2023 </span>
|
||||
<span class="copyright_name_before" contenteditable="true">2009-2024 </span>
|
||||
<span t-field="res_company.name" itemprop="name"/>
|
||||
<span class="copyright_name_after" contenteditable="true"></span>
|
||||
</span>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="priority">20</field>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//app[@name='general_settings']" position="after">
|
||||
<xpath expr="//app[@name='general_settings']" position="before">
|
||||
<app class="app_settings_block ml8" data-string="OEM & Boost" string="OEM & Boost"
|
||||
name="app_odoo_customize" data-key="app_odoo_customize" logo="/app_odoo_customize/static/description/icon.png">>
|
||||
<div class="row app_settings_header my-0 ms-0 mw-100 bg-warning bg-opacity-25">
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<!--点击模块看详情-->
|
||||
<xpath expr="//div[hasclass('oe_module_vignette')]" position="attributes" groups="app_odoo_customize.group_show_quick_upgrade">
|
||||
<attribute name="class">oe_module_vignette oe_kanban_global_click</attribute>
|
||||
<attribute name="class" position="add" separator=" ">oe_kanban_global_click</attribute>
|
||||
</xpath>
|
||||
<!--让模块名更显眼-->
|
||||
<xpath expr="//div[hasclass('oe_module_desc')]//code" position="replace"/>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<setting id="appstore" position="attributes">
|
||||
<attribute name="class">o_hidden</attribute>
|
||||
<attribute name="invisible">1</attribute>
|
||||
</setting>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user