새 모듈을 만들었지 만 Odoo 앱 스토어에서 설치할 수 없습니다.Odoo 앱을 설치하려고 할 때 오류가 발생했습니다.
File "/opt/odoo/openerp/addons/base/ir/ir_model.py", line 950, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % (xmlid))
ParseError: "External ID not found in the system: my_model.action_order_cancel" while parsing /home/pruf/addons/my_model/views/my_model_view.xml:6, near
<record model="ir.ui.view" id="view_my_model_form">
내 XML 부분 :
<record model="ir.ui.view" id="view_my_model_form">
<field name="name">my.model.form</field>
<field name="model">my.model</field>
<field name="arch" type="xml">
<form>
<header>
<button name="%(action_order_cancel)d" attrs="{'invisible': [('state','not in', ('to_approve_first', 'create_order'))]}" string="Cancel" groups="my_model.group_my__manager" type="action"/>
<button name="button_to_approve_first" states="draft" string="Request approval" type="object" class="oe_highlight" groups="my_model.group_my_model_user"/>
<button name="button_approved" states="to_approve_first" string="Approve" type="object" class="oe_highlight" groups="my_model.group_my_model_manager"/>
파이썬 코드 :
class PurchaseRequest(models.Model):
_name = 'my.model'
_inherit = ['mail.thread', 'ir.needaction_mixin']
cancel_id = fields.One2many('order.cancel', 'my_model_id')
class OrderCancel(models.TransientModel):
_name = 'order.cancel'
my_model_id = fields.Many2one('my.model')
action_order_cancel 버튼에 내가 마법사를 호출하고 클릭 나는 오류를 가지고 그렇게하려고 할 때.
내 모델 구조 :
__init__.py
__openerp__.py
models
----__init__.py
----my_model.py
security
----ir.model.access.csv
----my_model.xml
views
----my_model_view.xml
wizard
----__init__.py
----order.py
----order_view.xml
문제가 어디 있는지 찾을 수 없습니다.
죄송의 참조를 제공해야합니다. – fueggit
로드되기 전에 my_model.action_order_cancel에 액세스하려고합니다. 모든 XML을 포함하면 도움이 될 것입니다. – StefanE
더 많은 코드로 내 질문을 업데이트했습니다. – fueggit