mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
add procurement for service
This commit is contained in:
17
app_procurement_for_service/init_hook.py
Normal file
17
app_procurement_for_service/init_hook.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Author: Damien Crier
|
||||
# Copyright 2017 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import SUPERUSER_ID
|
||||
from odoo.api import Environment
|
||||
|
||||
|
||||
def post_init_hook(cr, pool):
|
||||
env = Environment(cr, SUPERUSER_ID, {})
|
||||
create_warehouse_procurement_rules(env)
|
||||
|
||||
|
||||
def create_warehouse_procurement_rules(env):
|
||||
warehouses = env['stock.warehouse'].with_context(
|
||||
active_test=False).search([])
|
||||
warehouses._set_subcontracting_service_proc_rule()
|
||||
Reference in New Issue
Block a user