def form_valid(form, self): form.instance.customer = self.request.user.id form.instacen.status = 'P' form.instance.employee = Customer.getAnEmployee() return super().form_valid(form)
def form_valid(self, form): form.instance.customer = self.request.user.customer form.instance.employee = Customer.getAnEmployee() return super().form_valid(form)