I'm trying to override button "confirm order" in module "Purchase". This button will change a quotation into a purchase order (state: Purchase Confirmed), simultaneous automatically create a new receipt in module "Warehouse" so when I click button "Receive Products", I can see the receipt.
I tried to super many different functions but when i clicked the button, it just changed state, not create a new receipt. Beside, I found out that this button is from workflow and its function may be "wkf_confirm_order" but it didn't work.
@api.multi
def purchase_confirm(self):
#super(purchase_order,self).wkf_bid_received()
super(purchase_order,self).wkf_confirm_order()
#super(purchase_order,self).wkf_approve_order()
return True
Please, help me to find the correct function. I really appreciate your help. Thanks in advance.
To know which function of that model will be called while you click on that button you need to follow these steps.
Click here to know more about workflow.