Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon!

By
Lakay lakay
on 10/9/14, 10:53 PM 1,786 views

Hi,

I want to edit the relation (object it refer ex. res.parter) of an existing Odoo field. 

Error!

Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon!

i want to edit the relation of partner_shipping_id  from sale.order   where can i find particular in odoo/addons path what folder? can you help me.

 

seems to me, you have already asked this question, and I have answered for the same.. do have a look at it...

deep
on 10/10/14, 3:44 AM
0

The same error appears when you are saving an object that has a related field to a property of  ir.model.fields and the field is not market as readonly.

For example:

model    = fields.Char(related='model_id.model', string='Model tech name', readonly=True)
model_id = fields.Many2one(related='step_id.model_id', readonly=True)

field_id = fields.Many2one('ir.model.fields', string='Field', required=True,    
domain="[('model_id', '=', model), ('ttype', 'not in', ['function', 'binary', 'many2many', 'many2one', 'one2many', 'reference'])]",    
ondelete='set null')

field_type = fields.Selection(related='field_id.ttype', string='Field Type', readonlyu=True)

In my case, it was a typing error in the readonly attribute of the field_type (I did type readonlyu), so it was not being recognized and the form was trying to modify it.

I know it was not your problem, but maybe another developer come here looking for info about the same message error.

0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 10/10/14, 3:14 AM

I think you are confusing a couple of things. It is never a good idea to mess directly with the Odoo source code. There is no need to either, since its all modular and you can change anything you want to from your own module.

First, if you want to write your own module, have a look at this guide:

https://doc.odoo.com/trunk/server/03_module_dev_01/

Secondly, for refence, check the modules path that your installation provided. My assumption is here is that you installed it yourself. Open the configuration file for your Odoo instance to find out what directories get loaded with Odoo (you will find them under addons_path). The shipping address should be in the "sale" or otherwise in the "stock" module somewhere. Do a grep commandline in the addons-directory to find out where it originates.

Lastly, add the path to your directory in this configuration file and you should be able to load your own module. So long as your module has the right dependencies (for example: sale,stock) you should be fine in altering what you wanted to in your example.

Good luck!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 10/9/14, 10:53 PM
Seen: 1786 times
Last updated: 6/1/16, 4:59 PM