新增单件用量显示
This commit is contained in:
@@ -38,7 +38,7 @@ class SfDemandPlan(models.Model):
|
|||||||
related='product_id.blank_type')
|
related='product_id.blank_type')
|
||||||
blank_precision = fields.Selection([('精坯', '精坯'), ('粗坯', '粗坯')], string='坯料类型',
|
blank_precision = fields.Selection([('精坯', '精坯'), ('粗坯', '粗坯')], string='坯料类型',
|
||||||
related='product_id.blank_precision')
|
related='product_id.blank_precision')
|
||||||
manual_quotation = fields.Boolean('人工编程',related='product_id.manual_quotation', default=False)
|
manual_quotation = fields.Boolean('人工编程', related='product_id.manual_quotation', default=False)
|
||||||
embryo_long = fields.Char('坯料尺寸(mm)', compute='_compute_embryo_long', store=True)
|
embryo_long = fields.Char('坯料尺寸(mm)', compute='_compute_embryo_long', store=True)
|
||||||
is_incoming_material = fields.Boolean('客供料', related='sale_order_line_id.is_incoming_material', store=True)
|
is_incoming_material = fields.Boolean('客供料', related='sale_order_line_id.is_incoming_material', store=True)
|
||||||
pending_qty = fields.Float(
|
pending_qty = fields.Float(
|
||||||
@@ -243,7 +243,8 @@ class SfDemandPlan(models.Model):
|
|||||||
else:
|
else:
|
||||||
for demand_plan_line_id in line_ids:
|
for demand_plan_line_id in line_ids:
|
||||||
demand_plan_line_id.action_confirm()
|
demand_plan_line_id.action_confirm()
|
||||||
#需求要求取值格式是来源+来源明细行ID,但是来源明细行ID取得就是product_id.name得最后一位,所以这里也直接截取product_id.name
|
|
||||||
|
# 需求要求取值格式是来源+来源明细行ID,但是来源明细行ID取得就是product_id.name得最后一位,所以这里也直接截取product_id.name
|
||||||
@api.depends('product_id.name')
|
@api.depends('product_id.name')
|
||||||
def _compute_demand_plan_number(self):
|
def _compute_demand_plan_number(self):
|
||||||
for line in self:
|
for line in self:
|
||||||
|
|||||||
@@ -38,8 +38,8 @@
|
|||||||
<field name="model_long"/>
|
<field name="model_long"/>
|
||||||
<field name="blank_type" optional="hide"/>
|
<field name="blank_type" optional="hide"/>
|
||||||
<field name="blank_precision"/>
|
<field name="blank_precision"/>
|
||||||
<field name="unit_number" optional="hide"/>
|
|
||||||
<field name="embryo_long"/>
|
<field name="embryo_long"/>
|
||||||
|
<field name="unit_number" optional="hide"/>
|
||||||
<field name="materials_id"/>
|
<field name="materials_id"/>
|
||||||
<field name="model_machining_precision"/>
|
<field name="model_machining_precision"/>
|
||||||
<field name="model_process_parameters_ids" widget="many2many_tags"/>
|
<field name="model_process_parameters_ids" widget="many2many_tags"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user