Odoo Aide

0

0
3 Answers
4
Avatar

Jérémy Kersten (jke)

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

6297
| 4 4 11
Jodoigne, Belgique
--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)
24/03/2015 02:59

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
24/03/2015 04:09

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
24/03/2015 05:32

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
24/03/2015 10:00

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

0
Avatar

Mariusz Mizgier

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

OpenERP developer

Mariusz Mizgier
24/03/2015 02:56

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.

Poser une question
Writer
Tag
Keep Informed
3 Abonné(e)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