Purnendu Singh (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-payroll-credit-note-psi into 
lp:~openerp-dev/openobject-addons/trunk-payroll.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-payroll-credit-note-psi/+merge/66258

Hello,


-- Made credit note field of payslip object readonly if the state is not draft.

-- Remove usused attrs from appears_on_payslip feild. Attrs was set to 
        attrs="{'readonly':[('company_contribution','=', True)]}" 
                   
             here company_contribution is not a field or payslip object.

Thanks,
Purnendu Singh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-payroll-credit-note-psi/+merge/66258
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openobject-addons/trunk-payroll-credit-note-psi into 
lp:~openerp-dev/openobject-addons/trunk-payroll.
=== modified file 'hr_payroll/hr_payroll.py'
--- hr_payroll/hr_payroll.py	2011-06-16 10:49:18 +0000
+++ hr_payroll/hr_payroll.py	2011-06-29 09:09:30 +0000
@@ -278,7 +278,7 @@
         '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 = {

=== modified file 'hr_payroll/hr_payroll_view.xml'
--- hr_payroll/hr_payroll_view.xml	2011-06-16 10:30:51 +0000
+++ hr_payroll/hr_payroll_view.xml	2011-06-29 09:09:30 +0000
@@ -551,7 +551,7 @@
                        <field name="category_id"/>
                        <field name="sequence" />
                        <field name="active"/>
-                       <field name="appears_on_payslip" attrs="{'readonly':[('company_contribution','=', True)]}" />
+                       <field name="appears_on_payslip"/>
                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                     </group>
                     <notebook colspan="6">

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to