Skip to Content
Menu
This question has been flagged
1 Reply
4883 Views

I only started using this software last week, so pardon my ignorance.

I am running Odoo 10.0 (Community version, I think?) and I have been able to perfectly adapt the software for my needs except for this one small part. When importing data from an excel spreadsheet into the "Equipments" app, I was unable to map the weird, occasionally duplicated, part numbers we use into any category more useful than "Vendor Reference". Regardless, I managed to set up the list view to work the way I want by simply renaming the column from "Vendor Reference" to "Part Number". Works brilliantly.

Now my goal was to do the same thing everywhere else in the "Equipments" app - or at least in Kanban view - but I was stymied when I got the infuriating "Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon!" error when trying to change the Field Label on "partner_ref" (which is the field name for Vendor Reference, apparently). So I tried to do as I was told and modify it through the Python code. 

Long story short, that became a bit of a nightmare.

I was able to change the "maintenance.py" script in the models folder for the maintenance addon, but even after forcing it to compile a new .pyc file, it didn't seem to take and everything in the software still shows "partner_ref" as "Vendor Reference". I looked everywhere else I could think of to look, and was never able to find any other files in the Odoo directory that references "partner_ref". Of course, just because I didn't find it doesn't mean it isn't there, but I spent a few hours looking.

All I want is to change a text reference so that any future users don't get confused. 

I feel like what I want to do is so simple, but I've spent over 9 hours on this already and I'm slowly beginning to lose my mind. Can anybody out there help? Thanks in advance!


Edit: I've went into Apps --> Equipments app and hit "Upgrade", and restarted the service. Multiple times. No dice. Sorry!

In maintenance.py, I only edited line 129:

 partner_id = fields.Many2one('res.partner', string='Vendor', domain="[('supplier', '=', 1)]")
 partner_ref = fields.Char('Travis Part Number')
 location = fields.Char('Location')

But after "ctrl-F" for partner_ref or Vendor Reference I didn't find any more in the document to change. Wrong place, maybe?

Edit 2: You were right after all; I misunderstood what you meant when you said "service". I went into "Services" and restarted the Odoo10 service and when I logged back in everything had crashed and nothing worked. Of course, that was because I had messed around it it so much the past day or two that I had messed up the database itself. I uninstalled/deleted everything, resinstalled, created a new database and tried it again. Worked brilliantly. Thanks! 

Avatar
Discard
Best Answer

Hi,
Robert after editing in the string in the maintenence.py file restart the service . Then just upgrade the module . Then you can see the change.
Thank you

Avatar
Discard