update cn account

This commit is contained in:
ivan deng
2018-11-07 09:16:03 +08:00
parent 08726c632c
commit 30e4919370
42 changed files with 831 additions and 387 deletions

View File

@@ -16,14 +16,14 @@
# description:
{
'name': '12 Ready!! App Odoo Customize(Backend Debranding Title,Language,Documentation,Quick Debug,Clear Data)',
'version': '11.0.9.25',
'version': '11.0.11.07',
'author': 'Sunpop.cn',
'category': 'Productivity',
'website': 'http://www.sunpop.cn',
'license': 'AGPL-3',
'sequence': 2,
'summary': """
Keyword: odoo debrand, odoo debranding, customize my odoo.
odoo debrand, odoo debranding, customize my odoo.
Quick customize and debranding your own Odoo. Quick debug, Language Switcher, Online Documentation Access,Delete test data.
""",
'description': """
@@ -53,6 +53,7 @@ You can config odoo, make it look like your own platform.
18. Show/Hide Author and Website in Apps Dashboard
19. One Click to clear all data (Sometime pls click twice)
20. Show quick upgrade in app dashboard
21. Can clear and reset account chart. Be cautious.
This module can help to white label the Odoo.
Also helpful for training and support for your odoo end-user.

View File

@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Project-Id-Version: Odoo Server 11.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-29 20:12+0000\n"
"PO-Revision-Date: 2018-09-29 20:12+0000\n"
"POT-Creation-Date: 2018-11-06 21:08+0000\n"
"PO-Revision-Date: 2018-11-06 21:08+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -64,6 +64,11 @@ msgstr "取消"
msgid "Check to stop Odoo Subscribe function"
msgstr "选中可停止odoo内置的用户消息订阅"
#. module: app_odoo_customize
#: model:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Clean and reset Account Chart"
msgstr "清除会计科目,便于重置"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_create_uid
msgid "Created by"
@@ -201,7 +206,7 @@ msgstr "最后修改时间"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_write_uid
msgid "Last Updated by"
msgstr "最后更新"
msgstr "最后更新"
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_app_theme_config_settings_write_date

View File

@@ -28,7 +28,7 @@ class AppThemeConfigSettings(models.TransientModel):
group_show_author_in_apps = fields.Boolean(string="Show Author and Website in Apps Dashboard", implied_group='app_odoo_customize.group_show_author_in_apps',
help=u"Uncheck to Hide Author and Website in Apps Dashboard")
group_show_quick_upgrade = fields.Boolean(string="Show Quick Upgrade in Apps Dashboard", implied_group='app_odoo_customize.group_show_quick_upgrade',
help=u"Uncheck to show normal install in Apps Dashboard")
help=u"Uncheck to show normal install in Apps Dashboard")
app_documentation_url = fields.Char('Documentation Url')
app_documentation_dev_url = fields.Char('Developer Documentation Url')
@@ -53,9 +53,9 @@ class AppThemeConfigSettings(models.TransientModel):
app_stop_subscribe = True if ir_config.sudo().get_param('app_stop_subscribe') == "True" else False
app_documentation_url = ir_config.sudo().get_param('app_documentation_url',
default='http://www.sunpop.cn/documentation/user/10.0/en/index.html')
default='http://www.sunpop.cn/documentation/user/10.0/en/index.html')
app_documentation_dev_url = ir_config.sudo().get_param('app_documentation_dev_url',
default='http://www.sunpop.cn/documentation/10.0/index.html')
default='http://www.sunpop.cn/documentation/10.0/index.html')
app_support_url = ir_config.sudo().get_param('app_support_url', default='http://www.sunpop.cn/trial/')
app_account_title = ir_config.sudo().get_param('app_account_title', default='My Online Account')
app_account_url = ir_config.sudo().get_param('app_account_url', default='http://www.sunpop.cn/my-account/')
@@ -153,7 +153,7 @@ class AppThemeConfigSettings(models.TransientModel):
sql = "update ir_sequence set number_next=1 where code ='product.product';"
self._cr.execute(sql)
except Exception as e:
pass # raise Warning(e)
pass
return True
def remove_product_attribute(self):
@@ -170,7 +170,7 @@ class AppThemeConfigSettings(models.TransientModel):
sql = "delete from %s" % obj._table
self._cr.execute(sql)
except Exception as e:
pass # raise Warning(e)
pass
return True
@api.multi
@@ -196,7 +196,7 @@ class AppThemeConfigSettings(models.TransientModel):
sql = "update ir_sequence set number_next=1 where code ='pos.order';"
self._cr.execute(sql)
except Exception as e:
pass # raise Warning(e)
pass
return True
@api.multi
@@ -224,7 +224,7 @@ class AppThemeConfigSettings(models.TransientModel):
sql = "update ir_sequence set number_next=1 where code ='purchase.order';"
self._cr.execute(sql)
except Exception as e:
pass # raise Warning(e)
pass
return True
@api.multi
@@ -258,7 +258,7 @@ class AppThemeConfigSettings(models.TransientModel):
sql = "update ir_sequence set number_next=1 where (code ='mrp.production' or code ='mrp.unbuild');"
self._cr.execute(sql)
except Exception as e:
pass # raise Warning(e)
pass
return True
@api.multi
@@ -276,7 +276,7 @@ class AppThemeConfigSettings(models.TransientModel):
sql = "delete from %s" % obj._table
self._cr.execute(sql)
except Exception as e:
pass # raise Warning(e)
pass
return True
@api.multi
@@ -342,7 +342,7 @@ class AppThemeConfigSettings(models.TransientModel):
");"
self._cr.execute(sql)
except Exception as e:
pass # raise Warning(e)
pass
return True
@api.multi
@@ -351,8 +351,8 @@ class AppThemeConfigSettings(models.TransientModel):
# 清除财务会计单据
['account.voucher.line', ],
['account.voucher', ],
['account.bank.statement', ],
['account.bank.statement.line', ],
['account.bank.statement', ],
['account.payment', ],
['account.analytic.line', ],
['account.invoice.line', ],
@@ -407,7 +407,40 @@ class AppThemeConfigSettings(models.TransientModel):
");"
self._cr.execute(sql)
except Exception as e:
pass # raise Warning(e)
pass
return True
@api.multi
def remove_account_chart(self):
to_removes = [
# 清除财务科目,用于重设
['account.tax.account.tag', ],
['account.tax', ],
['account.account.account.tag', ],
['wizard_multi_charts_accounts'],
['account.account', ],
['account.journal', ],
]
try:
for line in to_removes:
obj_name = line[0]
obj = self.pool.get(obj_name)
if obj:
sql = "delete from %s" % obj._table
self._cr.execute(sql)
# reset default tax不管多公司
field1 = self.env['ir.model.fields']._get('product.template', "taxes_id").id
field2 = self.env['ir.model.fields']._get('product.template', "supplier_taxes_id").id
sql = ("delete from ir_default where field_id = %s or field_id = %s") % (field1, field2)
self._cr.execute(sql)
sql = "update res_company set chart_template_id=null ;"
self._cr.execute(sql)
# 更新序号
except Exception as e:
pass
return True
@api.multi
@@ -428,7 +461,7 @@ class AppThemeConfigSettings(models.TransientModel):
self._cr.execute(sql)
# 更新序号
except Exception as e:
pass # raise Warning(e)
pass
return True
@api.multi
@@ -446,7 +479,7 @@ class AppThemeConfigSettings(models.TransientModel):
sql = "delete from %s" % obj._table
self._cr.execute(sql)
except Exception as e:
pass # raise Warning(e)
pass
return True
@api.multi
@@ -465,7 +498,7 @@ class AppThemeConfigSettings(models.TransientModel):
self._cr.execute(sql)
except Exception as e:
pass # raise Warning(e)
pass
return True
@api.multi
@@ -479,5 +512,5 @@ class AppThemeConfigSettings(models.TransientModel):
self.remove_project()
self.remove_message()
except Exception as e:
pass # raise Warning(e)
pass
return True

View File

@@ -6,6 +6,8 @@
<p>This moduld allows user to quickly customize and debranding Odoo. Quick debug, Language Switcher,
Online Documentation Access,Quick Data Clear. </p>
<p>Support Odoo 12, 11, 10, 9. Including communicate and enterprise version. </p>
<h3>Update: v11.0.11.07</h3>
<p>Add 21. Reset Account Chart.</p>
<h3>Update: v11.0.9.30</h3>
<p>Add 20. Show quick upgrade in app dashboard</p>
<h3>Update: v11.0.9.25</h3>

View File

@@ -128,6 +128,9 @@
<div class="mb4">
<button string="Delete All Voucher/Invoice/Bill" type="object" name="remove_account"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
<button string="Clean and reset Account Chart" type="object" name="remove_account_chart"
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
</div>
<label string="Project"/>
<div class="mb4">