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

Hi all, is it possible to stop merging same products on delivery orders or purchase orders ?

I think this is done in _prepare_pack_ops function, but i can't find a way to stop this behaviour, so each line on Initial Demand create a line on Operations tab, even if the product is the same ?

Thank you

อวตาร
ละทิ้ง

Don't know. But can you give me any use case when you need this kind of behaviour..

ผู้เขียน

The use case is simple Pinakin: you create a sale order with the same product (or variant), but with different description, and you want this description on the delivery order, how can we achieve that ?

ผู้เขียน

I just edited my question, as this occurs not only on delivery orders, but in all pickings, as the problem is the same with purchase ...

คำตอบที่ดีที่สุด

In the function _action_confirm, stock moves default to merge=True. You can pass ._action_confirm(merge=False) to disable merging for specific moves.

Alternatively, if you want to disable merging entirely, you can override the _merge_moves method like this:

def _merge_moves(self, merge_into=False):
    return self

This will prevent any move merging in all cases.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

hey , done this in odoo11 , stock stock_move.py

        #if merge:
            #return self._merge_moves(merge_into=merge_into)
        return self

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
เม.ย. 19
3513
1
พ.ค. 25
1286
2
พ.ค. 25
1360
Odoo online merge tickets how to แก้ไขแล้ว
2
ส.ค. 24
2089
2
ม.ค. 24
2897