[IMP] ir.needaction: made the model Abstract. Fixed a bug when inheriting from AbstractModels: _auto (to create a database for the model) was not correctly set.

bzr revid: tde@openerp.com-20120904103242-o6ky20u9gvhu0t3u
This commit is contained in:
Thibault Delavallée
2012-09-04 12:32:42 +02:00
parent 1f84036086
commit 95837af09c
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
from osv import osv
class ir_needaction_mixin(osv.Model):
class ir_needaction_mixin(osv.AbstractModel):
'''Mixin class for objects using the need action feature.
Need action feature can be used by models that have to be able to
+3
View File
@@ -654,6 +654,7 @@ class BaseModel(object):
may be set to False.
"""
__metaclass__ = MetaModel
_auto = True # create database backend
_register = False # Set to false if the model shouldn't be automatically discovered.
_name = None
_columns = {}
@@ -5076,6 +5077,7 @@ class Model(BaseModel):
The system will later instantiate the class once per database (on
which the class' module is installed).
"""
_auto = True
_register = False # not visible in ORM registry, meant to be python-inherited only
_transient = False # True in a TransientModel
@@ -5088,6 +5090,7 @@ class TransientModel(BaseModel):
records they created. The super-user has unrestricted access
to all TransientModel records.
"""
_auto = True
_register = False # not visible in ORM registry, meant to be python-inherited only
_transient = True