diff --git a/yuthon_property/models/property_bank_statements.py b/yuthon_property/models/property_bank_statements.py index 0ab93ac5b..c1f114129 100644 --- a/yuthon_property/models/property_bank_statements.py +++ b/yuthon_property/models/property_bank_statements.py @@ -50,7 +50,7 @@ class PropertyBankStatements(models.Model): @api.depends('yes_amount', 'original_amount') def _compute_no_amount(self): for rec in self: - rec.no_amount = rec.original_amount - rec.yes_amount + rec.no_amount = max((rec.original_amount - rec.yes_amount), 0) def update_lending_direction(self): bank_ids = self.env["property.bank.statements"].browse( diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index 7fe5c074b..afd21f693 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -818,7 +818,7 @@ class InheritHrPayslip(models.Model): "name": "薪资明细", "view_mode": "tree", "views": [(False, "tree")], - "domain": [("slip_id", "=", self.id), ("amount", "!=", 0)], + "domain": [("slip_id", "=", self.id), ("total", "!=", 0)], "target": "new", "context": { "tree_view_ref": "yuthon_salary.view_hr_payslip_line_tree_custom", diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index c1b875ff3..f2a5525a4 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -849,7 +849,7 @@ - +