Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
3992 Переглядів

Hi,


In Purchase Agreement, when I change the quantity product in purchase requisition line and the qty ordered automatically set to 0 even I did not anything in purchase order. 

How can we prevent this action?

Could anyone help me to prevent this?

Many thanks in advance.

Аватар
Відмінити

how you achieve that it change to 0? what version? please detail.

Автор

Hi Mindaugas Paulauskas,

I am using odoo 12.

I create the purchase agreement with some of products that have the quantity is 10. I create the purchase order based on this agreement and the quantity purchase is lower than 10.

After the PO confirmed, I back to purchase agreement and change the quantity to the other one. At this time, the qty ordered has been set to 0 automatically.

Автор Найкраща відповідь

The root cause for this issue is: purchase.requisition.line return the new object ID; hence; the compute function cannot find the purchase.requisition id from "record.requisition_id" (it returns False).

I've been worked around by overriding the compute function. Replace the record.requisition_id by searching (['line_ids','=',record.id]) in model purchase_requisition. if record is new then return order_qty = 0.

Please let me know if my work around is not correct.

Thanks

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
січ. 23
1827
1
лют. 19
3007
1
лип. 25
1678
2
черв. 16
5391
0
серп. 15
3633