增加功能:当为非“自提”单时,必须进行物流下单才能进行出库操作。增加对字段的显隐控制

This commit is contained in:
mgw
2024-01-23 16:13:53 +08:00
parent 0254387c03
commit 5c129331e0
2 changed files with 18 additions and 6 deletions

View File

@@ -31,10 +31,11 @@
<xpath expr="//form//header//button[@name='action_assign']" position="after">
<field name="is_bill" invisible="True"/>
<field name="logistics_status" invisible="True"/>
<field name="logistics_way" invisible="True"/>
<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"
attrs="{'invisible': ['|', '|', '|', ('check_out', '!=', 'OUT'), ('state', '!=', 'assigned'), ('is_bill', '=', False), ('logistics_way', '=', '自提']]}"/>
attrs="{'invisible': ['|', '|', '|', ('check_out', '!=', 'OUT'), ('state', '!=', 'assigned'), ('is_bill', '=', False), ('logistics_way', '=', '自提')]}"/>
</xpath>
</field>
</record>
@@ -46,8 +47,8 @@
<field name="arch" type="xml">
<field name="location_id" position="after">
<field name="logistics_status"/>
<field name="logistics_way"/>
<field name="logistics_status" attrs="{'invisible': [('check_out', '!=', 'OUT')]}"/>
<field name="logistics_way" attrs="{'invisible': [('check_out', '!=', 'OUT')]}"/>
</field>
<xpath expr="//group//field[@name='carrier_id']" position="after">