From 5aa0ee7c012fd8d262f749221bea875397524249 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Sat, 14 Feb 2026 16:42:05 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
soong_workflow/models/soong_workflow_record.py | 2 +-
yuthon_hr_employee/views/yuthon_medical_manage_views.xml | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/soong_workflow/models/soong_workflow_record.py b/soong_workflow/models/soong_workflow_record.py
index d8097a349..e830c5f12 100644
--- a/soong_workflow/models/soong_workflow_record.py
+++ b/soong_workflow/models/soong_workflow_record.py
@@ -177,7 +177,7 @@ class SoongWorkflowRecord(models.Model):
def _search_is_done(self, operator, value):
current_uid = self.env.user.id
base_domain = [
- ('soong_state', '=', 'done'),
+ ('soong_state', 'in', ['done', 'to_active', 'active']),
('reclaim_state', '=', False),
('users_ids', 'in', current_uid)
]
diff --git a/yuthon_hr_employee/views/yuthon_medical_manage_views.xml b/yuthon_hr_employee/views/yuthon_medical_manage_views.xml
index 8d7435a78..6477725d2 100644
--- a/yuthon_hr_employee/views/yuthon_medical_manage_views.xml
+++ b/yuthon_hr_employee/views/yuthon_medical_manage_views.xml
@@ -4,16 +4,16 @@
yuthon.medical.manage.tree
yuthon.medical.manage
-
+
+
-
From b066b6fd7701d9da6c8dba4a06ce44e5e781c87f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Sat, 14 Feb 2026 17:06:07 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../models/property_tenant_information.py | 47 ++++++++++++++++---
.../models/yuthon_property_setting.py | 2 +-
yuthon_property/security/ir.model.access.csv | 3 +-
.../property_tenant_information_views.xml | 21 +++++++--
4 files changed, 61 insertions(+), 12 deletions(-)
diff --git a/yuthon_property/models/property_tenant_information.py b/yuthon_property/models/property_tenant_information.py
index 4bf956de9..40b94e180 100644
--- a/yuthon_property/models/property_tenant_information.py
+++ b/yuthon_property/models/property_tenant_information.py
@@ -1,5 +1,5 @@
from odoo import models, fields, api
-
+from datetime import date
class PropertyTenantInformation(models.Model):
_name = 'property.tenant.information'
@@ -14,10 +14,6 @@ class PropertyTenantInformation(models.Model):
home_phone = fields.Char(string='座机')
email = fields.Char(string='电子邮箱')
address = fields.Char(string='送达地址')
- scope_business = fields.Char(string='经营范围')
- invoicing_type = fields.Selection([('spot', '专票'), ('cape', '普票')], string="开票类型")
- invoicing_begins = fields.Char(string="开票抬头")
- tax_number = fields.Char(string="税号")
card = fields.Char(string="身份号")
industry_id = fields.Many2one('yuthon.industry.setting', string='行业')
start_date = fields.Date(string="生效日期")
@@ -27,7 +23,12 @@ class PropertyTenantInformation(models.Model):
power_attorney_id = fields.Many2one('ir.attachment', string='委托代理书')
attorne_card_id = fields.Many2one('ir.attachment', string='委托代理人身份证')
bank_ids = fields.One2many('property.bank.line', 'tenant_id', string='银行信息')
+ invoicing_ids = fields.One2many('invoicing.information.line', 'tenant_id', string='开票信息')
kingdee_tenant_id = fields.Char(string='金蝶云承租方id')
+ scope_business = fields.Char(string="经营范围", compute='_compute_invoicing_fields',store=True)
+ invoicing_type = fields.Selection([('spot', '专票'), ('cape', '普票')], string="开票类型", compute='_compute_invoicing_fields', store=True)
+ tax_number = fields.Char(string="税号", compute='_compute_invoicing_fields', store=True)
+ invoicing_begins = fields.Char( string="开票抬头", compute='_compute_invoicing_fields', store=True)
def update_tenant_wizard(self):
return {
@@ -47,6 +48,27 @@ class PropertyTenantInformation(models.Model):
if bank_id.name == False and bank_id.user == False and bank_id.bank == False:
bank_id.unlink()
+ @api.depends('invoicing_ids', 'invoicing_ids.start_date', 'invoicing_ids.end_date',
+ 'invoicing_ids.scope_business', 'invoicing_ids.invoicing_type',
+ 'invoicing_ids.tax_number', 'invoicing_ids.invoicing_begins')
+ def _compute_invoicing_fields(self):
+ today = date.today()
+ for record in self:
+ scope_business = invoicing_type = tax_number = invoicing_begins = ""
+ active_lines = record.invoicing_ids.filtered(lambda l: l.start_date and l.start_date <= today and (not l.end_date or l.end_date >= today)
+ )
+ if active_lines:
+ latest_line = active_lines.sorted(key=lambda l: l.start_date, reverse=True)[0]
+ scope_business = latest_line.scope_business or ""
+ invoicing_type = latest_line.invoicing_type or ""
+ tax_number = latest_line.tax_number or ""
+ invoicing_begins = latest_line.invoicing_begins or ""
+
+ record.scope_business = scope_business
+ record.invoicing_type = invoicing_type
+ record.tax_number = tax_number
+ record.invoicing_begins = invoicing_begins
+
class PropertyBankLine(models.Model):
_name = 'property.bank.line'
_description = '银行账户明细'
@@ -54,4 +76,17 @@ class PropertyBankLine(models.Model):
tenant_id = fields.Many2one('property.tenant.information', string='关联承租方信息')
name = fields.Char(string="开户行")
user = fields.Char(string="用户")
- bank = fields.Char(string="银行账号")
\ No newline at end of file
+ bank = fields.Char(string="银行账号")
+
+
+class InvoicingInformationLine(models.Model):
+ _name = 'invoicing.information.line'
+ _description = '开票信息明细'
+
+ tenant_id = fields.Many2one('property.tenant.information', string='关联承租方信息')
+ scope_business = fields.Char(string="经营范围")
+ invoicing_type = fields.Selection([('spot', '专票'), ('cape', '普票')], string="开票类型")
+ invoicing_begins = fields.Char(string="开票抬头")
+ tax_number = fields.Char(string="税号")
+ start_date = fields.Date(string="生效日期")
+ end_date = fields.Date(string="失效日期")
\ No newline at end of file
diff --git a/yuthon_property/models/yuthon_property_setting.py b/yuthon_property/models/yuthon_property_setting.py
index 3610cdf11..0c23dce0a 100644
--- a/yuthon_property/models/yuthon_property_setting.py
+++ b/yuthon_property/models/yuthon_property_setting.py
@@ -15,7 +15,7 @@ class YuthonTariffSetting(models.Model):
_description = '税率配置'
name = fields.Char(string="名称")
- ratio = fields.Float(string="比例")
+ ratio = fields.Float(string="比例", digits=(16, 4))
class PropertyAccountSetting(models.Model):
diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv
index 478838827..3f9f14f49 100644
--- a/yuthon_property/security/ir.model.access.csv
+++ b/yuthon_property/security/ir.model.access.csv
@@ -101,4 +101,5 @@ access_meter_archives_line, meter.archives.line,model_meter_archives_line,base.g
access_meter_water_line, meter.water.line,model_meter_water_line,base.group_user,1,1,1,1
access_yuthon_epitope_values, yuthon.epitope.values,model_yuthon_epitope_values,base.group_user,1,1,1,1
access_task_push_wizard,task.push.wizard,model_task_push_wizard,base.group_user,1,1,1,1
-access_utility_meter_wizard,utility.meter.wizard,model_utility_meter_wizard,base.group_user,1,1,1,1
\ No newline at end of file
+access_utility_meter_wizard,utility.meter.wizard,model_utility_meter_wizard,base.group_user,1,1,1,1
+access_invoicing_information_line,invoicing.information.line,model_invoicing_information_line,base.group_user,1,1,1,1
\ No newline at end of file
diff --git a/yuthon_property/views/property_tenant_information_views.xml b/yuthon_property/views/property_tenant_information_views.xml
index 73fd2b39c..d7a60cde0 100644
--- a/yuthon_property/views/property_tenant_information_views.xml
+++ b/yuthon_property/views/property_tenant_information_views.xml
@@ -40,11 +40,11 @@
-
+
-
-
-
+
+
+
@@ -62,6 +62,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+