1. 程式人生 > >odoo xml解析錯誤

odoo xml解析錯誤


 
<data><header>
    <button name="action_open" type="object"
            string="手動開啟"
            class="oe_highlight"
            attrs="{'invisible': [ ('status','=',True)]}" />
    <button name="action_close" type="object"
            string="手動關閉"
             attrs="{'invisible': [ ('status','=',False)]}" 
/>


在安裝模組時一直報錯指向此處,header前邊多出data標籤,但是在程式碼中卻不存在,
找了很久,發現header寫錯位置,解除安裝了from外邊,導致安裝錯誤。


<field name="arch" type="xml">
    <header>
            <button name="action_open" type="object"
                    string="手動開啟"
                    class="oe_highlight"
                    
attrs="{'invisible': [ ('status','=',True)]}" /> <button name="action_close" type="object" string="手動關閉" attrs="{'invisible': [ ('status','=',False)]}" /> </header> <form string="Course Form">


這個錯誤在升級的時候不會出現,但是在安裝的時候會報錯。