[FIX] fields.date.context_today: proper signature for call by default_get()
authorOlivier Dony <odo@openerp.com>
Tue, 14 Feb 2012 12:24:13 +0000 (13:24 +0100)
committerOlivier Dony <odo@openerp.com>
Tue, 14 Feb 2012 12:24:13 +0000 (13:24 +0100)
commitaa658124a6638e21c05b822df3894f82e0fd1ccd
tree764a7cbd5a173544e8c6a9a4a298382b6f28b6d5
parent0d5b984f350c141981c2ec11b92110d65949fa95
[FIX] fields.date.context_today: proper signature for call by default_get()

The ORM automatically passes a Model instance
as the first argument to _default callables,
historically provided to give lambda functions
access to the Model instance.
context_today() does not need it but takes it
for compatibility purposes.
This also means that when called explicitly
within business code we should now pass a
Model instance as first argument, typically 'self'

bzr revid: odo@openerp.com-20120214122413-rznpdyqajrzswk4o
openerp/osv/fields.py