Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修改机床参数bug
This commit is contained in:
@@ -84,11 +84,11 @@ class FeedPerTooth(models.Model):
|
||||
cutting_speed = fields.Char('径向切宽 ae(mm)')
|
||||
machining_method = fields.Selection([('直铣', '直铣'), ('坡铣', '坡铣')], string='加工方式')
|
||||
materials_type_id = fields.Many2one('sf.materials.model', string='材料型号')
|
||||
blade_diameter = fields.Float('刃部直径D1(mm)', readonly=True, compute='_compute_product_template_id')
|
||||
blade_diameter = fields.Float('刃部直径D1(mm)', readonly=True, related='product_template_id.cutting_tool_blade_diameter')
|
||||
feed_per_tooth = fields.Char('每齿走刀量 (mm/z)')
|
||||
unit = fields.Char('单位', default='fz')
|
||||
|
||||
@api.depends('product_template_id')
|
||||
def _compute_product_template_id(self):
|
||||
if self.product_template_id is not None:
|
||||
self.blade_diameter = self.product_template_id.cutting_tool_blade_diameter
|
||||
# @api.depends('product_template_id')
|
||||
# def _compute_product_template_id(self):
|
||||
# if self.product_template_id is not None:
|
||||
# self.blade_diameter = self.product_template_id.cutting_tool_blade_diameter
|
||||
|
||||
@@ -21,7 +21,7 @@ class sf_production_plan(models.Model):
|
||||
date_planned_finished = fields.Datetime(string='计划结束时间')
|
||||
state = fields.Selection([
|
||||
('draft', '未排程'), ('done', '已排程')], string='状态', copy=False, index=True, readonly=True,
|
||||
store=True, tracking=True)
|
||||
store=True)
|
||||
product_id = fields.Many2one('product.product', '关联产品')
|
||||
origin = fields.Char(string='来源')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user