diff --git a/yuthon_property/models/property_accounts_receivable.py b/yuthon_property/models/property_accounts_receivable.py
index b2fd7bbdc..4b7ebadf3 100644
--- a/yuthon_property/models/property_accounts_receivable.py
+++ b/yuthon_property/models/property_accounts_receivable.py
@@ -15,11 +15,8 @@ class PropertyAccountsReceivable(models.Model):
due_date = fields.Date(string='应收开始')
due_date_end = fields.Date(string='应收结束')
reconciliation_time = fields.Datetime('对账时间')
- year = fields.Selection(selection=[(str(i), str(i)) for i in range(2024, 2060)], string='所属年', )
- month = fields.Selection([('1', '一月'), ('2', '二月'), ('3', '三月'), ('4', '四月'),
- ('5', '五月'), ('6', '六月'), ('7', '七月'), ('8', '八月'),
- ('9', '九月'), ('10', '十月'), ('11', '十一月'),
- ('12', '十二月')], string='选择月份')
+ month_id = fields.Many2one('base.month', string='月份', compute="_compute_display_date", store=True)
+ year_id = fields.Many2one('base.year', string='年份', compute="_compute_display_date", store=True)
original_amount = fields.Float(string='当期金额')
discount_amount = fields.Float(string='减免金额')
discount_date = fields.Date(string='减免日期')
@@ -69,6 +66,18 @@ class PropertyAccountsReceivable(models.Model):
record.due_date = record.due_date_end
record.due_date_end = None
+ @api.depends('due_date')
+ def _compute_display_date(self):
+ for rec in self:
+ if rec.due_date:
+ month_id = rec.env['base.month'].search([('name', '=', int(rec.due_date.month))])
+ rec.month_id = month_id.id if month_id else False
+ year_id = rec.env['base.year'].search([('name', '=', int(rec.due_date.year))])
+ rec.year_id = year_id.id if year_id else False
+ else:
+ rec.month_id = False
+ rec.year_id = False
+
@api.onchange('is_invalid')
def _onchange_is_invalid(self):
if self.is_invalid:
diff --git a/yuthon_property/models/property_tenant_information.py b/yuthon_property/models/property_tenant_information.py
index e1ae614ba..4bf956de9 100644
--- a/yuthon_property/models/property_tenant_information.py
+++ b/yuthon_property/models/property_tenant_information.py
@@ -27,6 +27,7 @@ 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='银行信息')
+ kingdee_tenant_id = fields.Char(string='金蝶云承租方id')
def update_tenant_wizard(self):
return {
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index 9aa56c0c4..48052d77d 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -96,6 +96,7 @@ class YuthonProperty(models.Model):
rent_unit = fields.Float(string='租金单价', igits=(6, 2))
property_type = fields.Selection([('property', '物业'), ('guanggao', '广告位'), ('guanzi', '管子间'), ('room', '机房'), ('base_station','基站'), ('other', '其他')], string="资产类型", default='property')
is_new = fields.Boolean(string="是否最新物业", compute= 'compute_is_new', default=True, store=True)
+ kingdee_property_id = fields.Char(string="金蝶云物业资产id")
def update_property_state(self):
today = date.today()
diff --git a/yuthon_property/models/yuthon_resource_mgmt_config.py b/yuthon_property/models/yuthon_resource_mgmt_config.py
index 1739f6a49..3e8e54b5e 100644
--- a/yuthon_property/models/yuthon_resource_mgmt_config.py
+++ b/yuthon_property/models/yuthon_resource_mgmt_config.py
@@ -111,6 +111,7 @@ class YuthonPropertyCompany(models.Model):
rent_account = fields.Char(string="收租公司账号")
start_data = fields.Date(string="开始日期")
end_data = fields.Date(string="结束日期")
+ kingdee_company_id = fields.Char(string="金蝶云物业公司id")
class YuthonIndustrySetting(models.Model):
diff --git a/yuthon_property/views/property_accounts_receivable_views.xml b/yuthon_property/views/property_accounts_receivable_views.xml
index 9180f2c38..8a4f91bcc 100644
--- a/yuthon_property/views/property_accounts_receivable_views.xml
+++ b/yuthon_property/views/property_accounts_receivable_views.xml
@@ -3,7 +3,7 @@
property.accounts.receivable.tree
property.accounts.receivable
-
diff --git a/yuthon_property/views/property_tenant_information_views.xml b/yuthon_property/views/property_tenant_information_views.xml
index 2b0ca718e..73fd2b39c 100644
--- a/yuthon_property/views/property_tenant_information_views.xml
+++ b/yuthon_property/views/property_tenant_information_views.xml
@@ -45,6 +45,7 @@
+
diff --git a/yuthon_property/views/yuthon_property_views.xml b/yuthon_property/views/yuthon_property_views.xml
index 98253023d..c81d7f92b 100644
--- a/yuthon_property/views/yuthon_property_views.xml
+++ b/yuthon_property/views/yuthon_property_views.xml
@@ -66,6 +66,7 @@
+
diff --git a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
index a7b4c663c..a5e93aa57 100644
--- a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
+++ b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
@@ -190,6 +190,7 @@
+
diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
index 7d4e4e946..eb74fa542 100644
--- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml
+++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
@@ -468,15 +468,20 @@
+
-
+
@@ -492,7 +497,7 @@
应收账单
property.accounts.receivable
tree
- {'search_default_group_by_contract_id': True}
+ {'search_default_group_company_id': True, 'group_by': ['company_id', 'due_date:year', 'due_date:month'], 'orderedBy': [{'name': 'due_date', 'asc': False}]}
@@ -501,6 +506,7 @@
property.accounts.receivable
tree
[('management_type_id.name','=', '违约金')]
+ {'search_default_group_company_id': True, 'group_by': ['company_id', 'due_date:year', 'due_date:month'], 'orderedBy': [{'name': 'due_date', 'asc': False}]}
@@ -508,7 +514,7 @@
押金列表
property.accounts.receivable
tree
- {'search_default_group_by_contract_id': True}
+ {'search_default_group_company_id': True, 'group_by': ['company_id', 'due_date:year', 'due_date:month'], 'orderedBy': [{'name': 'due_date', 'asc': False}]}
[('management_type_id.name','=', '押金')]