Accept Merge Request #1600: (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/1600?initial=true
This commit is contained in:
@@ -1433,13 +1433,13 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
move_raw_id.quantity_done = move_raw_id.product_uom_qty
|
move_raw_id.quantity_done = move_raw_id.product_uom_qty
|
||||||
record.process_state = '已完工'
|
record.process_state = '已完工'
|
||||||
record.production_id.process_state = '已完工'
|
record.production_id.process_state = '已完工'
|
||||||
if record.routing_type in ['表面工艺']:
|
# if record.routing_type in ['表面工艺']:
|
||||||
raw_move = self.env['stock.move'].sudo().search(
|
# raw_move = self.env['stock.move'].sudo().search(
|
||||||
[('origin', '=', record.production_id.name),
|
# [('origin', '=', record.production_id.name),
|
||||||
('procure_method', 'in', ['make_to_order', 'make_to_stock']),
|
# ('procure_method', 'in', ['make_to_order', 'make_to_stock']),
|
||||||
('state', '!=', 'done')])
|
# ('state', '!=', 'done')])
|
||||||
if raw_move:
|
# if raw_move:
|
||||||
raw_move.write({'state': 'done'})
|
# raw_move.write({'state': 'done'})
|
||||||
record.production_id.button_mark_done1()
|
record.production_id.button_mark_done1()
|
||||||
# record.production_id.state = 'done'
|
# record.production_id.state = 'done'
|
||||||
|
|
||||||
|
|||||||
@@ -279,14 +279,14 @@ class RePurchaseOrder(models.Model):
|
|||||||
'product_uom': server_template.uom_id.id
|
'product_uom': server_template.uom_id.id
|
||||||
}))
|
}))
|
||||||
|
|
||||||
if server_product_process:
|
if server_product_process:
|
||||||
purchase_order = self.env['purchase.order'].sudo().create({
|
purchase_order = self.env['purchase.order'].sudo().create({
|
||||||
'partner_id': server_template.seller_ids[0].partner_id.id,
|
'partner_id': server_template.seller_ids[0].partner_id.id,
|
||||||
'origin': production.name,
|
'origin': production.name,
|
||||||
'state': 'draft',
|
'state': 'draft',
|
||||||
'purchase_type': 'consignment',
|
'purchase_type': 'consignment',
|
||||||
'order_line': server_product_process})
|
'order_line': server_product_process})
|
||||||
consecutive_process_parameters.purchase_id = [(6, 0, [purchase_order.id])]
|
pp.purchase_id = [(6, 0, [purchase_order.id])]
|
||||||
# self.env.cr.commit()
|
# self.env.cr.commit()
|
||||||
|
|
||||||
@api.onchange('order_line')
|
@api.onchange('order_line')
|
||||||
|
|||||||
Reference in New Issue
Block a user