Not possible to change unit of input exchanges

Issue #55 new
giuseppe cardellini
created an issue

In a custom dataset it is not possible to give a unit to the input exchanges different than the one of the Activity input.

Take this example:

new_db[(new_db_name, chips_name)]= {'code':chips_name ,
 'database': new_db_name,
 'exchanges': [  {'amount': 1/dens, #we convert kg to m3 based on the wood  density
   'input': ('ecoinvent 3.2 cutoff', 'b6ac21e223c037d9306c884ca3b6c496'),  #we take the wood chips from ecoinvent which is in kilogram
   'output': (new_db_name, chips_name),  
   'name': 'wood chips, wet, measured as dry mass',
   'type': 'technosphere',
   'unit': 'cubic meter'},
 'location': 'RER',
 'name': chips_name,
 'type': 'process',
 'unit': 'cubic meter'}

the input exchange ('ecoinvent 3.2 cutoff', 'b6ac21e223c037d9306c884ca3b6c496') is in kg and I want to convert it to m3 but:

list(get_activity((new_db_name, chips_name)).exchanges())

[ Exchange: 0.002325581395348837 kilogram 'softwood forestry, mixed species, sustainable forest management' (kilogram, CH, None) to 'wood_chips' (cubic meter, RER, None)>]

The amount is changed correctly but the unit is not. I guess this is because bw2 looks for the unit of the Activity (of ecoinvent wood chips in this case).