I have written this button which does a simple operation, but Odoo says my arguments are wrong. Its an 'object' type button. Can you help me out?
UPDATE:
Here's my code:
PY:
from openerp.osv import fields, osv
from openerp import api
import openerp.addons.decimal_precision as dp
from openerp.osv import orm
from calendar import monthrange
from datetime import datetime, timedelta
from dateutil import relativedelta
class record(orm.Model):
_name="record"
@api.multi
def button_calculate_monthly_interest(self):
print 'hello Odoo'
def button_monthly_interest(self, cr, uid, ids, context=None):
print("hi")
XML:
<button name="button_calculate_monthly_interest" string="Calculate Monthly Interest" type="object"/>
When I use the old API, I get AttributeError: 'record' object has no attribute 'button_monthly_interest'
When I use new API, I get the error: 1 exact field expected, 5 given.