Thursday, May 20, 2021
3 changes · master
Resolved issues and error corrections
This change ensures tracked links cannot be duplicated when they use the same URL and campaign details. It also makes link creation behave more predictably, so users see a clear error instead of being redirected to an existing record unexpectedly.
Original PR description
Purpose ======= Add a unicity constraint (main fields must have a unique combination). As we must care about null values, we can not implement it in SQL (possible in pure SQL, but we will need to create an index on the columns, which is not possible in Odoo if we want to customize the error message). Clean the code, before the "search or create" behavior was implemented in the create, causing strange behavior (creating a link tracker with the same values as an existing one didn't raise an error, but open the form view of the existing link tracker).
Fixed an issue in Point of Sale where reprinting a receipt could randomly fail because the receipt content was prepared in a way that was not always available. This makes receipt reprints more dependable for cashiers and reduces disruptions at checkout.
Original PR description
Because the `receiptHtml` was taken from a component which was mounted outside of the DOM, it was hardly ever destroyed for some unknown reasons and the `el.outerHTML` could not be taken to create the receipt.
The update fixes how existing tracking links are reused when referral or social push notification links are created. This prevents confusing behavior where creating a duplicate link could unexpectedly open an existing record instead of following a clear reuse process.
Original PR description
Purpose ======= Clean the code, before the "search or create" behavior was implemented in the create, causing strange behavior (creating a link tracker with the same values as an existing one didn't raise an error, but open the form view of the existing link tracker). Task-2090344