From 2fcd04c2163d785b870198e8f07ee4d0b248a114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Mon, 24 Feb 2025 10:53:39 +0800 Subject: [PATCH] 1 --- preview_easy/controllers/preview.py | 12 ++-- .../views/soong_hr_employee_views.xml | 12 +--- .../models/property_accounts_receivable.py | 6 +- .../models/property_electric_reading.py | 4 +- .../models/property_water_reading.py | 4 +- .../property_accounts_receivable_views.xml | 28 +-------- .../views/inherit_yuthon_property_views.xml | 60 +------------------ .../views/property_menu_all.xml | 35 +---------- 8 files changed, 21 insertions(+), 140 deletions(-) diff --git a/preview_easy/controllers/preview.py b/preview_easy/controllers/preview.py index 038922e54..33154faf5 100644 --- a/preview_easy/controllers/preview.py +++ b/preview_easy/controllers/preview.py @@ -29,12 +29,12 @@ class preview(http.Controller): if attach.mimetype in image or attach.mimetype in video or attach.mimetype in pdf or attach.mimetype in html or attach.mimetype in txt: headers = [('Content-Type', attach.mimetype)] return werkzeug.wrappers.Response(attach.raw, status=200, headers=headers) - elif attach.mimetype in word: - with io.BytesIO(attach.raw) as file: - result = mammoth.convert_to_html(file) - html = result.value - return template.render(html=html) - elif attach.mimetype in excel: + # elif attach.mimetype in word: + # with io.BytesIO(attach.raw) as file: + # result = mammoth.convert_to_html(file) + # html = result.value + # return template.render(html=html) + elif attach.mimetype in [excel, word]: office_view_url = 'http://view.officeapps.live.com/op/view.aspx?src=' base_url = request.env['ir.config_parameter'].sudo().get_param('web.base.url') html = f'{office_view_url}{quote(base_url + "/web/content/office_preview/" + str(attach.id))}' diff --git a/soong_workflow/views/soong_hr_employee_views.xml b/soong_workflow/views/soong_hr_employee_views.xml index d8fb4199e..28b73e92a 100644 --- a/soong_workflow/views/soong_hr_employee_views.xml +++ b/soong_workflow/views/soong_hr_employee_views.xml @@ -14,6 +14,7 @@ + hr.employee.inherit.del.form hr.employee @@ -24,15 +25,4 @@ - - - inherit.view.employee.filter - hr.employee - - - - - - - \ No newline at end of file diff --git a/yuthon_property/models/property_accounts_receivable.py b/yuthon_property/models/property_accounts_receivable.py index 641c1a863..00c959eff 100644 --- a/yuthon_property/models/property_accounts_receivable.py +++ b/yuthon_property/models/property_accounts_receivable.py @@ -24,16 +24,14 @@ class PropertyAccountsReceivable(models.Model): discount_amount = fields.Float(string='减免金额') multiplier = fields.Integer(string='季度') remark = fields.Text(string='备注') - is_invalid = fields.Boolean(string='作废') - is_red = fields.Boolean(string='红冲') red_date = fields.Date(string='红冲日期') charge_status = fields.Selection([('unpaid', '未收'), ('fully_paid', '已收')], string='收费状态') - is_invoice = fields.Boolean(string='开票') is_suspend = fields.Boolean(string='挂起') create_time = fields.Datetime(string='创建时间', default=fields.Datetime.now) - condition = fields.Selection([('red', '红冲'), ('invalid', '作废')], string='状态') is_billing = fields.Boolean(string='开票') is_reconciliation = fields.Boolean(string='对账') + is_invalid = fields.Boolean(string='作废') + is_red = fields.Boolean(string='红冲') is_push = fields.Boolean(string='已推送') management_type_id = fields.Many2one('yuthon.management.type', string='应收类型') last_update_time = fields.Datetime(string='最后修改时间') diff --git a/yuthon_property/models/property_electric_reading.py b/yuthon_property/models/property_electric_reading.py index dd55b487c..b581c4532 100644 --- a/yuthon_property/models/property_electric_reading.py +++ b/yuthon_property/models/property_electric_reading.py @@ -19,10 +19,10 @@ class PropertyElectricReading(models.Model): other = fields.Char(string='其他') billing_period = fields.Date(string='账期') meter_date= fields.Date(string='抄表年月') - last_dosage = fields.Float(string='上次') + last_dosage = fields.Float(string='上次用量') maximum_count = fields.Float(string='最大计数', default=999999) last_meter = fields.Date(string='上次抄表日期') - current_meter = fields.Float(string='本次', tracking=True) + current_meter = fields.Float(string='本次用量', tracking=True) fee_id = fields.Many2one('yuthon.water.setting', string="收费标准") price_unit = fields.Float(string='单价') ratio = fields.Float(string='倍率') diff --git a/yuthon_property/models/property_water_reading.py b/yuthon_property/models/property_water_reading.py index ac4cbf9df..17a670b38 100644 --- a/yuthon_property/models/property_water_reading.py +++ b/yuthon_property/models/property_water_reading.py @@ -21,9 +21,9 @@ class PropertyWaterReading(models.Model): other = fields.Char(string='其他') billing_period = fields.Date(string='账期') meter_date= fields.Date(string='抄表年月') - last_dosage = fields.Float(string='上次') + last_dosage = fields.Float(string='上次用量') last_meter = fields.Date(string='上次抄表日期') - current_meter = fields.Float(string='本次', tracking=True) + current_meter = fields.Float(string='本次用量', tracking=True) fee_id = fields.Many2one('yuthon.water.setting', string="收费标准") price_unit = fields.Float(string='单价') ratio = fields.Float(string='倍率') diff --git a/yuthon_property/views/property_accounts_receivable_views.xml b/yuthon_property/views/property_accounts_receivable_views.xml index 3f95c49a9..4495eece2 100644 --- a/yuthon_property/views/property_accounts_receivable_views.xml +++ b/yuthon_property/views/property_accounts_receivable_views.xml @@ -19,32 +19,8 @@ - -