ishanra

Untitled

Jun 19th, 2021
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.23 KB | None | 0 0
  1. def create_bulk_transfer(self):
  2.         self._generate_uuid()
  3.  
  4.         # Method 1 (Also tried typecasting to string): [https://pastebin.com/A5PSHcPu]
  5.  
  6.         beneficiary_transactions = self.env['openg2p.disbursement.main'].browse(
  7.             [('batch_id', '=', self.id)])
  8.         print(beneficiary_transactions)
  9.  
  10.         # Method 2 : (Same error as above): [https://pastebin.com/A5PSHcPu]
  11.  
  12.         beneficiary_transactions = self.env['openg2p.disbursement.main'].search(
  13.             [('batch_id', '=', self.id)])
  14.         #Finds batch_ids successfully
  15.         print(beneficiary_transactions)  # openg2p.disbursement.main(19,)
  16.  
  17.         beneficiary_transactions_records = []
  18.  
  19.         for ids in beneficiary_transactions:
  20.             beneficiary_transactions_records.append(self.env['openg2p.disbursement.main'].browse(
  21.                 [('batch_id', '=', ids.id)]))
  22.  
  23.         #Method 3 : [https://pastebin.com/MaizEJpk]
  24.  
  25.         beneficiary_transactions = self.env['openg2p.disbursement.main'].search(
  26.             [('batch_id', '=', self.id)])
  27.        
  28.         print(beneficiary_transactions)  # openg2p.disbursement.main(19,)
  29.  
  30.         beneficiary_data = self.env['openg2p.disbursement.main'].browse(
  31.             [('batch_id', '=', (beneficiary_transactions))])
Advertisement
Add Comment
Please, Sign In to add comment