I am facing a problem while writing a service to convert partner into the employee.
I have add
import com.axelor.apps.hr.db.Employee;
import com.axelor.apps.base.db.Partner;
import com.axelor.apps.base.db.repo.PartnerRepository;
import com.axelor.apps.hr.db.repo.EmployeeRepository;
and Also Inject all.
Here I get the Customer ID when through a function (On Button) .
Partner partnerObj = request.getContext().asType(Partner.class);
Long partnerID = partnerObj.getId();
and Here I want to add this ID to the Employee :
Employee newEmployeeObj = new Employee();
newEmployeeObj.setContactPartner(partnerID);
But it show an error message.
Your support is highly appreciated.