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

Problem with custom module.

$
0
0
This is a problem I met for the second time. I've made a custom module with all company parameter. this morning I wanted to work on Accounting functionality on a testing database. I duplicate the product database and my param module. So now I have 2 databases and 2 Modules. One for production and one for testing. I uninstall the param module from testing database and it's ok. I try to install the testing module and the system broke. I can't go to the login page and I have a message like : "the column 'test' don't exist in res_partner database". But I have a script that add this column. Testing module is exactly the same than param module. I don't understand why the same module don't work if I uninstall and reinstall a copy of it. someone can explain me what I'm doing wrong? Thanks for reading. edit: My module code My xml file (I have comment the reference to the new field) partner.view.form.julianares.partnerform52 res_partner.py: # -*- coding: utf-8 -*- from openerp.osv import osv, fields import logging _logger = logging.getLogger("PARAM-JULIANA") # #Ajout du lien vers société.com # class res_partner(osv.osv): _name = 'res.partner' _inherit = 'res.partner' def _get_societe_com_link(self, cr, uid, ids, name, args, context=None): result = dict.fromkeys(ids, False) res = {} text="" for obj in self.browse(cr, uid, ids, context=context): res[obj.id]=text if obj.siren : text = "http://www.societe.com/cgi-bin/recherche?rncs=" + obj.siren res[obj.id]=text return res _columns = { 'societe_com': fields.function(_get_societe_com_link, type='char', size=64, string='societe.com'), 'nom_commercial': fields.char('Nom Commercial', size=128, select=True) }

Viewing all articles
Browse latest Browse all 464

Trending Articles