flake8
This commit is contained in:
parent
0db8cd0228
commit
8bc0384d6a
|
@ -1226,7 +1226,7 @@ class ControlChartReport(Report):
|
|||
if 'id' in data:
|
||||
tendency = ControlTendency(data['id'])
|
||||
else:
|
||||
tendency = ControlTendency(reports[0].id)
|
||||
tendency = ControlTendency(records[0].id)
|
||||
|
||||
company = Company(Transaction().context.get('company'))
|
||||
report_context['company'] = company
|
||||
|
|
|
@ -5163,6 +5163,10 @@ msgctxt "field:lims.results_report.version.detail.line,start_date:"
|
|||
msgid "Start date"
|
||||
msgstr "Fecha de inicio"
|
||||
|
||||
msgctxt "field:lims.results_report.version.detail.line,uncertainty:"
|
||||
msgid "Uncertainty"
|
||||
msgstr "Incertidumbre"
|
||||
|
||||
msgctxt "field:lims.results_report.version.detail.line,urgent:"
|
||||
msgid "Urgent"
|
||||
msgstr "Urgente"
|
||||
|
@ -11170,7 +11174,7 @@ msgid "Urgent"
|
|||
msgstr "Urgente"
|
||||
|
||||
msgctxt "report:lims.pending_services_unplanned.spreadsheet:"
|
||||
msgid "for each=\"line in objects\""
|
||||
msgid "for each=\"line in records\""
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:lims.pending_services_unplanned.spreadsheet:"
|
||||
|
|
|
@ -1405,8 +1405,8 @@ class NotebookLine(ModelSQL, ModelView):
|
|||
not self.literal_result and
|
||||
(not self.converted_result_modifier or
|
||||
not self.converted_result) and
|
||||
self.converted_result_modifier not in
|
||||
('nd', 'pos', 'neg')):
|
||||
self.converted_result_modifier not in (
|
||||
'nd', 'pos', 'neg')):
|
||||
self.accepted = False
|
||||
self.not_accepted_message = gettext(
|
||||
'lims.msg_not_accepted_7')
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
from dateutil import relativedelta
|
||||
|
||||
from trytond.model import Workflow, ModelView, ModelSQL, fields
|
||||
from trytond.wizard import Wizard, StateTransition, StateView, StateAction, \
|
||||
Button
|
||||
from trytond.wizard import Wizard, StateAction
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pyson import PYSONEncoder, Eval
|
||||
|
|
|
@ -6,7 +6,6 @@ from datetime import datetime
|
|||
from email.mime.base import MIMEBase
|
||||
from email.mime.multipart import MIMEMultipart
|
||||
from email.mime.application import MIMEApplication
|
||||
from PyPDF2 import PdfFileMerger
|
||||
from string import Template
|
||||
|
||||
from trytond.model import ModelSQL, ModelView, fields
|
||||
|
|
|
@ -54,7 +54,6 @@ class Plant(ModelSQL, ModelView):
|
|||
table.column_rename('zip', 'postal_code')
|
||||
super().__register__(module_name)
|
||||
|
||||
|
||||
@staticmethod
|
||||
def default_country():
|
||||
Company = Pool().get('company.company')
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
import formulas
|
||||
import sql
|
||||
|
||||
from trytond import backend
|
||||
from trytond.model import ModelSQL, ModelView, fields
|
||||
|
|
|
@ -34,6 +34,7 @@ class AddSampleService(metaclass=PoolMeta):
|
|||
Planification.automatic_plan(entries=[new_service.entry])
|
||||
return new_service
|
||||
|
||||
|
||||
class EditSampleService(metaclass=PoolMeta):
|
||||
__name__ = 'lims.sample.edit_service'
|
||||
|
||||
|
|
|
@ -169,9 +169,10 @@ class Template(Workflow, ModelSQL, ModelView):
|
|||
@Workflow.transition('not_active')
|
||||
def not_active(cls, templates):
|
||||
pass
|
||||
|
||||
|
||||
@classmethod
|
||||
@ModelView.button_action('lims_quality_control.wiz_quality_template_copy_line')
|
||||
@ModelView.button_action(
|
||||
'lims_quality_control.wiz_quality_template_copy_line')
|
||||
def copy_lines(cls, typifications):
|
||||
pass
|
||||
|
||||
|
@ -724,24 +725,23 @@ class TestAttachmentReport(Report):
|
|||
class CopyQualityTemplateLineStart(ModelView):
|
||||
'Copy Quality Template Line'
|
||||
__name__ = 'lims.quality.template.copy_line.start'
|
||||
|
||||
origin_quality_template = fields.Many2One('lims.quality.template', 'Origin Template',
|
||||
required=True,
|
||||
)
|
||||
|
||||
origin_quality_template = fields.Many2One('lims.quality.template',
|
||||
'Origin Template', required=True)
|
||||
|
||||
|
||||
class CopyQualityTemplateLine(Wizard):
|
||||
'Copy Quality Template Line'
|
||||
__name__ = 'lims.quality.template.copy_line'
|
||||
|
||||
|
||||
start = StateTransition()
|
||||
ask = StateView('lims.quality.template.copy_line.start',
|
||||
'lims_quality_control.quality_template_copy_line_start_view_form', [
|
||||
Button('Cancel', 'end', 'tryton-cancel'),
|
||||
Button('Copy', 'copy', 'tryton-ok', default=True),
|
||||
Button('Copy', 'copy', 'tryton-ok', default=True),
|
||||
])
|
||||
copy = StateTransition()
|
||||
|
||||
|
||||
def transition_start(self):
|
||||
QualityTemplate = Pool().get('lims.quality.template')
|
||||
quality_template_id = Transaction().context.get('active_id', None)
|
||||
|
@ -756,7 +756,9 @@ class CopyQualityTemplateLine(Wizard):
|
|||
Line = Pool().get('lims.typification')
|
||||
|
||||
quality_template_id = Transaction().context.get('active_id', None)
|
||||
count = Line.search_count([('quality_template', '=', quality_template_id)])
|
||||
count = Line.search_count([
|
||||
('quality_template', '=', quality_template_id),
|
||||
])
|
||||
|
||||
new_lines = []
|
||||
origin_lines = Line.search([
|
||||
|
@ -807,7 +809,8 @@ class CopyQualityTemplateLine(Wizard):
|
|||
'valid_value': origin.valid_value,
|
||||
'quality_test_report': origin.quality_test_report,
|
||||
'quality_order': origin.quality_order,
|
||||
#problemas al copiar algunos registros que no tienen valor en quality_min
|
||||
# problemas al copiar algunos registros que no tienen valor
|
||||
# en quality_min
|
||||
'quality_min': origin.quality_min,
|
||||
'quality_max': origin.quality_max,
|
||||
}
|
||||
|
|
|
@ -60,8 +60,8 @@ class ReportTemplate(ModelSQL, ModelView):
|
|||
], 'Charts per Row')
|
||||
page_orientation = fields.Selection([
|
||||
('portrait', 'Portrait'),
|
||||
('landscape','Landscape'),
|
||||
],'Page orientation',sort=False)
|
||||
('landscape', 'Landscape'),
|
||||
], 'Page orientation', sort=False)
|
||||
resultrange_origin = fields.Many2One('lims.range.type', 'Comparison range',
|
||||
domain=[('use', '=', 'result_range')])
|
||||
|
||||
|
|
|
@ -532,7 +532,8 @@ class ResultReport(metaclass=PoolMeta):
|
|||
if tfooter:
|
||||
stylesheets += cls.parse_stylesheets(tfooter)
|
||||
|
||||
page_orientation = record.template and record.template.page_orientation or 'portrait'
|
||||
page_orientation = (record.template and
|
||||
record.template.page_orientation or 'portrait')
|
||||
|
||||
document = PdfGenerator(content,
|
||||
header_html=header, footer_html=footer,
|
||||
|
|
Loading…
Reference in New Issue