add translatetion fix
This commit is contained in:
ivan deng
2017-12-02 05:56:35 +08:00
parent 4c3faf59a6
commit cc74ec9a92
6 changed files with 31 additions and 3 deletions

View File

@@ -2,3 +2,4 @@
import ir_ui_view
import app_theme_config_settings
import base_language_install

View File

@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Jarvis (www.odoomod.com)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models, _
class BaseLanguageInstall(models.TransientModel):
_inherit = "base.language.install"
@api.multi
def lang_install(self):
self.ensure_one()
self.env.cr.execute("""
delete from ir_translation
where (name='ir.module.module,shortdesc'
or name='ir.module.module,description'
or name='ir.module.module,summary')
and lang=%s
""", (self.lang,))
return super(BaseLanguageInstall, self).lang_install()

View File

@@ -17,7 +17,7 @@ You can config odoo, make it look like your own platform.
13. Change Powered by Odoo in login screen.(Please change '../views/app_odoo_customize_view.xml' #15)
14. Quick delete test data in Apps: Sales/POS/Purchase/MRP/Inventory/Accounting/Message/Workflow etc.
15. Reset All the Sequence to beginning of 1: SO/PO/MO/Invoice...
16. Fix odoo reload module translation bug while enable english language
This module can help to white label the Odoo.
Also helpful for training and support for your odoo end-user.
The user can get the help document just by one click.
@@ -42,6 +42,7 @@ http://www.sunpop.cn
13. 自定义登陆界面中的 Powered by Odoo
14. 快速删除测试数据,支持模块包括:销售/POS门店/采购/生产/库存/会计/消息与工作流等.
15. 将各类单据的序号重置从1开始包括SO/PO/MO/Invoice 等
16. 修复odoo启用英文后模块显示的Bug
使用方法:将解压后的 app_odoo_customize 放到 odoo的 addons目录下激活开发者模式应用-->更新应用列表,
找到 "App odoo Customize"模块,安装即可。

View File

@@ -22,6 +22,8 @@
<li>13.Change Powered by Odoo in login screen.(Please change '../views/app_odoo_customize_view.xml' #15)</li>
<li>14.Quick delete test data in Apps: Sales/POS/Purchase/MRP/Inventory/Accounting/Base Models.</li>
<li>15.Reset All the Sequence to beginning of 1: SO/PO/MO/Invoice...</li>
<li>16.Fix odoo reload module translation bug while enable english language
</li>
</ul>
<p>
This module can help to white label the Odoo.

View File

@@ -8,7 +8,7 @@
<field name="code">product.product</field>
<field name="prefix">P%(y)s%(month)s</field>
<field name="padding">5</field>
<!--<field name="company_id" ref="base.main_company"/>-->
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的成品 manufactured Products. -->
@@ -17,6 +17,7 @@
<field name="code">product.product</field>
<field name="prefix">D%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 制造的原料 Components.-->
@@ -25,6 +26,7 @@
<field name="code">product.product</field>
<field name="prefix">C%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>
<!-- 采购的成品 Sourced Products.-->
@@ -33,6 +35,7 @@
<field name="code">product.product</field>
<field name="prefix">S%(y)s%(month)s</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
<field name="initial">True</field>
</record>

View File

@@ -3,7 +3,7 @@
<record model="ir.rule" id="product_internal_type_comp_rule">
<field name="name">Product Internal Type multi-company</field>
<field name="model_id" ref="app_product_sequence.model_product_internal_type"/>
<!--<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>-->
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
<field name="perm_read" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_write" eval="1"/>