Accept Merge Request #1672: (feature/part_number -> 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/1672
This commit is contained in:
@@ -654,7 +654,10 @@ class StockPicking(models.Model):
|
||||
if self.location_id.name == '成品存货区' and self.location_dest_id.name == '客户':
|
||||
sale_id = self.env['sale.order'].sudo().search(
|
||||
[('name', '=', self.origin)])
|
||||
if sale_id and all(move.product_uom_qty == move.quantity_done for move in self.move_ids):
|
||||
check_backorder = self._pre_action_done_hook()
|
||||
if check_backorder is not True:
|
||||
return res
|
||||
if sale_id:
|
||||
sale_id.write({'state':'delivered'})
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user