def room_reservation(self):
        '''
        @param self: object pointer
        '''
        mod_obj = self.env['ir.model.data']
        if self._context is None:
            self._context = {}
        model_data_ids = mod_obj.search([('model', '=', 'ir.ui.view'),
                                         ('name', '=',
                                          'view_hotel_reservation_form')])
        resource_id = model_data_ids.read(fields=['res_id'])[0]['res_id']
        return {'name': _('Reconcile Write-Off'),
                'context': self._context,
                'view_type': 'form',
                'view_mode': 'form',
                'res_model': 'hotel.reservation',
                'views': [(resource_id, 'form')],
                'type': 'ir.actions.act_window',
                'target': 'new',
                }
def room_reservation ( self ) : mod_obj = self . env [ 'ir.model.data' ] if self . _context is None : self . _context = { } model_data_ids = mod_obj . search ( [ ( 'model' , '=' , 'ir.ui.view' ) , ( 'name' , '=' , 'view_hotel_reservation_form' ) ] ) resource_id = model_data_ids . read ( fields = [ 'res_id' ] ) [ 0 ] [ 'res_id' ] return { 'name' : _ ( 'Reconcile Write-Off' ) , 'context' : self . _context , 'view_type' : 'form' , 'view_mode' : 'form' , 'res_model' : 'hotel.reservation' , 'views' : [ ( resource_id , 'form' ) ] , 'type' : 'ir.actions.act_window' , 'target' : 'new' , }
@param self: object pointer