mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update misc
This commit is contained in:
@@ -5,4 +5,4 @@ from .hooks import post_init_hook
|
|||||||
from . import controllers
|
from . import controllers
|
||||||
from . import models
|
from . import models
|
||||||
from . import ir
|
from . import ir
|
||||||
from . import res
|
from . import res
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
'depends': [
|
'depends': [
|
||||||
'base_address_extended',
|
'base_address_extended',
|
||||||
'account',
|
'account',
|
||||||
|
'l10n_multilang',
|
||||||
'sales_team',
|
'sales_team',
|
||||||
'sale',
|
'sale',
|
||||||
'stock',
|
'stock',
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="1">
|
<data noupdate="1">
|
||||||
<!-- Price list -->
|
<!-- Price list -->
|
||||||
<record id="product.list0" model="product.pricelist">
|
<!-- <record id="product.list0" model="product.pricelist">-->
|
||||||
<field name="currency_id" ref="base.CNY"/>
|
<!-- <field name="currency_id" ref="base.CNY"/>-->
|
||||||
</record>
|
<!-- </record>-->
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="1">
|
<data noupdate="1">
|
||||||
<record id="base.main_company" model="res.company">
|
<!-- <record id="base.main_company" model="res.company">-->
|
||||||
<field name="currency_id" ref="base.CNY"/>
|
<!-- <field name="currency_id" ref="base.CNY"/>-->
|
||||||
</record>
|
<!-- </record>-->
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="1">
|
<data noupdate="1">
|
||||||
<!-- Currencies -->
|
<!-- Currencies -->
|
||||||
<record id="base.USD" model="res.currency">
|
<!-- <record id="base.USD" model="res.currency">-->
|
||||||
<field name="active" eval="False"/>
|
<!-- <field name="active" eval="False"/>-->
|
||||||
</record>
|
<!-- </record>-->
|
||||||
<record id="base.EUR" model="res.currency">
|
<!-- <record id="base.EUR" model="res.currency">-->
|
||||||
<field name="active" eval="False"/>
|
<!-- <field name="active" eval="False"/>-->
|
||||||
</record>
|
<!-- </record>-->
|
||||||
<record id="base.CNY" model="res.currency">
|
<record id="base.CNY" model="res.currency">
|
||||||
<field name="active" eval="True"/>
|
<field name="active" eval="True"/>
|
||||||
<field name="currency_unit_label">元</field>
|
<field name="currency_unit_label">元</field>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ def post_init_hook(cr, registry):
|
|||||||
数据初始化,只在安装后执行,更新时不执行
|
数据初始化,只在安装后执行,更新时不执行
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
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').search([
|
||||||
('parent_id', '!=', False)
|
('parent_id', '!=', False)
|
||||||
], order='parent_path')
|
], order='parent_path')
|
||||||
@@ -46,6 +46,14 @@ def post_init_hook(cr, registry):
|
|||||||
# 超级用户改时区为中国
|
# 超级用户改时区为中国
|
||||||
ids = env['res.users'].sudo().with_context(lang='zh_CN').browse([1, 2])
|
ids = env['res.users'].sudo().with_context(lang='zh_CN').browse([1, 2])
|
||||||
ids.write({'tz': "Etc/GMT-8"})
|
ids.write({'tz': "Etc/GMT-8"})
|
||||||
|
# 公司价格改人民币
|
||||||
|
ids = env['res.company'].sudo().search([], limit=1)
|
||||||
|
if ids:
|
||||||
|
ids.write({'currency_id': env.ref('base.CNY').id})
|
||||||
|
# 价格表改人民币
|
||||||
|
ids = env['product.pricelist'].sudo().search([], limit=1)
|
||||||
|
if ids:
|
||||||
|
ids.write({'currency_id': env.ref('base.CNY').id})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise Warning(e)
|
raise Warning(e)
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<field name="inherit_id" ref="base.module_form"/>
|
<field name="inherit_id" ref="base.module_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='description_html']" position="before">
|
<xpath expr="//field[@name='description_html']" position="before">
|
||||||
<field name="description_html_cn" class="oe_styling_v8" attrs="{'invisible': [('description_html_cn', '=', False)]}"/>
|
<field name="description_html_cn"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -47,7 +47,9 @@
|
|||||||
* 税金模板
|
* 税金模板
|
||||||
""",
|
""",
|
||||||
'depends': [
|
'depends': [
|
||||||
|
'base',
|
||||||
'account',
|
'account',
|
||||||
|
'l10n_multilang',
|
||||||
'app_odoo_customize',
|
'app_odoo_customize',
|
||||||
],
|
],
|
||||||
'images': ['static/description/banner.png'],
|
'images': ['static/description/banner.png'],
|
||||||
|
|||||||
Reference in New Issue
Block a user