I have extended the sale order form by adding another field named "Final Customer" which is basically the same as the field "Partner". I added the following code under custom directory:
Code: from osv import osv, fields class sale_order(osv.osv): _name = "sale.order" _description = "Sale Order" _inherit = "sale.order" _columns = { 'final_customer_id':fields.many2one('res.partner', 'Final Customer', readonly=True, states={'draft':[('readonly',False)]}, change_default=True, select=False), } def onchange_customer_id(self, cr, uid, ids, cust): if not cust: return {'value':{'customer_address_id': False}} customer_addr = self.pool.get('res.partner').address_get(cr, uid, [cust], ['default']) return {'value':{'customer_address_id':customer_addr['default']}} sale_order() Now I want to display some details of the final customer (Contact name, Street, Zip, City, Telephone, Fax, Country etc.) only in the tree view of the sales order form. What additional entries are required in the above piece of code and in the corresponding Xml code? I tried a few things, but it did not work. Many thanks ------------------------ Gholam Quader _______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman/listinfo/tinyerp-users
