netlist_exporter_xml: ensure the list of parts is included in netlist.

This is obviously mandatory to build a BOM
DIALOG_BOM: generate a full xml netlis. We don't know what is needed by scripts
Fixes #12918
https://gitlab.com/kicad/code/kicad/issues/12918
This commit is contained in:
jean-pierre charras 2022-11-25 08:55:21 +01:00
parent 9766351ee6
commit e5877e0840
2 changed files with 3 additions and 3 deletions

View File

@ -342,7 +342,7 @@ void DIALOG_BOM::OnRunGenerator( wxCommandEvent& event )
#endif #endif
if( m_parent->ReadyToNetlist( _( "Generating BOM requires a fully annotated schematic." ) ) ) if( m_parent->ReadyToNetlist( _( "Generating BOM requires a fully annotated schematic." ) ) )
m_parent->WriteNetListFile( NET_TYPE_BOM, fullfilename, GNL_OPT_BOM, &reporter ); m_parent->WriteNetListFile( NET_TYPE_BOM, fullfilename, GNL_OPT_BOM|GNL_ALL, &reporter );
m_Messages->SetValue( reportmsg ); m_Messages->SetValue( reportmsg );

View File

@ -53,12 +53,12 @@ bool NETLIST_EXPORTER_XML::WriteNetlist( const wxString& aOutFileName, unsigned
if( !stream.IsOk() ) if( !stream.IsOk() )
return false; return false;
wxXmlDocument xdoc; wxXmlDocument xdoc;
unsigned aCtl = aNetlistOptions; unsigned aCtl = aNetlistOptions;
if( aNetlistOptions & GNL_OPT_BOM ) if( aNetlistOptions & GNL_OPT_BOM )
aCtl |= ( GNL_SYMBOLS | GNL_HEADER ); aCtl |= ( GNL_SYMBOLS | GNL_HEADER | GNL_PARTS );
else else
aCtl |= GNL_ALL; aCtl |= GNL_ALL;