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

i can inherit res.partner model but i cant inherit sale.order model

i try to inherit sale.order model but it say TypeError: Model 'sale.order' does not exist in registry when i try to inherit sale.order

can someone help me?

from odoo import models, fields, api

class Partner(models.Model):

    _inherit = 'sale.order'

        instructor = fields.Boolean(string="Instruktur")

    session_ids = fields.Many2many('training.sesi', string="Menghadiri Sesi", readonly=True)

아바타
취소
베스트 답변

Hi,

make sure you added the module 'sale' to the dependencies of your new module. Look at the manifest file of your module. There should be at least:

    "depends": [
        "sale",
    ],
아바타
취소
베스트 답변

FYI -it can alsao happen when there is a depends redunancy where two modules refer to each other in the manifest's depends. Only one must make reference to the other not both.

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

 thanks for the answer

아바타
취소
베스트 답변

It's dependency issue, added sale dependency on your custom module

아바타
취소
관련 게시물 답글 화면 활동
1
5월 25
1151
2
11월 24
2318
4
2월 24
12586
sale / delivery 해결 완료
1
1월 24
1799
0
5월 23
1974