콘텐츠로 건너뛰기
메뉴
신고된 질문입니다

In the stock.move.line model of odoo v11 there is a method named _action_done() . I want to send some values with the lot information. For that I needed to use that method and wrote the following:

def _action_done(self):
        res = super(StockMoveLineExt, self)._action_done()
        for ml in self:
            if ml.lot_id and ml.date_expire:
                ml.lot_id.text_field = ml.text_field
        return res


Now the purpose I intend to do is done by this. But it creates a serious problem in stock.move. Like- 

> If I do a POS order/sale then the order picking remains in 'waiting' state. But it should have gone to done stock. 

> For internal transfers there are extra lines on the stock.move.line. This is creating duplicate lines and needs to be deleted manually.

Now, I have overwritten the method by adding needed codes. But I don't want to overwrite the method. What am I doing wrong? How to override this method?

아바타
취소
관련 게시물 답글 화면 활동
0
5월 22
2541
0
7월 20
4261
0
6월 25
1006
4
4월 25
7733
1
12월 24
7213