Odoo Help

0

0
2 Answers
1
Avatar

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
22823
| 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)
2019/06/04 3:44

You forgot to pass self in your method definition and also use "@api.model" instead of "@api.one"..

@api.model
def maakTes(self, partner_id, other_party_name, other_party_number, duration, call_date_time):


2 Comments
Brent Vanleerberghe
2019/06/04 4:13

When I add self to the method definition I get another error saying I'm missing 1 required positional argument (call_date_time). How should I pass self as an argument in my JS?

Sudhir Arya (ERP Harbor Consulting Services)
2019/06/04 4:35

Remove @api.one and use @api.model

2
Avatar

Jos De Graeve - Accomodata

--Jos De Graeve - Accomodata--
7322
| 3 1 3
RONSE, Belgium
--Jos De Graeve - Accomodata--

CTO and partner at Accomodata

Jos De Graeve - Accomodata
2019/06/04 3:34

Hi,

The signature of your method misses the "self" argument.  Also use @api.model

Writing it like this should fix your problem:


    @api.model
def maakTest(self, partner_id, other_party_name, other_party_number, duration, call_date_time):
import pdb; pdb.set_trace()
vals = {'partner_id':partner_id,'other_party_name':other_party_name,'other_party_number':other_party_number,'duration':duration,'call_date_time':call_date_time}
self.create(vals)


2 Comments
Brent Vanleerberghe
2019/06/04 4:14

When I add self to the method definition I get another error saying I'm missing 1 required positional argument (call_date_time). How should I pass self as an argument in my JS?

Accomodata BVBA, Jos De Graeve - Accomodata
2019/06/04 4:37

use @api.model - i edited my answer.

Ask a Question
Keep Informed
1 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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now