From 48c01fbf51cc865f2de1806f958726b3badfefb5 Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Wed, 29 Jun 2011 14:33:53 +0530 Subject: [PATCH] [IMP] hr_payroll: make credit note readonly while state is not draft and remove unsused attrs from appers_on_payslip field bzr revid: psi@tinyerp.co.in-20110629090353-xodv3bnvnjwdeyjw --- addons/hr_payroll/hr_payroll.py | 2 +- addons/hr_payroll/hr_payroll_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index 5ba5dbac216..14b66c328d5 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -278,7 +278,7 @@ class hr_payslip(osv.osv): 'note': fields.text('Description', readonly=True, states={'draft':[('readonly',False)]}), 'contract_id': fields.many2one('hr.contract', 'Contract', required=False, readonly=True, states={'draft': [('readonly', False)]}), 'details_by_salary_rule_category': fields.function(_get_lines_salary_rule_category, method=True, type='one2many', relation='hr.payslip.line', string='Details by Salary Rule Category'), - 'credit_note': fields.boolean('Credit Note', help="Indicates this payslip has a refund of another"), + 'credit_note': fields.boolean('Credit Note', help="Indicates this payslip has a refund of another", readonly=True, states={'draft': [('readonly', False)]}), 'payslip_run_id': fields.many2one('hr.payslip.run', 'Payslip Run', readonly=True, states={'draft': [('readonly', False)]}), } _defaults = { diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml index f8b74ba01ee..c260a46f503 100644 --- a/addons/hr_payroll/hr_payroll_view.xml +++ b/addons/hr_payroll/hr_payroll_view.xml @@ -551,7 +551,7 @@ - +