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

I had installed Construction module on my openerp version 7. No error during installation. But, when I go to Sales menu and create Sales order, this error occur.

File "/opt/openerp/server/openerp/osv/orm.py", line 2235, in fields_view_get
  arch=apply_view_inheritance(cr, user, source, sql_res['id']),
File "/opt/openerp/server/openerp/osv/orm.py", line 2193, in apply_view_inheritance
  source = apply_inheritance_specs(source, view_arch, view_id)
File "/opt/openerp/server/openerp/osv/orm.py", line 2177, in apply_inheritance_specs
  raise_view_error("Element '%s' not found in parent view '%%(parent_xml_id)s'" % tag, inherit_id)
File "/opt/openerp/server/openerp/osv/orm.py", line 2070, in raise_view_error
  %  (child_view.xml_id, self._name, error_msg))
AttributeError: View definition error for inherited view 'sale_insulation.view_sale_order_insulation' on model 'sale.order': 
  Element '<xpath expr="//field[@name='order_line']/sheet/notebook/page/field/form/group/group/field[@name='product_uos_qty']">' not found in parent view 'sale.view_order_form'

Can anyone help me?

아바타
취소
베스트 답변

The fact it installed without errors means that your module and XML is technically correct.

You are getting the error because when you want to use the XML, it is missing a field in this case.

I do not think you need to specify the whole path in order to change some things, see my modification of the same kind of things:

<xpath expr="//field[@name='order_line']/tree//field[@name='tax_id']" position="replace">
    <field name="tax_id" invisible="1"/>
</xpath>

Make sure that the field 'product_uos_qty' is on the screen, before you install your module. And that the name view_order_form is the correct form you want to modify.

아바타
취소
작성자

Thank you. I had edit all my xpath related and it's worked :)

Please close the message as solved, so people can see the solution (and I get some credits .. :) )