diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index 7053a7e9c..0228fb5fb 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -2,6 +2,10 @@ from odoo import api, fields, models, _ from odoo.exceptions import ValidationError, UserError import json from odoo.tools import date_utils +import logging + +_logger = logging.getLogger(__name__) + class InheritHrPayslip(models.Model): _inherit = 'hr.payslip' @@ -278,11 +282,15 @@ class InheritHrPayslip(models.Model): ) # 本期应收 - 三险一金 - 年金 - 应补退税 - 工会会费 - 个税退回 + # total_before_tax - three_one - b_year - union_dues - tax_payable - individual_tax_refund @api.depends('total_before_tax', 'three_one', 'b_year', 'union_dues', 'tax_payable', 'individual_tax_refund') def _compute_actual_salary(self): for record in self: record.actual_salary = (record.total_before_tax - record.three_one - record.b_year - record.union_dues - record.tax_payable - record.individual_tax_refund) - + if record.employee_id.name == '罗梦烨': + _logger.info("罗梦烨实发{} 本期应:{},31:{},年金:{}应补:{}工会{}个税{}".format(record.actual_salary, record.total_before_tax, + record.three_one, record.b_year, record.union_dues, + record.tax_payable, record.individual_tax_refund)) def put_button(self): for record in self: diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index 2cfcf3310..8ecd1e064 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -104,6 +104,7 @@