Quotation/Sales Item: discount_percentage and rate get overwritten right after item is added to table

Hi there,

i’m trying to add items in Quotation, through a custom script, with ignore_pricing_rule flagged and adding a discount_percentage and rate value to items that’s different from price_list_rate.

Now, just after items are added, discount_percentage and rate get overwritten to 0 and price_list_rate respectively.

It seems some script are triggered without taking in account actual discount_pecentage and rate values.

Any hint on how to prevent that?