Quantcast
Channel: OpenERP Help - Individual question feed
Viewing all articles
Browse latest Browse all 464

How to completely replace res.partner.form view?

$
0
0
I would like to replace the default res.partner.form view with a completely new view from a simple module I've created. I want to replace instead of inherit because I don't just want to change the fields, I also want to change the HTML and other markup around those fields. Inheriting the form and adjusting individual fields won't give me the control I'm looking for. I've managed to create a module with a new view, load the module into OpenERP and confirmed the view is registered but my changes are not visible. When I enable debug mode and look at "Manage Views" the "View Type" is "undefined" and res.partner is still using the default view. Can anyone point me in the direction of where I'm going wrong? I've spent hours reading the documentation and Googling but still not managed to get this working. **andromeda_customer_form.py** from osv import osv, fields from tools.translate import _ class andromeda_customers(osv.osv): _inherit = 'res.partner' _columns = { 'andromeda_customer_type': fields.selection([('individual','Individual'),('business','Business'),('charity','Charity / Non-Profit'),('government','Government')],'Customer Type'), 'andromeda_business_type': fields.selection([('sole_trader','Sole Trader'),('limited','Limited Company / Limited Liability Partnership'),('partnership','Partnership'),('other','Other')],'Business Type'), 'andromeda_customer_title': fields.selection([('mr','Mr'),('mrs','Mrs'),('miss','Miss'),('ms','Ms'),('dr','Dr'),('prof','Prof'),('rev','Rev'),('sir','Sir')],'Title'), 'andromeda_customer_firstname': fields.char('First name', size=16), 'andromeda_customer_lastname': fields.char('Last name', size=16), 'andromeda_customer_phone': fields.integer('Contact number', size=16), 'andromeda_customer_email': fields.char('E-mail address', size=16), } andromeda_customers() ---------- **andromeda_customer_form.xml** res.partner.formres.partner Screenshot: I don't have enough karma to post links, so replace **** with the http prefix to view the image. ****dl.dropboxusercontent.com/u/41195444/openerp.png

Viewing all articles
Browse latest Browse all 464

Trending Articles