콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
3931 화면

I'm trying to develop a module. I made simple changes to the equipment form inside maintenance module. But when I'm trying to install this module I get an error:

TypeError: Model 'maintenance' does not exist in registry.

In the manifest file I have maintenance inside dependencies:

'depends': ['base','web','maintenance'],

This is my models:

# -*- coding: utf-8 -*-
from odoo import models, fields, api
class custom_category_fields(models.Model):
    _inherit = 'maintenance.equipment'
    CPU1 = fields.Char()    
    GPU1 = fields.Char()

And this is my views:

<record model="ir.ui.view" id="view_equipment_form_inherit" >
     <field name="name">equipment.specs</field>
     <field name="model">maintenance.equipment</field>
     <field name="inherit_id" ref="maintenance.hr_equipment_view_form"/>
     <field name="arch" type="xml">
         <xpath expr="//field[@name='note']" position="after">
            <group>                
                <field name="CPU1"/>
            </group>
            <group>                
                <field name="GPU1"/>
            </group>
        </xpath>
    </field>
</record>

What is wrong?



아바타
취소
작성자 베스트 답변

Solution - restart the odoo service

sudo systemctl restart odoo.service 

:)


아바타
취소
베스트 답변

Hi, did you add the template to the security.csv file?

아바타
취소
작성자

Yes, but I have found the solution - turn it off and on :)

관련 게시물 답글 화면 활동
6
1월 23
11497
0
8월 19
3247
2
6월 20
5885
0
4월 19
4081
2
1월 19
6562