I got the following error message
TypeError: write() takes exactly 2 arguments (5 given)
due to the following code
def post(self,cr,uid,ids,context=None): o = self.browse(cr,uid,ids[0]) budget_obj = self.pool.get('budget.expense').browse(cr,uid,o.budget_id.id) budget_line = self.pool.get('budget.expense.lines') for line in o.budget_transaction_line: for item in budget_obj.budget_expense_line: if line.item_id.id == item.item_id.id: if line.tran_type in ('salary','expense'): if item.planned_amount - item.practical_amount - line.amount>=0: b_line = budget_line.browse(cr,uid,item.id) vals = { 'practical_amount':item.practical_amount + line.amount, } b_line.write(cr,uid,[item.id],vals)
Don't care about all the method's lines, the problem is in the last bold line
Does anyone have an idea to resolve this error ?