添加功能
This commit is contained in:
@@ -49,8 +49,8 @@
|
||||
<group>
|
||||
<field name="name" placeholder="请输入标题"/>
|
||||
<field name="resource_ids" widget="many2many_tags" invisible="1" />
|
||||
<field name="alternate_shifts"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="alternate_shifts"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="is_issues" invisible="is_issues == False"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
@@ -62,15 +62,15 @@
|
||||
<group string="换班1" invisible="alternate_shifts == 'alternate'">
|
||||
<label for="resource_id"/>
|
||||
<div>
|
||||
<field name="resource_id" class="oe_inline"/>日期
|
||||
<field name="shift_date" class="oe_inline"/>我的班次:
|
||||
<field name="resource_id" class="oe_inline"/>
|
||||
<field name="shift_date" class="oe_inline"/>
|
||||
<field name="shift_id" class="oe_inline" invisible="shift_rest" readonly="1"/>
|
||||
<field name="shift_rest" class="oe_inline" invisible="shift_id or shift_date == False"/>
|
||||
</div>
|
||||
<label for="transferees_id"/>
|
||||
<div>
|
||||
<field name="transferees_id" class="oe_inline"/>日期
|
||||
<field name="return_date" class="oe_inline"/>对方班次:
|
||||
<field name="transferees_id" class="oe_inline"/>
|
||||
<field name="return_date" class="oe_inline"/>
|
||||
<field name="return_id" class="oe_inline" invisible="return_rest" readonly="1"/>
|
||||
<field name="return_rest" class="oe_inline" invisible="return_id or return_date == False" />
|
||||
</div>
|
||||
@@ -79,8 +79,8 @@
|
||||
<label for="resource_id"/>
|
||||
<div>
|
||||
<field name="resource_id" class="oe_inline"/>顶
|
||||
<field name="alternate_id" class="oe_inline"/>日期:
|
||||
<field name="return_date" class="oe_inline"/>对方班次:
|
||||
<field name="alternate_id" class="oe_inline"/>
|
||||
<field name="return_date" class="oe_inline"/>
|
||||
<field name="return_id" class="oe_inline" invisible="return_rest" readonly="1"/>
|
||||
<field name="return_rest" class="oe_inline" invisible="return_id or return_date == False"/>
|
||||
</div>
|
||||
@@ -88,8 +88,8 @@
|
||||
<group string="换班2" invisible="alternate_shifts == 'alternate'">
|
||||
<label for="resource_id"/>
|
||||
<div>
|
||||
<field name="resource_id" class="oe_inline"/>日期
|
||||
<field name="shift_two_date" class="oe_inline"/>我的班次:
|
||||
<field name="resource_id" class="oe_inline"/>
|
||||
<field name="shift_two_date" class="oe_inline"/>
|
||||
<field name="shift_two_id" class="oe_inline" readonly="1" invisible="shift_two_rest"
|
||||
context="{'tree_view_ref': 'yuthon_hr_attendance.view_yuthon_shift_context',
|
||||
'search_view_ref': 'yuthon_hr_attendance.search_yuthon_shift_context',
|
||||
@@ -100,8 +100,8 @@
|
||||
</div>
|
||||
<label for="transferees_id"/>
|
||||
<div>
|
||||
<field name="transferees_id" class="oe_inline"/>日期
|
||||
<field name="return_two_date" class="oe_inline"/>对方班次:
|
||||
<field name="transferees_id" class="oe_inline"/>
|
||||
<field name="return_two_date" class="oe_inline"/>
|
||||
<field name="return_two_id" class="oe_inline" readonly="1" invisible="return_two_rest"
|
||||
context="{'tree_view_ref': 'yuthon_hr_attendance.view_yuthon_shift_context',
|
||||
'search_view_ref': 'yuthon_hr_attendance.search_yuthon_shift_context',
|
||||
|
||||
@@ -108,8 +108,6 @@ class PropertyReconciliationWizard(models.Model):
|
||||
'remake': penalty.remark,
|
||||
})
|
||||
start_time = self.bank_id.start_time
|
||||
first_day_of_last_month = (start_time.replace(day=1) - relativedelta(months=1))
|
||||
last_day_of_last_month = start_time.replace(day=1) - relativedelta(days=1)
|
||||
contract_receivables_ids = self.env['property.accounts.receivable'].search([
|
||||
('contract_id', '=', '租(2024)100号'),
|
||||
('is_reconciliation', '=', False),
|
||||
@@ -316,6 +314,7 @@ class PropertyReconciliationWizard(models.Model):
|
||||
:return:
|
||||
"""
|
||||
remaining_amount = self.bank_id.no_amount
|
||||
penalty_lines = [line for line in self.reconciliation_line_ids if line.collection_type == "penalty"] # 违约金行
|
||||
deposit_lines = [line for line in self.reconciliation_line_ids if line.collection_type == "deposit"] # 押金行
|
||||
rent_lines = [line for line in self.reconciliation_line_ids if line.collection_type == "rent"] # 租金行
|
||||
other_lines = [line for line in self.reconciliation_line_ids if line.collection_type not in ["deposit", "rent"]]
|
||||
@@ -363,6 +362,13 @@ class PropertyReconciliationWizard(models.Model):
|
||||
remaining_amount -= assign_amount
|
||||
line.onchange_remake()
|
||||
|
||||
for line in penalty_lines:
|
||||
line.color = 'blue'
|
||||
|
||||
for line in rent_lines:
|
||||
line.color = 'success'
|
||||
|
||||
|
||||
def confirm(self):
|
||||
collection_type_mapping = {
|
||||
'deposit': '押金',
|
||||
@@ -576,6 +582,7 @@ class PropertyReconciliationLine(models.Model):
|
||||
collection_type = fields.Selection([('deposit', '押金'), ('rent', '租金'), ('water_fee', '水费'), ('lightbox', '灯箱'), ('guanzijian', '管子间'),
|
||||
('electricity_fee', '电费'), ('penalty', '违约金'), ('management_fee', '管理费'), ('repair_fee', '维修费'), ('fee', '人工费/日光灯款/代垫用料费')], string='收款类型', store=True)
|
||||
remake = fields.Text(string='备注')
|
||||
color = fields.Selection([('success', '绿'), ('blue', '蓝')], string='颜色')
|
||||
|
||||
@api.depends('contract_id')
|
||||
def _compute_property_name(self):
|
||||
|
||||
@@ -48,12 +48,16 @@
|
||||
<field name="reconciliation_line_ids">
|
||||
<tree editable="bottom" create="false" delete="false">
|
||||
<field name="sequence" column_invisible="1" />
|
||||
<field name="color" column_invisible="1" force_save="1"/>
|
||||
<field name="reconciliation_id" column_invisible="1"/>
|
||||
<field name="property_ids" readonly="1" column_invisible="1"/>
|
||||
<field name="contract_id" readonly="1" force_save="1"/>
|
||||
<field name="property_name"/>
|
||||
<field name="due_date" readonly="1" force_save="1"/>
|
||||
<field name="collection_type" readonly="1" force_save="1"/>
|
||||
<field name="collection_type" readonly="1" force_save="1"
|
||||
decoration-success="color == 'success'"
|
||||
decoration-info="color == 'blue'"
|
||||
/>
|
||||
<field name="rent_month" sum = "Total" readonly="1" force_save="1"/>
|
||||
<field name="rent" sum = "Total" readonly="1" force_save="1"/>
|
||||
<field name="amount" sum = "Total" force_save="1" options='{"fg_color": "red: amount != false;" }'/>
|
||||
|
||||
Reference in New Issue
Block a user