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

Hi All,

Is it possible to automaticly confirm a draft po order?


kind regards,


Chris

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Chris,

If you have no technical background.

I'd recommend creating an automated action like this one:


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi 

You Can inherit the purchase.order model and add the confirm action inside the create action.

Try with this code


class PurchaseOrderInherit(models.Model):
_inherit = 'purchase.order'


@api.model
def create(self, vals_list):
purchase = super(PurchaseOrderInherit, self).create(vals_list)
purchase.button_confirm()
return purchase


Regards

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

@julien


is the a way to email the confirmed po? if i confirm the po with hand then i get an email with the ordered item. However when its automated i also get the email but the pdf does not show the product that needs to be ordered?

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

You can create a custom module ,add new models.py python file inside the module then add this code on there.
check this link
https://www.youtube.com/watch?v=BDepk0LhVuI