Skip to Content
Menu
This question has been flagged

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?

Avatar
Discard
Related Posts Replies Views Activity
0
May 22
1396
0
Jul 20
3194
0
Oct 24
109
3
Jan 24
2905
2
May 23
630