I want to create a class that extends the idempiere product model to create a code from other fields but I don't know which class I should import or what method I should override.
org.compiere.model.MProduct:
public MProduct (X_I_Product impP)
{
this (impP.getCtx(), 0, impP.get_TrxName());
setClientOrg(impP);
setUpdatedBy(impP.getUpdatedBy());
// Value field:
setValue(impP.getValue());
setName(impP.getName());
setDescription(impP.getDescription());
setDocumentNote(impP.getDocumentNote());
setHelp(impP.getHelp());
setUPC(impP.getUPC());
setSKU(impP.getSKU());
setC_UOM_ID(impP.getC_UOM_ID());
setM_Product_Category_ID(impP.getM_Product_Category_ID());
setProductType(impP.getProductType());
setImageURL(impP.getImageURL());
setDescriptionURL(impP.getDescriptionURL());
setVolume(impP.getVolume());
setWeight(impP.getWeight());
} // MProduct