[FIX] project: add misssing decorator on onchange method
The onchange should have the signature with `ids` instead of `id` for a proper guess. Without this, the method can not be overriden with an api.multi (the return result is a list of dictionnary which is not understood by the ORM as a proper return format). Fixes #12856
This commit is contained in:
parent
d7f1270050
commit
8b83119fad
|
@ -23,7 +23,7 @@ from datetime import datetime, date
|
|||
from lxml import etree
|
||||
import time
|
||||
|
||||
from openerp import SUPERUSER_ID
|
||||
from openerp import SUPERUSER_ID, api
|
||||
from openerp import tools
|
||||
from openerp.addons.resource.faces import task as Task
|
||||
from openerp.osv import fields, osv
|
||||
|
@ -673,6 +673,7 @@ class task(osv.osv):
|
|||
def onchange_planned(self, cr, uid, ids, planned=0.0, effective=0.0):
|
||||
return {'value': {'remaining_hours': planned - effective}}
|
||||
|
||||
@api.cr_uid_ids_context
|
||||
def onchange_project(self, cr, uid, id, project_id, context=None):
|
||||
if project_id:
|
||||
project = self.pool.get('project.project').browse(cr, uid, project_id, context=context)
|
||||
|
|
Loading…
Reference in New Issue