Skip to Content
Menu
This question has been flagged
2744 Views
<record id="card_card_form" model="ir.ui.view">
            <field name="name">card.card.form</field>
            <field name="model">card.card</field>            
             <field name="arch" type="xml">
                 <form string="Payment Card" version="7.0">
                        <group col="6" colspan="6">
                            <field name="name" />    
                            <field name="partner_id" />    
                            <field name="user_id" />    
                            <field name="date_valid" />    
                        </group> 


                    <notebook colspan="6">

                         <page string="Invoices">
                            <group col="6" colspan="6"> 

                            </group> 
                            <field name="invoice_ids" nolabel="1" colspan="6"/>
                            <newline />
                            <button name="compute_invoices" states="active" type="object" string="Create Invocie" icon="gtk-ok"/>
                        </page>

                        <page string="Expenses">
                            <field name="expenses_ids" nolabel="1" colspan="6" widget="one2many_list"  context="{'journal_id': journal_id}">
                                <tree string="Expenses" editable="bottom"             colors="grey:state=='payed';blue:state=='draft';red:state=='canceled'">
                                      <field name="state" invisible="1"/>
                                      <field name="date"/>
                                      <field name="type" default_focus="1" on_change="onchange_type(type)" widget="selection" />
                                      <field name="name"/>
                                      <field name="unit_amount" on_change="on_change_unit_amount(product_id,unit_amount,company_id)"/>
                                      <field name="amount"/>
                                      <field name="account_id" groups="analytic.group_analytic_accounting" />
                                      <field name="user_id" attrs="{'readonly':True}" />
                                      <field name="general_account_id" invisible="1"/>
                                      <field name="journal_id" invisible="1"/>
                                      <field name="product_id" invisible="1"/>
                                      <field name="company_id" invisible="1"/>


                                      <button name="button_approved" states="draft" string="Approve" icon="terp-camera_test"/>
                                </tree> 
                            </field>
                            <newline />
                        </page>


                        <page string="History">
                            <field name="log" nolabel="1" colspan="6" widget="one2many_list"  >
                                <tree string="Device Log" editable="bottom">
                                      <field name="name"/>
                                      <field name="create_date"/>
                                      <field name="read"/>
                                      <field name="user_id" attrs="{'readonly':True}" />
                                </tree>
                            </field>
                            <newline />
                        </page>


                        <page string="Notes">
                            <field colspan="4" name="note" nolabel="1"/>
                        </page> 
                    </notebook> 
                    <group col="17" colspan="4">
                        <field name="state" widget="statusbar" statusbar_visible="draft,active,deprecated" statusbar_colors='{"deprecated":"gray","draft":"blue"}' />
                        <button name="button_draft" type="object" states="active" string="Cancel" icon="gtk-cancel"/>
                        <button name="button_active" states="draft" type="object" string="Active" icon="gtk-ok"/>
                        <button name="button_deprecated" states="active" type="object" string="Deprecated" icon="gtk-cancel"/>
                     </group>
                </form>
            </field>
        </record>

AttributeError: 'NoneType' object has no attribute '_BaseModel__view_look_dom_arch' 2013-10-22 06:39:34,624 1672 ERROR mails openerp.tools.convert: Parse error in /opt/openerp/server/openerp/addons/card/card_view.xml:26: how we can solve this.

Avatar
Discard