[FIX] project: make copy overridable in v8 api

Without the proper decorator, the method is matched as `cr_ui_context`.
This is because the `guess` mechanism expects a name `res_id` instead of
`record_id`.
For stability reason it is better to add the decorator than modify the signature
of the method.
Closes #11735
This commit is contained in:
Holger Brunn 2016-04-19 08:28:25 +02:00 committed by Martin Trigaux
parent d6563f91b9
commit a4c4c43bd9
No known key found for this signature in database
GPG Key ID: 7B0E288E7C0F83A7
1 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import api
from openerp.osv import fields,osv
class res_partner(osv.osv):
@ -36,6 +36,7 @@ class res_partner(osv.osv):
'task_count': fields.function(_task_count, string='# Tasks', type='integer'),
}
@api.cr_uid_id_context
def copy(self, cr, uid, record_id, default=None, context=None):
if default is None:
default = {}