取消物流单屏蔽
This commit is contained in:
@@ -50,17 +50,16 @@ class JdEclp(models.Model):
|
||||
|
||||
logistics_way = fields.Selection([('自提', '自提'), ('到付', '到付'), ('在线支付', '在线支付')], string='物流方式', readonly=True)
|
||||
|
||||
# 暂时屏蔽非自提必须走物流单的逻辑
|
||||
# def button_validate(self):
|
||||
# """
|
||||
# 重写出库方法,获取物流面单
|
||||
# """
|
||||
# res = super(JdEclp, self).button_validate()
|
||||
# if self.check_out == 'OUT':
|
||||
# if self.logistics_way != '自提' and self.logistics_way:
|
||||
# if self.logistics_status != '2':
|
||||
# raise ValidationError('非自提订单,必须先下物流单,并获取物流面单后才可出库!')
|
||||
# return res
|
||||
def button_validate(self):
|
||||
"""
|
||||
重写出库方法,获取物流面单
|
||||
"""
|
||||
res = super(JdEclp, self).button_validate()
|
||||
if self.check_out == 'OUT':
|
||||
if self.logistics_way != '自提' and self.logistics_way:
|
||||
if self.logistics_status != '2':
|
||||
raise ValidationError('非自提订单,必须先下物流单,并获取物流面单后才可出库!')
|
||||
return res
|
||||
|
||||
|
||||
@api.depends('name')
|
||||
|
||||
Reference in New Issue
Block a user