diff --git a/app_base_chinese/data/res_lang_data.xml b/app_base_chinese/data/res_lang_data.xml index aa6cfa0f..2cbafeb0 100644 --- a/app_base_chinese/data/res_lang_data.xml +++ b/app_base_chinese/data/res_lang_data.xml @@ -4,7 +4,7 @@ %Y-%m-%d - %H:%M + %H:%M:%S diff --git a/app_base_chinese/models/res_company.py b/app_base_chinese/models/res_company.py index a583db0d..06892a0b 100644 --- a/app_base_chinese/models/res_company.py +++ b/app_base_chinese/models/res_company.py @@ -9,9 +9,9 @@ class ResCompany(models.Model): short_name = fields.Char('Short Name', related='partner_id.short_name', readonly=False) - # 当传参 show_short_name 时,只显示简称 + # 当传参 show_short_company 时,只显示简称 def name_get(self): - if self._context.get('show_short_name'): + if self._context.get('show_short_company'): return [(value.id, "%s" % (value.short_name if value.short_name else value.name)) for value in self] else: return super().name_get() diff --git a/app_odoo_customize/models/res_config_settings.py b/app_odoo_customize/models/res_config_settings.py index b8fb908f..18619df4 100644 --- a/app_odoo_customize/models/res_config_settings.py +++ b/app_odoo_customize/models/res_config_settings.py @@ -127,9 +127,9 @@ class ResConfigSettings(models.TransientModel): sql = "delete from %s" % t_name try: self._cr.execute(sql) - self._cr.commit() except Exception as e: _logger.error('remove data error: %s,%s', line, e) + self._cr.commit() # 更新序号 for line in s: domain = [('code', '=ilike', line + '%')] @@ -288,15 +288,15 @@ class ResConfigSettings(models.TransientModel): to_removes = [ # 清除财务会计单据 'payment.transaction', - 'account.voucher.line', - 'account.voucher', + # 'account.voucher.line', + # 'account.voucher', + # 'account.invoice.line', + # 'account.invoice.refund', + # 'account.invoice', 'account.bank.statement.line', 'account.payment', 'account.analytic.line', 'account.analytic.account', - 'account.invoice.line', - 'account.invoice.refund', - 'account.invoice', 'account.partial.reconcile', 'account.move.line', 'hr.expense.sheet', diff --git a/app_product_superbar/models/product_category.py b/app_product_superbar/models/product_category.py index f948c048..de355a17 100644 --- a/app_product_superbar/models/product_category.py +++ b/app_product_superbar/models/product_category.py @@ -22,7 +22,7 @@ class ProductCategory(models.Model): # 更新 complete_name 算法,当有context: show_short =1 时,只显示短名 def name_get(self): - if self._context.get('show_short'): + if self._context.get('show_short_category'): new_res = [] for category in self: name = category.name diff --git a/app_product_ztree/models/product_category.py b/app_product_ztree/models/product_category.py index f948c048..29143d10 100644 --- a/app_product_ztree/models/product_category.py +++ b/app_product_ztree/models/product_category.py @@ -20,9 +20,9 @@ from odoo import api, fields, models, exceptions, _ class ProductCategory(models.Model): _inherit = 'product.category' - # 更新 complete_name 算法,当有context: show_short =1 时,只显示短名 + # 更新 complete_name 算法,当有context: show_short_category =1 时,只显示短名 def name_get(self): - if self._context.get('show_short'): + if self._context.get('show_short_category'): new_res = [] for category in self: name = category.name