Quintiq file version 2.0
#parent: #root
Method NewProduct (
  Product_MP parent,
  FormProducts formProducts
) id:Method_DialogCreateEditProduct_NewProduct
{
  #keys: '[135040.0.213312472]'
  Body:
  [*
    // To create a new product
    obj := MacroPlan.Product_MP( relshadow
                                ,ID := ""
                                ,Parent           := parent
                                ,UnitOfMeasure_MP := MacroPlan.DefaultUnitOfMeasure()
                                ,IsDerivedExcludeFromFulfillmentKPI := guard( parent.IsDerivedExcludeFromFulfillmentKPI(), false )
                               );
    
    DataHolderDialogData.Data( &obj );
    
    DataHolderForm.Data( formProducts );
    
    Form.SetDefaultValue();
    
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
