Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4110 มุมมอง

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?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ค. 22
2187
0
ก.ค. 20
3931
0
มิ.ย. 25
106
4
เม.ย. 25
6547
1
ธ.ค. 24
6794