12 lines
482 B
YAML
12 lines
482 B
YAML
-
|
|
!python {model: stock.warehouse, id: False}: |
|
|
pull_obj = self.env['procurement.rule']
|
|
wh_to_assign = ['stock_warehouse_shop0']
|
|
for wh_ref in wh_to_assign:
|
|
warehouse = self.browse(ref('stock.' + wh_ref))
|
|
#Force the rewriting of route and rule
|
|
warehouse.write({'buy_to_resupply': True})
|
|
partner_id = ref('stock.res_partner_company_1')
|
|
warehouse = self.search([('partner_id', '=', partner_id)])
|
|
warehouse.write({'buy_to_resupply': True})
|