Saturday, June 3, 2023
2 changes · master
Miscellaneous changes
This commit fixes two bugs linked to the deferred entries generation: 1. Deferred entries generation for 'on_validation' method Currently `on_validation` and `manual` methods worked the same way: the deferred entry is generated on the last day of a period, and reverted the following day. Now, we'll keep this way of working for the manual & grouped mode, but not for the on validation mode. Instead, when validating an expense (e.g. 1000e from 1st Jan until 30st April) we will: - Totall
Original PR description
This commit fixes two bugs linked to the deferred entries generation: 1. Deferred entries generation for 'on_validation' method Currently `on_validation` and `manual` methods worked the same way: the…
This commit fixes two bugs linked to the deferred entries generation: 1. Deferred entries generation for 'on_validation' method Currently `on_validation` and `manual` methods worked the same way: the deferred entry is generated on the last day of a period, and reverted the following day. Now, we'll keep this way of working for the manual & grouped mode, but not for the on validation mode. Instead, when validating an expense (e.g. 1000e from 1st Jan until 30st April) we will: - Totally defer the invoice lines (with a deferred start/end date) on the last day of the invoice's month. (e.g.: move 1000 from the expense account to the deferral account) - For each period in [start, end], create a deferral entry proportionnaly to the total amount to be differred (e.g.: 250e taken from the deferral account to the expense account). If there is only one period (e.g. 1st Jan until 31st Janu), it means that we don't need to defer the expense/revenue since the invoice deferral and its deferred entry will be created on the same day and will thus cancel each other. This commit also adds the name of the document to the reference of the generated entries and their lines for simpler auditing. 2. Already generated deferred If the user open the Deferred report and clicks multiple times on the "Generate entry" button, the entries will be generated again for the same lines. It also happens if the user goes from "on validation" mode to "manually and grouped", the already generated deferred entries will be generated again after clicking the button. There is now a filter on already deferred entries. Furthermore, a warning banner is now also displayed on the report if the report shows already deferred moves to make it clearer that the generated entry might be different from the report values. opw-3338068 Forward-Port-Of: odoo/enterprise#41414
[FIX] website_sale_renting: fix date consistency issues Currently, when a customer clicks on a renting product name, while in the cart, he is redirected to the product page. The date picker should show the dates of the sale order's first sale order line but it fails and shows the wrong date because they are cached on the page. Also, the date is shown in the wrong timezone because the timezone between the cart and the product page is not well handled. Now, the date picker shows the date of
Original PR description
[FIX] website_sale_renting: fix date consistency issues Currently, when a customer clicks on a renting product name, while in the cart, he is redirected to the product page. The date picker should show the dates of the sale order's first sale order line but it fails and shows the wrong date because they are cached on the page. Also, the date is shown in the wrong timezone because the timezone between the cart and the product page is not well handled. Now, the date picker shows the date of the sale order's first sale order line. Also: drop moment.js in favor of luxon task-3293848 Forward-Port-Of: odoo/enterprise#41838 Forward-Port-Of: odoo/enterprise#40534