mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-15 19:52:56 -06:00
[FIX+IMP] document_page:
* Add dependency to knowledge * Adding hack in document_page_history to allow calling method that don't exists * document_page_history don't have _sql attribute * Filter more fields
This commit is contained in:
parent
fa5f889f5f
commit
7f585cfe29
@ -32,7 +32,7 @@ Web pages
|
|||||||
'website': 'http://www.openerp.com/',
|
'website': 'http://www.openerp.com/',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'depends': [
|
'depends': [
|
||||||
'knowledge'
|
'knowledge',
|
||||||
],
|
],
|
||||||
'data': [
|
'data': [
|
||||||
'wizard/document_page_create_menu_view.xml',
|
'wizard/document_page_create_menu_view.xml',
|
||||||
|
@ -18,9 +18,12 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
import logging
|
||||||
import difflib
|
import difflib
|
||||||
from openerp import models, fields, api, _
|
from openerp import models, fields, api, _
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class document_page(models.Model):
|
class document_page(models.Model):
|
||||||
_name = "document.page"
|
_name = "document.page"
|
||||||
@ -177,3 +180,14 @@ class document_page_history(models.Model):
|
|||||||
"Revision-{}".format(v2),
|
"Revision-{}".format(v2),
|
||||||
context=True
|
context=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def __getattr__(self, attr):
|
||||||
|
"""Return a dummy callabale"""
|
||||||
|
if attr in ['_sql', 'init', '_ids']:
|
||||||
|
raise AttributeError
|
||||||
|
|
||||||
|
_logger.warning(
|
||||||
|
"Trying to access attribute %s on document_page_history",
|
||||||
|
attr
|
||||||
|
)
|
||||||
|
return (lambda *a, **b: None)
|
||||||
|
Loading…
Reference in New Issue
Block a user