summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2013-03-15 12:53:02 +0100
committerXavier Morel <xmo@openerp.com>2013-03-15 12:53:02 +0100
commit9494f21ea857e2682778df9de47e1123e53b872b (patch)
treef26e2381ad1e2fa2f27a74b21ee99073c92117f7 /scripts
parent914a97f329485074c428830c5bfc0f93ac867f52 (diff)
[FIX] __getattr__ implementation on BaseModel
object has no __getattr__, in the usual case super(BaseModel, self).__getattr__ will blow up with an AttributeError (but the wrong one). On the other hand, if a BaseModel descendant class is used in MI alongside a non-BM descendant (e.g. res_partner inheriting from Model and format_address) and the non-BM descendant also implements __getattr__, we want to forward the failed attr search to the other __getattr__ implementation. So check if super() has a __getattr__, call it if it does otherwise AttributeError right there. bzr revid: xmo@openerp.com-20130315115302-z7jla334gb9a5e43
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions