Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

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?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 5 22
2539
0
thg 7 20
4257
0
thg 6 25
974
4
thg 4 25
7704
1
thg 12 24
7206