flectra/addons/stock/security/stock_security.xml

161 lines
7.6 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
2018-01-16 11:34:37 +01:00
<flectra>
<data noupdate="0">
<record id="group_stock_multi_locations" model="res.groups">
<field name="name">Manage Multiple Stock Locations</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_stock_multi_warehouses" model="res.groups">
<field name="name">Manage Multiple Warehouses</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_stock_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="base.module_category_warehouse_management"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="group_stock_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="base.module_category_warehouse_management"/>
<field name="implied_ids" eval="[(4, ref('group_stock_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
<record id="group_production_lot" model="res.groups">
<field name="name">Manage Lots / Serial Numbers</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_tracking_lot" model="res.groups">
<field name="name">Manage Packages</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_adv_location" model="res.groups">
<field name="name">Manage Push and Pull inventory flows</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_tracking_owner" model="res.groups">
<field name="name">Manage Different Stock Owners</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_warning_stock" model="res.groups">
<field name="name">A warning can be set on a partner (Stock)</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</data>
<data noupdate="1">
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('stock.group_stock_manager'))]"/>
</record>
<!-- multi -->
<record model="ir.rule" id="stock_picking_rule">
<field name="name">stock_picking multi-company</field>
<field name="model_id" search="[('model','=','stock.picking')]" model="ir.model"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_picking_type_rule">
<field name="name">Stock Operation Type multi-company</field>
<field name="model_id" search="[('model','=','stock.picking.type')]" model="ir.model"/>
<field name="global" eval="True"/>
<field name="domain_force">['|', ('warehouse_id', '=', False), '|',('warehouse_id.company_id','=',False),('warehouse_id.company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_warehouse_comp_rule">
<field name="name">Warehouse multi-company</field>
<field name="model_id" ref="model_stock_warehouse"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_location_comp_rule">
<field name="name">Location multi-company</field>
<field name="model_id" ref="model_stock_location"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_move_rule">
<field name="name">stock_move multi-company</field>
<field name="model_id" search="[('model','=','stock.move')]" model="ir.model"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_quant_rule">
<field name="name">stock_quant multi-company</field>
<field name="model_id" ref="model_stock_quant"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_inventory_line_comp_rule">
<field name="name">Inventory Line multi-company</field>
<field name="model_id" ref="model_stock_inventory_line"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_inventory_comp_rule">
<field name="name">Inventory multi-company</field>
<field name="model_id" ref="model_stock_inventory"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_warehouse_orderpoint_rule">
<field name="name">stock_warehouse.orderpoint multi-company</field>
<field name="model_id" search="[('model','=','stock.warehouse.orderpoint')]" model="ir.model"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
</record>
<record model="ir.rule" id="product_pulled_flow_comp_rule">
<field name="name">product_pulled_flow multi-company</field>
<field name="model_id" ref="model_procurement_rule"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_location_path_comp_rule">
<field name="name">stock_location_path multi-company</field>
<field name="model_id" ref="model_stock_location_path"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<!-- Stock Portal Access Rules -->
<record id="stock_picking_rule_portal" model="ir.rule">
<field name="name">Portal Follower Pickings</field>
<field name="model_id" ref="stock.model_stock_picking"/>
<field name="domain_force">['|', '|', ('message_partner_ids', 'in', [user.partner_id.id]), ('partner_id.id', '=', user.partner_id.id), ('sale_id.partner_id.id', '=', user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record model="ir.rule" id="stock_location_route_comp_rule">
<field name="name">stock_location_route multi-company</field>
<field name="model_id" ref="model_stock_location_route"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="product_pulled_flow_comp_rule">
<field name="name">product_pulled_flow multi-company</field>
<field name="model_id" ref="model_procurement_rule"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
</data>
2018-01-16 11:34:37 +01:00
</flectra>