When purchase order created that time automatic confirm purchase order.
code:
@api.model
def create(self, vals):
res = super(PurchaseOrder, self).create(vals)
res.button_confirm()
Error:
AttributeError: 'NoneType' object has no attribute 'id'
can you please help me, how to do that auto-confirm purchase order?
Thanks.
Which model did you add this code to? I'm trying to autoconfirm POs and cant find where to put this code.