odoo/odoo — pull request #2176 by cecton (2014-09-04 07:47:02+00:00)
Title: [IMP] "compute" methods must not depend on ID

This feature hasn't been implemented because of complexity problems.
Therefore, we should not allow the developer to use it if possible.

Hello Raphael @rco-odoo ,

As we discussed, this feature doesn't work in standard and is not going to be implemented soon. I suggest that we throw an exception just to help developers and contributers to avoid being tricked by this specificity.

Maybe it would be better to test this specific case when the _depends is evaluated. However, I heard that we try our best to not slow down the server with additional assertions.

The following improvement is done at Python module import only and shouldn't have a big impact on the performance. It doesn't cover the case of using a callable method, but at least it helps against the simple basic case of using ```@depends```: with a static list of columns.

Best