Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
12109 Lượt xem

I want modify sale order removing a sale order line but odoo show me saying that this is impossible.

Which is the method to eliminate if the order is NOT in draft

Ảnh đại diện
Huỷ bỏ

Hi did you try the option in the Sales settings(Sale Order Modification)?

and you can change the ordered quantity to zero.

Tác giả

Yes but, when order is created, create moves in inventory and I cant remove quantitys

Câu trả lời hay nhất

Hi,

I think when you remove the sale order line, the unlink method of the sale.order.line will be called (ref: https://github.com/odoo/odoo/blob/65f5fc6bf8442fc7004d0fc8e006184359f0fe4e/addons/sale/models/sale.py#L928-L932)
Therefore, if you want to delete a sale order line after the sale order is confirmed, I suggest you to "cancel" to sale order and "set to quotation" and remove the sale order line at the quotation state.

Best regards,

Tim

Ảnh đại diện
Huỷ bỏ
Tác giả

Good reply! Thx

You are welcome!

Câu trả lời hay nhất

Hi,

I think it is the default behavior of Odoo. However you can edit the product quantity of the sale order line to zero like Avinash NK said(You can't do it if you selected the settings no edits for sale order).


If you need to do it by code then you can override the unlink method for sale.order.line and make required changes.

Ảnh đại diện
Huỷ bỏ
Tác giả

The problem is stock moves.. :(

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 23
2091
0
thg 9 23
1832
2
thg 6 25
11318
6
thg 10 23
22185
3
thg 3 24
9581