Accept Merge Request #1560: (feature/sale_order_route_pick -> develop)
Merge Request: 成品委外,坯料自加工的制造排程单生成 Created By: @胡尧 Accepted By: @胡尧 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1560?initial=true
This commit is contained in:
@@ -7,7 +7,7 @@ class ModelType(models.Model):
|
||||
|
||||
name = fields.Char('名称')
|
||||
# embryo_tolerance = fields.Char('坯料容余')
|
||||
embryo_tolerance_id = fields.Many2one('sf.embryo.redundancy', string='坯料容余')
|
||||
embryo_tolerance_id = fields.Many2one('sf.embryo.redundancy', string='坯料冗余')
|
||||
product_routing_tmpl_ids = fields.One2many('sf.product.model.type.routing.sort', 'product_model_type_id',
|
||||
'成品工序模板(自动化产线加工')
|
||||
embryo_routing_tmpl_ids = fields.One2many('sf.embryo.model.type.routing.sort', 'embryo_model_type_id',
|
||||
|
||||
@@ -884,7 +884,7 @@ class ResProductMo(models.Model):
|
||||
'model_process_parameters_ids': [(6, 0, [])] if not item.get(
|
||||
'process_parameters_code') else self.get_process_parameters_id(item['process_parameters_code']),
|
||||
'model_remark': item['remark'],
|
||||
'single_manufacturing': True,
|
||||
'single_manufacturing': False,
|
||||
'default_code': '%s-%s' % (order_number, i),
|
||||
'manual_quotation': item['manual_quotation'] or False,
|
||||
'part_number': item.get('part_number') or '',
|
||||
|
||||
@@ -288,18 +288,18 @@ class StockRule(models.Model):
|
||||
sale_order = self.env['sale.order'].sudo().search([('name', '=', mrp_production.origin)])
|
||||
else:
|
||||
mrp_production = production
|
||||
if sale_order:
|
||||
# if sale_order:
|
||||
# sale_order.write({'schedule_status': 'to schedule'})
|
||||
self.env['sf.production.plan'].sudo().with_company(company_id).create({
|
||||
'name': production.name,
|
||||
'order_deadline': sale_order.deadline_of_delivery,
|
||||
'production_id': production.id,
|
||||
'date_planned_start': production.date_planned_start,
|
||||
'origin': mrp_production.origin,
|
||||
'product_qty': production.product_qty,
|
||||
'product_id': production.product_id.id,
|
||||
'state': 'draft',
|
||||
})
|
||||
self.env['sf.production.plan'].sudo().with_company(company_id).create({
|
||||
'name': production.name,
|
||||
'order_deadline': sale_order.deadline_of_delivery,
|
||||
'production_id': production.id,
|
||||
'date_planned_start': production.date_planned_start,
|
||||
'origin': mrp_production.origin,
|
||||
'product_qty': production.product_qty,
|
||||
'product_id': production.product_id.id,
|
||||
'state': 'draft',
|
||||
})
|
||||
technology_design_values = []
|
||||
all_production = productions
|
||||
grouped_product_ids = {k: list(g) for k, g in groupby(all_production, key=lambda x: x.product_id.id)}
|
||||
|
||||
Reference in New Issue
Block a user