Odoo Help

0

0
3 Answers
4
Avatar

Jérémy Kersten (jke) Belgium

--Jérémy Kersten (jke)--

6307
| 4 4 11
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013.

He is now the Team Leader of the Website Team and support of our own website odoo.com.

Jérémy Kersten (jke) Belgium
3/24/15, 2:59 AM

Hello,


Should be 

def button_calculate_monthly_interest(self, cr, uid, ids, context=None):
print 'Hello World for current ids (%s)' % ids


or in new API


@api.multi
def button_calculate_monthly_interest(self):
        print 'hello Odoo'


 


0
Arjun Khode India
3/24/15, 4:09 AM

Thank you Mariusz and Jeremy for your answers. But I'm still getting the same type error despite the changes made in the code. expecting 1 parameter but 5 given. What should I do?

2 Comments
Currenda Sp. z o.o., Mariusz Mizgier Poland
3/24/15, 5:32 AM

Please update your question with full py code (including imports) so we do know what API do you use.

Currenda Sp. z o.o., Mariusz Mizgier Poland
3/24/15, 10:00 AM

Thats bad - try it like http://pastebin.com/6zmG6Q9k . Try optimizing your imports as well.

0
Avatar

Mariusz Mizgier Poland

--Mariusz Mizgier--
800
| 4 2 9
SOPOT, Poland
--Mariusz Mizgier--

OpenERP developer

Mariusz Mizgier Poland
3/24/15, 2:56 AM

I guess you are using new api (your class is models.Model), then you should write before your method @api.multi

Take a look at http://odoo-new-api-guide-line.readthedocs.org/en/latest/ for further reference.

Ask a Question
Writer
Tag
Keep Informed
3 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