205 lines
10 KiB
XML
205 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<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>
|
|
|
|
<!-- Multi Branch rule -->
|
|
<record id="location_multi_branch_rule" model="ir.rule">
|
|
<field name="name">Locations multi-branch</field>
|
|
<field name="model_id" ref="model_stock_location"/>
|
|
<field name="global" eval="True"/>
|
|
<field name="domain_force">['|', ('branch_id', '=', False), '|', ('branch_id', '=', user.default_branch_id.id),
|
|
('branch_id', 'in', user.branch_ids.ids)]
|
|
</field>
|
|
</record>
|
|
|
|
<record id="picking_type_multi_branch_rule" model="ir.rule">
|
|
<field name="name">Picking type multi-branch</field>
|
|
<field name="model_id" ref="model_stock_picking_type"/>
|
|
<field name="global" eval="True"/>
|
|
<field name="domain_force">['|', ('warehouse_id','=',False), '|', ('warehouse_id.branch_id','=',False), '|', ('warehouse_id.branch_id','in',[branch for branch in user.branch_ids.ids]), ('warehouse_id.branch_id','=', user.default_branch_id.id)]
|
|
</field>
|
|
</record>
|
|
|
|
<record id="warehouse_multi_branch_rule" model="ir.rule">
|
|
<field name="name">Warehouse multi-branch</field>
|
|
<field name="model_id" ref="model_stock_warehouse"/>
|
|
<field name="global" eval="True"/>
|
|
<field name="domain_force">['|', ('branch_id', '=', False), '|', ('branch_id', '=', user.default_branch_id.id),
|
|
('branch_id', 'in', user.branch_ids.ids)]
|
|
</field>
|
|
</record>
|
|
|
|
<record id="picking_multi_branch_rule" model="ir.rule">
|
|
<field name="name">Picking multi-branch</field>
|
|
<field name="model_id" ref="model_stock_picking"/>
|
|
<field name="global" eval="True"/>
|
|
<field name="domain_force">['|', ('branch_id', '=', False), '|', ('branch_id', '=', user.default_branch_id.id),
|
|
('branch_id', 'in', user.branch_ids.ids)]
|
|
</field>
|
|
</record>
|
|
|
|
<record id="stock_move_multi_branch_rule" model="ir.rule">
|
|
<field name="name">Stock Move multi-branch</field>
|
|
<field name="model_id" ref="model_stock_move"/>
|
|
<field name="global" eval="True"/>
|
|
<field name="domain_force">['|', '|', ('location_id.branch_id','=',False),('location_id.branch_id','in',[branch for branch in user.branch_ids.ids]), ('location_id.branch_id','=',user.default_branch_id.id),
|
|
'|', '|', ('location_dest_id.branch_id','=',False),('location_dest_id.branch_id','in',[branch for branch in user.branch_ids.ids]), ('location_dest_id.branch_id','=',user.default_branch_id.id)]
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</flectra>
|