我是Python和OpenERP的新手。OpenERP - 沒有從樹形視圖中的res.partner獲取客戶列表
將下面的代碼加載到OpenERP中,沒有錯誤;然而,我沒有看到res.partner的任何數據,因爲我期待。
任何人都可以看到我的代碼中有什麼問題嗎?
class delivery_forcast(osv.osv):
_name = "delivery.forcast"
_inherit = "res.partner"
_columns={
'delivery_state': fields.selection([
('scheduled','Scheduled'),
('delivered','Delivered')],
'Delivery Status', readonly=True, track_visibility='onchange'),
'est_delivery_date': fields.date('Estimated Delivery Date', readonly=False),
'container_size': fields.integer('Container Size', help='Container size to be filled in gallons',readonly=False),
}
delivery_forcast()
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_delivery_forcast_tree" model="ir.ui.view">
<field name="name">delivery.forcast.tree</field>
<field name="model">delivery.forcast</field>
<field name="arch" type="xml">
<tree string="Partner List">
<field name="name"/>
<field name="est_delivery_date"/>
<field name="container_size"/>
<field name="delivery_state"/>
</tree>
</field>
</record>
<record id="show_delivery_forcast_tree" model="ir.actions.act_window">
<field name="name">Delivery Forcasts</field>
<field name="res_model">delivery.forcast</field>
<field name="view_type">tree</field>
<field name="view_mode">tree</field>
<field name ="domain">[('customer','=',1)]</field>
</record>
<menuitem name="Delivery Forcasts" id="menu_delivery_forcasts" action="show_delivery_forcast_tree"/>
</data>
</openerp>
謝謝你的幫助。 – Adam