mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix 时区问题 and common
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<!--设置默认时区为中国,注意select 类型要加 ""-->
|
||||
<record id="res_partner_tz_default" model="ir.default">
|
||||
<field name="field_id" eval="ref('base.field_res_partner__tz')"/>
|
||||
<field name="json_value">"Asia/Shanghai"</field>
|
||||
<field name="json_value">"Etc/GMT-8"</field>
|
||||
</record>
|
||||
<!--设置用户email在odoo内提醒-->
|
||||
<record id="res_user_notify_email_default" model="ir.default">
|
||||
|
||||
@@ -44,7 +44,7 @@ def post_init_hook(cr, registry):
|
||||
rec._compute_complete_name()
|
||||
# 超级用户改时区为中国
|
||||
ids = env['res.users'].sudo().with_context(lang='zh_CN').browse([1, 2])
|
||||
ids.write({'tz': "Asia/Shanghai"})
|
||||
ids.write({'tz': "Etc/GMT-8"})
|
||||
except Exception as e:
|
||||
raise Warning(e)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user