Accept Merge Request #692: (feature/修改机床参数bug -> develop)
Merge Request: 代码规范 Created By: @龚启豪 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @龚启豪 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/692
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# -*-coding:utf-8-*-
|
||||
from .import models
|
||||
from .import controllers
|
||||
from .import controllers
|
||||
|
||||
@@ -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/<converter>/<reportname>',
|
||||
'/report/<converter>/<reportname>/<docids>',
|
||||
@@ -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)
|
||||
raise werkzeug.exceptions.HTTPException(description='Converter %s not implemented.' % converter)
|
||||
|
||||
Reference in New Issue
Block a user