diff --git a/wizard/impound_notes.py b/wizard/impound_notes.py index 21ea3c2b4dcee016965388064ac0e9327857b03a..b4162ccc075c7128c1edbb716a559c04f70c5a78 100644 --- a/wizard/impound_notes.py +++ b/wizard/impound_notes.py @@ -34,7 +34,7 @@ class ImpoundNotesReportWizard(models.TransientModel): month = self.impound_selected_date.month year = self.impound_selected_date.year # Process Deposits - for impound in self.env["impound.impound"].search([('accreditation_type', '=', 'deposit')]): + for impound in self.env["impound.impound"].search([('accreditation_type', '=', 'deposit'),('accreditation_type', '=', self.impound_type)]): record = str(impound['file_number']) + '/' + str(month) impound_bank = impound.bank employee_name = impound['employee'].name @@ -67,7 +67,7 @@ class ImpoundNotesReportWizard(models.TransientModel): no_web_deposit_lines.append(vals) # Process Transfers - for impound in self.env["impound.impound"].search([('accreditation_type', '=', 'transfer')]): + for impound in self.env["impound.impound"].search([('accreditation_type', '=', 'transfer'),('impound_type', '=', self.impound_type)]): record = str(impound['file_number']) + '/' + str(month) impound_bank = impound.bank employee_name = impound['employee'].name