During the creation of an invoice, the partner returned by "_get_master_data" depends on inv_type. inv_type = "out_invoice" is for customer invoice inv_type = "in_invoice" is for supplier invoice opw:632392, 632583
d3e7a8e