Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

i reciever arch error

By
Mohamed
on 8/17/14, 11:20 AM 623 views

I get that error when compiling the code below which says "

File "C:\Program Files (x86)\OpenERP 7.0-20140413-231155\Server\server.\openerp\osv\orm.py", line 1562, in _validate except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')

<?xml version="1.0" encoding="utf-8"?>

<openerp> <data>

 <record id="view_hr_expense_loan_tree" model="ir.ui.view">
  <field name="name">hr.expense.loan.tree</field>
  <field name="model">hr.expense.loan</field>
  <field name="type">tree</field>
  <field name="priority">2</field>
  <field name="arch" type="xml">
   <tree string="Drivers Loans" colors="red:state=='draft';gray:state=='cancel';green:state=='approve';blue:state=='confirm';">
    <field name="name"/>
    <field name="date"/>
    <field name="employee_id"/>
    <field name="product_id"/>
    <field name="amount" sum="Amount"/>
    <field name="balance" sum="Balance"/>
    <field name="paid"/>
    <field name="state"/>
   </tree>
  </field>
 </record>

    <record id="view_hr_expense_loan_form" model="ir.ui.view">
        <field name="name">hr.expense.loan.form</field>
        <field name="model">hr.expense.loan</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Employee Loans" version="7.0">
            <header>
                <button name="action_approve" states="draft" string="Approve" type="object" icon="gtk-go-forward" groups="hr_loan.group_expense_loan_approve" class="oe_highlight"/>
                <button name="action_confirm" states="approved" string="Confirm" type="object" icon="gtk-goto-last" groups="hr_loan.group_expense_loan_confirm" class="oe_highlight"/>
                <button name="action_close" states="confirmed" string="Close" type="object" icon="gtk-ok" groups="hr_loan.group_expense_loan_close" />
                <button name="action_cancel" states="draft,approved" string="Cancel" type="object" icon="gtk-cancel" groups="hr_loan.group_expense_loan_cancel"/>
                <field name="state" widget="statusbar" statusbar_visible="draft,approved,confirmed,closed"/>
            </header>
            <sheet>
            <h1>
                <label string="Loan"/>
                <field name="name" class="oe_inline" readonly="1"/>
            </h1>
            <group col="4">
                <field name="date"/>
                <field name="origin"/>
            </group>
            <field name="company_id" invisible="1"/>
            <!--<field name="shop_id" invisible="1"/>-->
            <notebook>
                <page string="Loan Details">
                    <group colspan="4" col="4">
                        <field name="employee_id" colspan="4"
                        context="{'hr_employee_category': 'employee','hr_employee_category': False}"
                        domain="[('hr_employee','=', False),('hr_employee_category','=','employee')]" />


                        <field name="product_id" colspan="4"/>                   
                        <field name="amount" />
                        <newline />
                        <field name="reimbursement_method"/>
                        <newline />
                        <field name="reimbursement_type"/>
                        <newline />
                        <field name="percent_reimbursement"
                               attrs="{'required':[('reimbursement_type','=','percent')],'invisible':[('reimbursement_type','!=','percent')]}"/>
                        <newline />
                        <field name="fixed_reimbursement"
                               attrs="{'required':[('reimbursement_type','=','fixed')],'invisible':[('reimbursement_type','!=','fixed')]}"/>
                        <newline />
                        <field name="description" colspan="4" />
                        <separator string="Balance" colspan="4"/>
                        <field name="balance" />
                        <field name="paid" />

                    </group>
                </page>
                <page string="Notes">                       
                    <field colspan="4" name="notes" nolabel="1"/>
                </page>
                <page string="Loan Expense Lines">
                    <group col="4">
                        <field name="expense_line_ids"  colspan="4" nolabel="1">
                            <tree>
                                <field name="expense_id" />
                                <!--<field name="date" />-->
                                <field name="product_id" />
                                <field name="name" />
                                <!--<field name="price_total" />-->
                            </tree>
                        </field>
                    </group>
                </page>
                <page string="Log">
                    <group colspan="4" col="4">
                        <field name="create_uid" readonly="1" />
                        <field name="create_date" readonly="1" />
                        <field name="approved_by" readonly="1" />
                        <field name="date_approved" readonly="1" />
                        <field name="confirmed_by" readonly="1" />
                        <field name="date_confirmed" readonly="1" />
                        <field name="closed_by" readonly="1" />
                        <field name="date_closed" readonly="1" />
                        <field name="cancelled_by" readonly="1" />
                        <field name="date_cancelled" readonly="1" />
                    </group>
                </page>
            </notebook>
            </sheet>
            <div class="oe_chatter">
                <field name="message_follower_ids" widget="mail_followers"/>
                <field name="message_ids" widget="mail_thread" placeholder="Share a message..."/>
            </div>
            </form>
        </field>
    </record>

    <record id="view_hr_expense_loan_filter" model="ir.ui.view">
        <field name="name">tms.expense.loan.filter</field>
        <field name="model">tms.expense.loan</field>
        <field name="type">search</field>
        <field name="arch" type="xml">
            <search string="Search Loans">
                <filter icon="terp-gtk-media-pause" string="Draft" domain="[('state','=','draft')]"/>
                <filter icon="terp-gtk-jump-to-ltr" string="Approved" domain="[('state','=','approved')]"/>
                <filter icon="terp-check" string="Confirmed" domain="[('state','=','confirmed')]"/>
                <filter icon="terp-check" string="Not Paid" domain="[('paid','=',0)]"/>
                <filter icon="terp-check" string="Paid" domain="[('paid','=',1)]"/>
                <newline/>
                <field name="name" select="1"/>
                <field name="employee_id" />
                <field name="product_id" />
                <field name="date" string="Expense date" />
                <newline/>
                <group expand="0" string="Group By..." >
                    <filter string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
                    <filter string="Product" icon="terp-personal" domain="[]" context="{'group_by':'product_id'}"/>
                    <filter string="Paid" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'paid'}"/>
                    <separator orientation="vertical"/>
                    <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                    <filter string="Expense Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>                       
                </group>
           </search>
        </field>
    </record>

    <record model="ir.ui.view" id="view_hr_expense_loan_graph">
        <field name="name">hr.expense.loan.graph</field>
        <field name="model">hr.expense.loan</field>
        <field name="type">graph</field>
        <field name="arch" type="xml">
            <graph string="Expense" type="bar">
                <field name="product_id"/>
                <field name="amount" operator="+"/>
            </graph>
        </field>
    </record>

    <record id="action_hr_expense_loan_form" model="ir.actions.act_window">
        <field name="name">Employees Loans</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">hr.expense.loan</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form,graph</field>
        <field name="search_view_id" ref="view_tms_expense_loan_filter"/>
        <field name="help">Employee Loans</field>
    </record>

    <!--<menuitem action="action_hr_expense_loan_form" id="menu_hr_expense_loan"
              parent="menu_hr_config_employeess" sequence="40" />-->

    <menuitem action="action_hr_expense_loan_form" id="hr_menu_hr_expense_loan"
              parent="hr.menu_hr_main" sequence="90" />

</data>
</openerp>

 

how to fix it ?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/17/14, 11:20 AM
Seen: 623 times
Last updated: 3/16/15, 8:10 AM