2017-09-15 3 views
1

새 모듈을 만들었지 만 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 

문제가 어디 있는지 찾을 수 없습니다.

답변

2

는 XML의 순서 것은 문제 등의 위에서 아래로 XML을 구문 분석, 아직 분석되지 않은 행동을 언급하는 않습니다 /는 action_sale_order_cancel이 모듈에서 사용할 수없는 것으로 보인다

+0

죄송의 참조를 제공해야합니다. – fueggit

+0

로드되기 전에 my_model.action_order_cancel에 액세스하려고합니다. 모든 XML을 포함하면 도움이 될 것입니다. – StefanE

+0

더 많은 코드로 내 질문을 업데이트했습니다. – fueggit

0

을 선언했다. 당신이 다른 모듈의 동작을 사용하는 경우 당신은, 내가 어떻게해야합니까 이해하지 않는 모듈

<button name="%(other_module_name.action_sale_order_cancel)d" attrs="{'invisible': [('state','not in', ('to_approve_first', 'create_order'))]}" string="Cancel" groups="my_model.group_my__manager" type="action"/>