code: def archive(self):
          
          ids = self.rpc_model.search(self.domain, context=self.context)
          if ids:
              self.rpc_model.write(ids, {'active': False})
docs: Archives (soft delete) all the records matching the query.
  
          This assumes that the model allows archiving (not many do - especially
          transactional documents).
  
          Internal implementation sets the active field to False.