I want to change status of Navigation menu from quotation to sale order when sales confirm. For this i tried to call sale order menu action into action_confirm. but didn't get up-to result.
My action_confirm method code is here:
@api.multi
def action_confirm(self):
if self.partner_id.pet_names:
for record in self.partner_id.pet_names:
if record == self.pet_names_info:
if self.order_line:
for s in self.order_line:
if s.product_id:
if self.ser1 or self.ind_ser1:
self.confirm_rental_service() # Rental service
self.confirm_rental_service_history() # Rental history maintain
break
res = super(sale_order_pet, self).action_confirm()
if res:
self.confirm_email_template()
action = self.env.ref('sale.action_orders').read()[0]
action['res_id'] = self.ids[0]
action['name'] = 'Sales Order'
return action
else:
raise ValidationError("Please Add Products in Order Lines")