Khushboo Bhatt(openerp) has proposed merging
lp:~openerp-dev/openerp-india/payroll-india-trunk-fix-salary-rule-and-sequence-kbh
into lp:~openerp-dev/openerp-india/payroll-india-trunk.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-india/payroll-india-trunk-fix-salary-rule-and-sequence-kbh/+merge/110500
Hello,
===l10n_in_hr_payroll===
I have done following changes.
- changed sequence of payment advice.
- added security folder in __openerp__.py and rename security file.
Thank you,
KBH.
--
https://code.launchpad.net/~openerp-dev/openerp-india/payroll-india-trunk-fix-salary-rule-and-sequence-kbh/+merge/110500
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openerp-india/payroll-india-trunk-fix-salary-rule-and-sequence-kbh
into lp:~openerp-dev/openerp-india/payroll-india-trunk.
=== modified file 'l10n_in_hr_payroll/__openerp__.py'
--- l10n_in_hr_payroll/__openerp__.py 2012-06-13 06:38:45 +0000
+++ l10n_in_hr_payroll/__openerp__.py 2012-06-15 10:52:32 +0000
@@ -48,6 +48,7 @@
'l10n_in_hr_payroll_view.xml',
'l10n_in_hr_payroll_data.xml',
'data/hr.salary.rule.csv',
+ 'security/ir.model.access.csv',
'l10n_in_hr_payroll_report.xml',
'l10n_in_hr_payroll_sequence.xml'
],
=== modified file 'l10n_in_hr_payroll/l10n_in_hr_payroll.py'
--- l10n_in_hr_payroll/l10n_in_hr_payroll.py 2012-06-15 07:08:20 +0000
+++ l10n_in_hr_payroll/l10n_in_hr_payroll.py 2012-06-15 10:52:32 +0000
@@ -160,8 +160,11 @@
for advice in self.browse(cr, uid, ids, context=context):
if not advice.line_ids:
raise osv.except_osv(_('Error !'), _('You can not confirm Payment advice without advice lines.'))
- number = self.pool.get('ir.sequence').get(cr, uid, 'payment.advice')
- return self.write(cr, uid, ids, {'number':number, 'state':'confirm'}, context=context)
+ advice_date = datetime.strptime(advice.date,DATETIME_FORMAT)
+ date = advice_date.strftime('%Y')+'/'+advice_date.strftime('%m')
+ number = self.pool.get('ir.sequence').get(cr, uid, 'payment.advice')
+ sequence_num = 'PAY' + '/' + date + '/' + number
+ return self.write(cr, uid, ids, {'number':sequence_num,'state':'confirm'}, context=context)
def set_to_draft(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'state':'draft'}, context=context)
=== modified file 'l10n_in_hr_payroll/l10n_in_hr_payroll_sequence.xml'
--- l10n_in_hr_payroll/l10n_in_hr_payroll_sequence.xml 2012-06-13 06:38:45 +0000
+++ l10n_in_hr_payroll/l10n_in_hr_payroll_sequence.xml 2012-06-15 10:52:32 +0000
@@ -8,7 +8,7 @@
<record id="seq_payment_advice" model="ir.sequence">
<field name="name">Payment Advice</field>
<field name="code">payment.advice</field>
- <field name="prefix">PAY/%(month)s/%(year)s/</field>
+ <field name="prefix"></field>
<field name="padding">3</field>
</record>
</data>
=== removed file 'l10n_in_hr_payroll/security/hr.salary.rule.csv'
--- l10n_in_hr_payroll/security/hr.salary.rule.csv 2012-06-13 12:26:05 +0000
+++ l10n_in_hr_payroll/security/hr.salary.rule.csv 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_hr_payroll_advice","hr.payroll.advice","model_hr_payroll_advice","base.group_hr_manager",1,1,1,1
-"access_hr_payroll_advice_line","hr.payroll.advice.line","model_hr_payroll_advice_line","base.group_hr_manager",1,1,1,1
=== added file 'l10n_in_hr_payroll/security/ir.model.access.csv'
--- l10n_in_hr_payroll/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
+++ l10n_in_hr_payroll/security/ir.model.access.csv 2012-06-15 10:52:32 +0000
@@ -0,0 +1,3 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_hr_payroll_advice","hr.payroll.advice","model_hr_payroll_advice","base.group_hr_manager",1,1,1,1
+"access_hr_payroll_advice_line","hr.payroll.advice.line","model_hr_payroll_advice_line","base.group_hr_manager",1,1,1,1
_______________________________________________
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