[13.0] [FIX] purchase_discount: set currency rate correctly
[13.0] [FIX] purchase_discount: set currency rate correctly

As mentioned on #923 (comment)

Before this commit, we was creating new currency rate for same date which was triggering odoo/odoo@0114270 constraints so the tests were failing.

No we search for currency rate of the same day and set rate to `1.0` or create new rate.

OCA/purchase-workflow,OCA/purchase-workflow