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

Hi! I'm trying to create a wizard popup for OpenERP 7 but I have a problem when I install the module. It appears this error: arch: Invalid XML for view Architecture.

My code is: XML:

<record id="liquidacion_form_view" model="ir.ui.view">
        <field name="name">liquidacion.form</field>
        <field name="model">liquidacion</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Liquidacion">
                    <separator colspan="4" string="General Information"/>
                    <field name="from_date" />
                    <field name="to_date" />
                    <group col="4" colspan="2">
                                <button special="cancel" string="Cancel" type="object"/>
                                <button name="_action_open_window" type="object" default_focus="1"/>
                    </group>
            </form>
        </field>
    </record>

<act_window name="Liquidacion"
    res_model="liquidacion"
    src_model="sale.order"
    view_mode="form"
    target="new"
    key2="client_action_multi"
    id="liquidacion_act_window"/>

PY:

from osv import osv, fields

class liquidacion(osv.osv_memory):
    _name = "liquidacion" 

def _action_open_window(self, cr, uid, ids, context):
    return True

_columns = {
    'from_date': fields.date('From'),
    'to_date': fields.date('To'),

            }

liquidacion()

I have all this files in a new folder (wizard) with his __init__ file that contains this code: import wizard.liquidar

I don't know that's wrong... I'm following this tutorial that explain how do it for V6.1 and V7: doc.openerp.com/v6.1/developer/04_wizard.html/

Someone could see where is my error, please?

Thank you very much.

아바타
취소

Post the server error trace. Did you import wizard in the __init__.py file of your module ?

작성자

There isn't any trace. It appears the popup error telling the error: arch: Invalid XML for view Architecture I imported my py in the __init__file.py that it is in wizard folder

Ok, add "import wizard" in your module's __init__.py file where wizard in "import wizard" is the folder name wizard. And add version="7.0" in your form tag.

베스트 답변

change this:

remove <field name="type">form</field>

and modify

<form string="Liquidacion" version="7.0">

Best regards

아바타
취소
관련 게시물 답글 화면 활동
1
3월 15
7804
1
12월 22
3452
What is wizard ? 해결 완료
3
11월 23
32693
4
7월 25
4973
2
12월 23
17804