Correctly guess invoice line type in on_change_product

issue4230
review8601003
(grafted from bc3ed806c80e75ab241a9eaaceee901e5884dc2a)

--HG--
branch : 2.8
extra : source : bc3ed806c80e75ab241a9eaaceee901e5884dc2a