Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2248 Vistas

I want to install my custom module to show tree view, but the apps not showing in apps list
here's my codes

.py

from odoo import models, fields, apiimport requests
class PokemonCustom(models.Model):    _name = 'pokemon.list'    _description = 'Pokemon List'
    pokemon_id = fields.Integer(string='Pokemon ID', help='ID of the Pokemon')    pokemon_name = fields.Char(string='Pokemon Name', help='Name of the Pokemon')
    def get_all_pokemon(self):        response = requests.get(f'https://pokeapi.co/api/v2/pokemon?limit=10000')                if response.status_code == 200:            data = response.json()
            for pokemon in data['results']:                pokemon_name = pokemon['name']                pokemon_id = int(pokemon['url'].split('/')[-2])
                existing_pokemon = self.search([('pokemon_id', '=', pokemon_id)])                if not existing_pokemon:                    self.create({                        'pokemon_name': pokemon_name,                        'pokemon_id': pokemon_id                    })
    def get_pokemon(self):        random_number = self.get_unique_random_number()        response = requests.get(f'https://pokeapi.co/api/v2/pokemon/{random_number}/')
        if response.status_code == 200:            data = response.json()
            pokemon_name = data['name']            pokemon_id = data['id']
            self.write({                'pokemon_name': pokemon_name,                'pokemon_id': pokemon_id            })


.xml 

     
          Pokemon List      pokemon.list                                                   
          Pokemon List      pokemon.list      tree,form   
      


manifest

# -*- coding: utf-8 -*-{    'name': "Pokemon List",
    'summary': "Manage Pokémon in Odoo",
    'description': """Long description of the module's purpose.    """,
    'author': "Your Company",    'website': "https://www.yourcompany.com",
    'category': 'Uncategorized',    'version': '0.1',    'installable': True,    'application': True,
    'depends': ['base', 'contacts'],
    'data': [        'views/pokemon.xml',        'views/res_partner.xml',        'security/ir.model.access.csv'    ],
    'demo': [        'demo/demo.xml',    ],
    'images': [        'static/description/icon.png',    ],}


security

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_pokemon_custom,pokemon.list,model_pokemon_list,base.group_user,1,1,1,1



Avatar
Descartar
Mejor respuesta

Here are potential reasons why your custom module might not be showing up in the Apps list:



1. File Structure: Double-check that the file structure within the module directory is accurate, as Odoo expects a specific arrangement.


2.Update Module List: Remember to refresh the module list in Odoo's Apps menu after placing the module in the correct directory.

Activate Developer Mode , Go to Apps and Click on Update Apps List then Update.


3. Check __manifest__.py : Ensure the 'application': True, line is present to mark it as an application


Please share screenshots for better understanding of the Issue is


Hope it helps


Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
3
feb 25
2626
0
may 24
46
1
abr 24
2785
4
sept 23
4221
2
sept 23
6505