lims: remove auxiliary records when updating modules
This commit is contained in:
parent
c57e18ba78
commit
e57b9d5e04
|
@ -2438,6 +2438,12 @@ class NotebookInternalRelationsCalc1Variable(ModelSQL):
|
|||
repetition = fields.Integer('Repetition', readonly=True)
|
||||
use = fields.Boolean('Use')
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
super().__register__(module_name)
|
||||
cursor = Transaction().connection.cursor()
|
||||
cursor.execute('DELETE FROM "' + cls._table + '"')
|
||||
|
||||
|
||||
class NotebookInternalRelationsCalc1(Wizard):
|
||||
'Internal Relations Calculation'
|
||||
|
|
|
@ -2007,6 +2007,12 @@ class GenerateResultsReportResultAutNotebookLine(ModelSQL, ModelView):
|
|||
line = fields.Many2One('lims.notebook.line', 'Notebook Line',
|
||||
ondelete='CASCADE', select=True, required=True)
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
super().__register__(module_name)
|
||||
cursor = Transaction().connection.cursor()
|
||||
cursor.execute('DELETE FROM "' + cls._table + '"')
|
||||
|
||||
|
||||
# TODO: remove
|
||||
class GenerateResultsReportResultAutExcludedNotebook(ModelSQL, ModelView):
|
||||
|
@ -2066,6 +2072,12 @@ class GenerateResultsReportResultAutExcludedNotebookLine(ModelSQL,
|
|||
line = fields.Many2One('lims.notebook.line', 'Notebook Line',
|
||||
ondelete='CASCADE', select=True, required=True)
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
super().__register__(module_name)
|
||||
cursor = Transaction().connection.cursor()
|
||||
cursor.execute('DELETE FROM "' + cls._table + '"')
|
||||
|
||||
|
||||
# TODO: remove
|
||||
class GenerateResultsReportResultMan(ModelView):
|
||||
|
|
Loading…
Reference in New Issue