<field name="qty_done" groups="stock.group_stock_manager" attrs="{'readonly': [('location_id', '=', 8)]}"/>
<button name="split_lot" string="Lot Split" type="object" icon="fa-list" groups="stock.group_production_lot" attrs="{'invisible': ['|', ('lots_visible', '=', False), ('state', 'not in', ['confirmed',
'assigned', 'waiting', 'partially_available','done'])]}"/>
<button name="show_details" string="Modify" type="object" icon="fa-pencil" groups="stock.group_stock_multi_locations" states="confirmed,assigned,waiting,partially_available"/>
<field name="qty_done" groups="purchase.group_purchase_user"/>
倉庫采購各分配一個qty字段,分別進行編輯 和只可見的限制
1、 對qty_done字段進行控制,采購入庫單 倉庫只可見,然而采購不是倉庫管理員
2、對qty_done字段進行控制,是采購單時,倉庫可見能編輯,但是內部調撥單是可以編輯的。