diff --git a/sf_maintenance/models/sf_maintenance.py b/sf_maintenance/models/sf_maintenance.py index 8078913a..0bd64991 100644 --- a/sf_maintenance/models/sf_maintenance.py +++ b/sf_maintenance/models/sf_maintenance.py @@ -65,8 +65,8 @@ class SfMaintenanceEquipment(models.Model): MTcode = fields.Char("机台编码", default=get_no) created_user = fields.Many2one('res.users', string='创建人', default=lambda self: self.env.user) - equipment_type = fields.Selection([('机床', '机床'), ('机器人', '机器人'), ('AGV小车', 'AGV小车'), ('检测设备', '检测设备')] - , compute='_compute_category_id') + equipment_type = fields.Selection([('机床', '机床'), ('机器人', '机器人'), ('AGV小车', 'AGV小车'), + ('检测设备', '检测设备')], compute='_compute_category_id') @api.depends('category_id') def _compute_category_id(self): diff --git a/sf_maintenance/tests/test_sf_equipment_maintenance_standards.py b/sf_maintenance/tests/test_sf_equipment_maintenance_standards.py index 82793d32..5206ce57 100644 --- a/sf_maintenance/tests/test_sf_equipment_maintenance_standards.py +++ b/sf_maintenance/tests/test_sf_equipment_maintenance_standards.py @@ -1,6 +1,7 @@ # -*-coding:utf-8-*- from odoo.tests.common import TransactionCase + class TestEquipmentMaintenanceStandards(TransactionCase): def setUp(self, *args, **kwargs): result = super().setUp(*args, **kwargs) diff --git a/sf_manufacturing/models/mrp_maintenance.py b/sf_manufacturing/models/mrp_maintenance.py index 9257c03a..51082dcf 100644 --- a/sf_manufacturing/models/mrp_maintenance.py +++ b/sf_manufacturing/models/mrp_maintenance.py @@ -4,7 +4,6 @@ from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ - class MaintenanceEquipment(models.Model): _inherit = "maintenance.equipment" @@ -64,6 +63,7 @@ class MaintenanceRequest(models.Model): production_company_id = fields.Many2one(string='Production Company', related='production_id.company_id') company_id = fields.Many2one(domain="[('id', '=?', production_company_id)]") + class SfMaintenanceLogs(models.Model): _inherit = 'sf.maintenance.logs' diff --git a/zpl_print/__init__.py b/zpl_print/__init__.py index 0fe8eb94..57a3c45c 100644 --- a/zpl_print/__init__.py +++ b/zpl_print/__init__.py @@ -1,3 +1,3 @@ # -*-coding:utf-8-*- from .import models -from .import controllers \ No newline at end of file +from .import controllers diff --git a/zpl_print/controllers/report.py b/zpl_print/controllers/report.py index c1dc7333..ade1c26f 100644 --- a/zpl_print/controllers/report.py +++ b/zpl_print/controllers/report.py @@ -16,18 +16,14 @@ from odoo.tools.safe_eval import safe_eval, time from odoo.addons.web.controllers.report import ReportController from ..models.common import Common - - - _logger = logging.getLogger(__name__) class ZplReportController(ReportController): - - #------------------------------------------------------ + # ------------------------------------------------------ # Report controllers - #------------------------------------------------------ + # ------------------------------------------------------ @http.route([ '/report//', '/report///', @@ -57,4 +53,4 @@ class ZplReportController(ReportController): texthttpheaders = [('Content-Type', 'text/plain'), ('Content-Length', len(text))] return request.make_response(text, headers=texthttpheaders) else: - raise werkzeug.exceptions.HTTPException(description='Converter %s not implemented.' % converter) \ No newline at end of file + raise werkzeug.exceptions.HTTPException(description='Converter %s not implemented.' % converter)