Community mailing list archives

Bug ? in Payment advise creation in Indian Payroll

- 01/30/2016 00:25:16

Hello Community,

We installed l10n_in_hr_payroll module on odoo8. we created a payslip batch and we tried to create payment advice according to the batch. But we get this error :

Integrity Error

The operation cannot be completed, probably due to the following:

- deletion: you may be trying to delete a record while other records still reference it

- creation/update: a mandatory field is not correctly set

[object with reference: Bank -]

We dug in to code and found that
 in '' file there is a method 'create_advice'(line#175)
in that, for the creation of advice it assigns field 'bank_id' as
 'bank_id': users[0].company_id.bank_ids and users[0].company_id.bank_ids[0].id or False

Actually this is a wrong assignment because, here bank_id is a many2one field of but the above code tries to assign an id of
but have many2one field of, so we can use this field instead like

 'bank_id': users[0].company_id.bank_ids and users[0].company_id.bank_ids[0] or False

Hope this will work !!

is there any other solution for this issue ?

Cybrosys Odoo Department
 +91 494 3015006 / 07
 +91 8606827707
Facebook Twitter LinkedIn Google Plus Pinterest Company
This email and any file transmitted with it are confidential and intended solely for the use of the individual or entity whom they are addressed.If you have received this email in errort please notify the system manager. The company accepts no liability for any damage caused by any virus transmitted by this email.