sale_rma_name_state = self.env['sale.rma'].search([('return_invoice_id', '=', i.id)])seach()方法可以根据不同的需求进行替换,类似于sql语句,