我希望在销售确认时将导航菜单的状态从报价单更改为销售订单。为此我试图将销售订单菜单操作调用到action_confirm。但没有得到结果。
我的action_confirm方法代码在这里:
@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")