Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Artificial Intelligence
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Property Management
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Issues industry_fsm_report inherit

Subscriure's

Get notified when there's activity on this post

This question has been flagged
developmentinheritanceissuesinheritissue
1 Respondre
1641 Vistes
Avatar
Arnaldo Angulo

Does any one did have issues trying to extend a report from 

industry_fsm_report module? Im trying to extend the module but an error from odoo telling me the module is not installed appears, here are some test:


INSTALLATION OF MODULE TEST:
acttelematica-test-env-21567738=> SELECT

    im.model,

    im.name as model_name,

    imm.name as module_name,

    imm.state as module_state

FROM

    ir_model im

JOIN

    ir_model_data imd ON imd.model = 'ir.model' AND imd.res_id = im.id

JOIN

    ir_module_module imm ON imm.name = split_part(imd.module, '.', 1)

WHERE

    im.model = 'x_project_task_worksheet_template_13';

                model                 |                       model_name                       |     module_name     | module_state

--------------------------------------+--------------------------------------------------------+---------------------+--------------

x_project_task_worksheet_template_13 | {"en_US": "plantilla test", "es_ES": "plantilla test"} | industry_fsm_report | installed

ERROR ON LOG EVENTS:


Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/http.py", line 2375, in __call__ response = request._serve_db() File "/home/odoo/src/odoo/odoo/http.py", line 1928, in _serve_db self.registry = Registry(self.db).check_signaling() File "/home/odoo/src/odoo/odoo/modules/registry.py", line 89, in __new__ return cls.new(db_name) File "<decorator-gen-16>", line 2, in new File "/home/odoo/src/odoo/odoo/tools/func.py", line 87, in locked return func(inst, *args, **kwargs) File "/home/odoo/src/odoo/odoo/modules/registry.py", line 110, in new odoo.modules.load_modules(registry, force_demo, status, update_module) File "/home/odoo/src/odoo/odoo/modules/loading.py", line 481, in load_modules processed_modules += load_marked_modules(env, graph, File "/home/odoo/src/odoo/odoo/modules/loading.py", line 366, in load_marked_modules loaded, processed = load_module_graph( File "/home/odoo/src/odoo/odoo/modules/loading.py", line 196, in load_module_graph model_names = registry.load(env.cr, package) File "/home/odoo/src/odoo/odoo/modules/registry.py", line 267, in load model = cls._build_model(self, cr) File "/home/odoo/src/odoo/odoo/models.py", line 720, in _build_model raise TypeError("Model %r does not exist in registry." % name) TypeError: Model 'x_project_task_worksheet_template_13' does not exist in registry.

CONFIGURATION OF MODULE

{

    'name': 'Plantillas Personalizadas',

    'version': '1.0',

    'description': 'Aplicación que guardas las plantillas para la aplicación servicio externo',

    'summary': 'Plantillas Servicio Externo',

    'license': 'LGPL-3',

    'depends': ['industry_fsm_report'],

    'data': [

    'views/worksheet_template_views.xml',

    ],

}

from odoo import models, fields, _


class PlantillaTest(models.Model):

    _inherit = 'x_project_task_worksheet_template_13'


    barra_estados = fields.Selection([

        ('v_fallida', 'Visita Fallida'),

        ('ats', 'Llenar ATS'),

        ('ta', 'Llenar trabajo en alturas'),

        ('a_fallida', 'Actividad Fallida'),

        ('informe', 'Llenar reporte'),

        ('check_list', 'Lista de Chequeo'),

        ('fin', 'Informes llenos'),

    ], string="Estado", default='v_fallida', readonly=True)


 I will really appreciate your help on this issue,

0
Avatar
Descartar
Arnaldo Angulo
Autor

Hello, thank you so mucho for your answer, I did implement the changes and the error is not appearing, but the fields are not being agrregated into the model

Avatar
D Enterprise
Best Answer

Hii,

You must define a base model for x_project_task_worksheet_template_13 before inheriting it.

Update your Python file like this:

from odoo import models, fields # STEP 1: Define base model (required if created via Studio or XML only) class XProjectTaskWorksheetTemplate13 (models.Model): _name = 'x_project_task_worksheet_template_13' _description = 'Plantilla Test' name = fields.Char( "Nombre" ) ​​# Minimum one field # STEP 2: Your custom extension class PlantillaTest (models.Model): _inherit = 'x_project_task_worksheet_template_13' barra_estados = fields.Selection([ ( 'v_fallida' , 'Visita Fallida' ), ( 'ats' , 'Llenar ATS' ), ( 'ta' , 'Llenar trabajo en alturas' ), ( 'a_fallida' , 'Actividad Fallida' ), ( 'informe' , 'Llenar reporte' ), ( 'check_list' , 'Lista de Chequeo' ), ( 'fin' , 'Informes llenos' ), ], string= "Estado" , default= 'v_fallida' , readonly= True )

I hope it is usefull

0
Avatar
Descartar
Arnaldo Angulo
Autor

Hello, thank you so mucho for your answer, I did implement the changes and the error is not appearing, but the fields are not being agrregated into the model

D Enterprise

Hiii,
Add the Field to the Form View
You also need to ensure the new field barra_estados is added to the view so it’s accessible in the UI. In worksheet_template_views.xml, add this field:

views/worksheet_template_views.xml:

<odoo>
<record id="view_worksheet_template_form" model="ir.ui.view">
<field name="name">worksheet.template.form</field>
<field name="model">x_project_task_worksheet_template_13</field>
<field name="arch" type="xml">
<form string="Plantilla Test">
<sheet>
<group>
<field name="name"/> <!-- Existing field -->
<field name="barra_estados"/> <!-- Your new field -->
</group>
</sheet>
</form>
</field>
</record>
</odoo>
Update the Module in Odoo
After all the changes, update your module to ensure the new model fields and views are applied:

Using Odoo Shell:
odoo -d your_database_name -u your_module_name

i hope it is usefull

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
classical inheritance
development inheritance
Avatar
Avatar
1
d’oct. 24
3594
The different "openerp model inheritance" mechanisms: what's the difference between them, and when should they be used ? Solved
development inheritance
Avatar
Avatar
Avatar
2
d’ag. 23
46933
How to extend an existing class and include social newtork features in the sub class
inheritance inherit
Avatar
Avatar
3
de jul. 18
5840
How to import method from another module?
development inheritance
Avatar
Avatar
1
de març 15
12609
Help with inherited view
development inheritance account.tax
Avatar
Avatar
1
d’abr. 24
3692
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now