Přejít na obsah
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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
kvě 22
2530
0
čvc 20
4254
0
čvn 25
920
4
dub 25
7660
1
pro 24
7199