flectra/addons/stock/data/stock_orderpoint_demo.yml

7 lines
329 B
YAML
Raw Normal View History

-
!python {model: stock.location, id: False}: |
main_warehouse = self.env['stock.warehouse'].browse(ref('warehouse0'))
main_stock = main_warehouse.lot_stock_id.id
stowar_ops = self.env['stock.warehouse.orderpoint'].search([('warehouse_id', '=', main_warehouse.id)])
stowar_ops.write({'location_id':main_stock})