Odoo Help

4

1
1 Answer
6
Avatar

Sudhir Arya (ERP Harbor Consulting Services) India

--Sudhir Arya (ERP Harbor Consulting Services)--
26747
| 8 9 10
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 

LinkedIn

Blog

Stackoverflow

ERP Harbor Consulting Services

Skype:sudhir@erpharbor.com
Website: http://www.erpharbor.com
Sudhir Arya (ERP Harbor Consulting Services) India
9/3/14, 3:21 PM

Hello Anil,

Try can try with following example in which I have assigned my own method to read of base method:

from openerp.models import BaseModel

from openerp import api

@api.v8

def my_read(self, fields=None, load='_classic_read'):

#your code goes here

BaseModel.read = my_read

I guess this is what you are looking for.

Hope this will help you.

5 Comments
Anil R. Kesariya (AKE) India
9/4/14, 1:34 AM

Thanks @Sudhir it works for me!

PY France
7/1/15, 11:18 AM

And how do you actually override, let's say, the create function ? Because if you return BaaseModel.create at the end of your custom create, you will have recursion issues.

Lucio Argentina
7/16/15, 3:58 PM

You don't have to call no one. The return of the new method IS the return of the old method. The old one has been overwritten (i.e. replaced) altogether.

manuthalasseril India
1/11/16, 11:03 AM

hello Sudhir.. it gives me this error TypeError: my_user_has_groups() takes at least 4 arguments (2 given). Can you check this qtn ... http://stackoverflow.com/questions/34725611/how-to-override-method-of-basemodel-openerp-models-py-in-odoo-v9

GLOBAL CREATIVE CONCEPTS TECH CO LTD - iWesabe Saudi Arabia
11/28/17, 3:32 AM

Good !

Ask a Question
Keep Informed
4 follower(s)
About This Community

This platform 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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now