mirror of
https://github.com/NaN-tic/trytond-galatea_cms.git
synced 2023-12-14 04:32:53 +01:00
Remove not null on template and galatea website columns
This commit is contained in:
parent
bd846cd7b7
commit
62bbdcca16
1 changed files with 13 additions and 0 deletions
13
cms.py
13
cms.py
|
@ -5,6 +5,7 @@ from trytond.model import ModelSQL, ModelView, fields
|
|||
from trytond.pool import Pool
|
||||
from trytond.pyson import Bool, Equal, Eval, In, Not
|
||||
from trytond.transaction import Transaction
|
||||
from trytond import backend
|
||||
|
||||
from trytond.modules.galatea import GalateaVisiblePage
|
||||
from trytond.modules.galatea.tools import slugify
|
||||
|
@ -160,6 +161,18 @@ class Article(GalateaVisiblePage, ModelSQL, ModelView):
|
|||
'Dissable active field.'),
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
TableHandler = backend.get('TableHandler')
|
||||
cursor = Transaction().cursor
|
||||
table = TableHandler(cursor, cls, module_name)
|
||||
|
||||
super(Article, cls).__register__(module_name)
|
||||
|
||||
table = TableHandler(cursor, cls, module_name)
|
||||
table.not_null_action('galatea_website', action='remove')
|
||||
table.not_null_action('template', action='remove')
|
||||
|
||||
@classmethod
|
||||
def default_websites(cls):
|
||||
Website = Pool().get('galatea.website')
|
||||
|
|
Loading…
Reference in a new issue