콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3874 화면

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?

아바타
취소
관련 게시물 답글 화면 활동
0
10월 22
2270
2
4월 25
6900
1
6월 22
5752
1
3월 19
3564
2
1월 19
31165