Hello everyone,
I try to call the "Create Backorder?" Wizard pop up using a Server Action. I created a button in the form view for the Server Action. But an error occured stating: Answers appreciated thank you!
AttributeError: 'stock.picking' object has no attribute 'open_wizard'
Below is my code:
def open_wizard(self):
return {
'name': 'Create Backorder?',
'type': 'ir.actions.act_window',
'view_mode': 'form', 'res_model':
'stock.backorder.confirmation',
'views': [[1530, 'form']],
'view_id': 1530, 'target':
'new', 'context': {
'button_validate_picking_ids': [27],
'default_show_transfers': False,
'default_pick_ids': [[4, 27]]
}
}
actions = records.open_wizard()