验证字段拱时可能发生了什么错误:View Architecture的XML无效

时间:2019-05-17 11:26:33

标签: odoo

这个问题可能是什么原因?

  

except_orm :(“ ValidateError”,u'在验证字段拱时发生错误:View Architecture的XML无效!”)

report_sale_view.xml

256

cr_report_sale.py

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="ird_sync_view" model="ir.ui.view">
            <field name="name">IRD Sync</field>
            <field name="type">form</field>
            <field name="model">ird.sync</field>
            <field name="arch" type="xml">
                <form string="IRD Sync" version="7.0">
                    <group>
                        <field name="customer_name" />
                        <field name="bill_no" />
                        <field name="bill_date" />
                        <field name="total_amount" />
                        <field name="entered_by" />
                    </group>
                </form>
            </field>
        </record>

        <record id="ird_sync_tree" model="ir.ui.view">
            <field name="name">ird.sync.tree</field>
            <field name="model">ird.sync</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="IRD Synchronization">
                    <field name="customer_name" />
                    <field name="bill_no" />
                    <field name="bill_date" />
                    <field name="total_amount" />
                    <field name="entered_by" />
                </tree>
            </field>
        </record>

        <record id="ird_sync_filter" model="ir.ui.view">
            <field name="name">ird.sync.filter</field>
            <field name="model">ird.sync</field>
            <field name="arch" type="xml">
                <search string="IRD Synchronization">
                    <field name="customer_name" />
                    <field name="bill_no" />
                    <field name="bill_date" />
                    <field name="total_amount" />
                    <field name="entered_by" />
                </search>
            </field>
        </record>

        <!-- Action of IRD Synchronization -->
        <record id="action_ird_sync" model="ir.actions.act_window">
            <field name="name">IRD Synchronization</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">ird.sync</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="context">{}</field>
            </field>
        </record>

        <menuitem name="IRD Synchronization" id="menu_ird_sync"
            parent="base.menu_base_partner" sequence="20" />
        <menuitem name="IRD Synchronization" parent="menu_ird_sync"
            action="action_ird_sync" id="sub_menu_ird_sync" />
    </data>
</openerp>

错误消息:

from openerp.osv import fields, osv
class ird_sync(osv.osv):
    _name = "ird.sync"
    _columns = {
        'fiscal_year': fields.char('Fiscal Year'),
        'bill_no': fields.char('Bill No'),
        'customer_name': fields.char('Customer Name', required=True, size=64),
        'customer_pan': fields.char('Customer Pan'),
        'bill_date': fields.date('Bill Date'),
        'amount': fields.float('Amount'),
        'discount': fields.float('Discount'),
        'taxable_amount': fields.char('Taxable Amount'),
        'tax_amount': fields.char('Tax Amount'),
        'total_Amount': fields.char('Total Amount'),
        'is_bill_active': fields.boolean('is_bill_active'),
        'is_bill_printed': fields.boolean('is_bill_active'),
        'sync_with_ird': fields.boolean('sync_with_ird'),      
        'printed_time': fields.date('Printed Time'),
        'entered_by': fields.char('Entered by'),
        'printed_by': fields.char('Printed by'),
        'is_realtime': fields.boolean('is_realtime')
    }
    _defaults = {
        'is_bill_active':False,
        'is_bill_printed':False,
        'sync_with_ird':False,
        'taxable_amount':0,
        'tax_amount':0,   
    }   
ird_sync()

0 个答案:

没有答案