Problem unlink record from calendar
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned |
Bug Description
Hello I have last openerp v.7.0 updated today (standard openobject-addons)
I see this problem in calendar view hr.timesheet but I prefer report a bug (even if I customize inheriting hr.timesheet)
The problem is that: in calendar view, if I unlink a record with the recycle bin icon, openerp pass ids as integer instead of list of ids so I got a generic error (and no record are erased).
I dig into the code and I see that generic error is a "no iterable object error" when I arrive at this point:
/home/thebrush/
for obj in self.browse(cr, uid, ids, context=context): <<<<<<<<<<<<<
obviously because ids is a integer not a list.
My workaround is create, in my module, a override method of unlink:
def unlink(self, cr, user, ids, context=None):
if type(ids) not in (list, tuple):
ids = [ids]
return super(hr_
My bug is for ask if, in calendar, is possibile have unlink call with list (usually there's not problems but, as you see, in some modules like timesheet, there a loop based in list of ids).
Thanks (please feel free to change project if the bug is not in correct one)
Nicola