屏蔽物流下单按钮
This commit is contained in:
@@ -50,16 +50,17 @@ class JdEclp(models.Model):
|
|||||||
|
|
||||||
logistics_way = fields.Selection([('自提', '自提'), ('到付', '到付'), ('在线支付', '在线支付')], string='物流方式', readonly=True)
|
logistics_way = fields.Selection([('自提', '自提'), ('到付', '到付'), ('在线支付', '在线支付')], string='物流方式', readonly=True)
|
||||||
|
|
||||||
def button_validate(self):
|
# 暂时屏蔽非自提必须走物流单的逻辑
|
||||||
"""
|
# def button_validate(self):
|
||||||
重写出库方法,获取物流面单
|
# """
|
||||||
"""
|
# 重写出库方法,获取物流面单
|
||||||
res = super(JdEclp, self).button_validate()
|
# """
|
||||||
if self.check_out == 'OUT':
|
# res = super(JdEclp, self).button_validate()
|
||||||
if self.logistics_way != '自提' and self.logistics_way:
|
# if self.check_out == 'OUT':
|
||||||
if self.logistics_status != '2':
|
# if self.logistics_way != '自提' and self.logistics_way:
|
||||||
raise ValidationError('非自提订单,必须先下物流单,并获取物流面单后才可出库!')
|
# if self.logistics_status != '2':
|
||||||
return res
|
# raise ValidationError('非自提订单,必须先下物流单,并获取物流面单后才可出库!')
|
||||||
|
# return res
|
||||||
|
|
||||||
|
|
||||||
@api.depends('name')
|
@api.depends('name')
|
||||||
|
|||||||
@@ -32,10 +32,11 @@
|
|||||||
<field name="is_bill" invisible="True"/>
|
<field name="is_bill" invisible="True"/>
|
||||||
<field name="logistics_status" invisible="True"/>
|
<field name="logistics_status" invisible="True"/>
|
||||||
<field name="logistics_way" invisible="True"/>
|
<field name="logistics_way" invisible="True"/>
|
||||||
<button string="物流下单" name="create_order" type="object" confirm="是否确认物流下单" class="btn-primary"
|
<!-- 暂时屏蔽物流下单 -->
|
||||||
|
<!-- <button string="物流下单" name="create_order" type="object" confirm="是否确认物流下单" class="btn-primary"
|
||||||
attrs="{'invisible': ['|', '|', '|', ('check_out', '!=', 'OUT'), ('state', '!=', 'assigned'), ('is_bill', '=', True), ('logistics_way', '=', '自提')]}"/>
|
attrs="{'invisible': ['|', '|', '|', ('check_out', '!=', 'OUT'), ('state', '!=', 'assigned'), ('is_bill', '=', True), ('logistics_way', '=', '自提')]}"/>
|
||||||
<button string="获取物流面单" name="get_bill" type="object" confirm="是否获取物流面单" class="btn-primary"
|
<button string="获取物流面单" name="get_bill" type="object" confirm="是否获取物流面单" class="btn-primary"
|
||||||
attrs="{'invisible': ['|', '|', '|', '|', ('check_out', '!=', 'OUT'), ('state', '!=', 'assigned'), ('logistics_status', '=', '2'), ('is_bill', '=', False), ('logistics_way', '=', '自提')]}"/>
|
attrs="{'invisible': ['|', '|', '|', '|', ('check_out', '!=', 'OUT'), ('state', '!=', 'assigned'), ('logistics_status', '=', '2'), ('is_bill', '=', False), ('logistics_way', '=', '自提')]}"/> -->
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
Reference in New Issue
Block a user