lims_interface: add relation to Compilation in Notebook line
This commit is contained in:
parent
53f25cfdad
commit
edf96e998b
|
@ -6,6 +6,7 @@ from trytond.pool import Pool
|
|||
from . import interface
|
||||
from . import table
|
||||
from . import data
|
||||
from . import notebook
|
||||
|
||||
|
||||
def register():
|
||||
|
@ -27,6 +28,7 @@ def register():
|
|||
data.ModelAccess,
|
||||
data.Data,
|
||||
data.GroupedData,
|
||||
notebook.NotebookLine,
|
||||
module='lims_interface', type_='model')
|
||||
Pool.register(
|
||||
interface.OpenCompilationData,
|
||||
|
|
|
@ -1390,7 +1390,9 @@ class Compilation(Workflow, ModelSQL, ModelView):
|
|||
nb_line = line.notebook_line
|
||||
if not nb_line:
|
||||
continue
|
||||
data = {}
|
||||
data = {
|
||||
'compilation': c.id,
|
||||
}
|
||||
for alias, nl_field in fields.items():
|
||||
data[nl_field] = getattr(line, alias)
|
||||
if data:
|
||||
|
|
|
@ -446,6 +446,10 @@ msgctxt "field:lims.interface.variable.value,variable:"
|
|||
msgid "Variable"
|
||||
msgstr "Variable"
|
||||
|
||||
msgctxt "field:lims.notebook.line,compilation:"
|
||||
msgid "Compilation"
|
||||
msgstr "Compilación"
|
||||
|
||||
msgctxt "help:lims.interface.column,expression:"
|
||||
msgid ""
|
||||
"In grouped columns the suffix _XX will be replaced by the corresponding "
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# This file is part of lims_interface module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
|
||||
from trytond.model import fields
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
__all__ = ['NotebookLine']
|
||||
|
||||
|
||||
class NotebookLine(metaclass=PoolMeta):
|
||||
__name__ = 'lims.notebook.line'
|
||||
|
||||
compilation = fields.Many2One('lims.interface.compilation', 'Compilation',
|
||||
readonly=True)
|
Loading…
Reference in New Issue