odoo 某個字段權限設置

<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字段,分別進行編輯 和只可見的限制spa

一、 對qty_done字段進行控制,採購入庫單 倉庫只可見,然而採購不是倉庫管理員ci

二、對qty_done字段進行控制,是採購單時,倉庫可見能編輯,可是內部調撥單是能夠編輯的。qt

相關文章
相關標籤/搜索