Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3808 Представления

Hi, the module sale_stock adds warehouse_id into sale.order model,


After created stock.picking object and before delivery the load to a client (stock.picking.state = 'assigned', not 'done' yet) sometimes I need to change a warehouse.


Unfortunatelly warehouse_id in stock.picking, stock.move, stock.quant stays like at the beginning.


When I change the warehouse_id and location_id with the write method that does not affect the rest of the models:


picking_id = self.env['stock.picking'].search([('origin', '=', self.name)]).id

for stock_move in self.env['stock.move'].search([('picking_id', '=', picking_id)]):

stock_move.write({'warehouse_id': self.warehouse_id.id, 

              'location_id': self.warehouse_id.lot_stock_id.id})


Do I need to update all warehouse_id and location_id fields in all models manually?

Shouldn´t it have been all related and update automatically?

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
окт. 22
2234
2
апр. 25
6766
1
июн. 22
5658
1
мар. 19
3515
2
янв. 19
31053