Wednesday, March 27, 2024
7 changes
1 change
Enhancements to existing features
This update prepares custom Python-based taxes to work more reliably in Point of Sale by making product tax data less restrictive and easier to extend. It also improves tax helper structure so localization and accounting modules can customize tax behavior without disrupting existing setups.
Original PR description
--- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
4 changes
Enhancements to existing features
Timer behavior was improved so separate screens or components can run their own timers without unintentionally sharing the same timer state. This makes time tracking more reliable for users working across helpdesk and timesheet views.
Original PR description
[IMP] timer: convert TimerService into Reactive class Before this commit: The main problem with the timer service is 2 components mounted cannot launch a timer independently, they share the same timer because the service gives the same timer object. After this commit: TimerService was converted into a reactive class. task-3530794
The attendance Gantt planning view is being adjusted to work with the new attendance-contract connection. This helps ensure employee attendance scheduling and contract-related information stay aligned as the HR attendance tools evolve.
Lithuanian balance sheet and profit and loss reports now rely on account tags instead of fixed account code assumptions. This gives businesses more flexibility to map their own chart of accounts while keeping report results consistent.
Original PR description
Currently the BS and P&L use a mix of account codes and tags. But there is no fixed or legally required CoA in Lithuania. So we should rather only use tags so that the users can more decide where the accounts go in the BS / P&L. This commit converts the codes to tags. The P&L lines already using the domain engine for tags were converted to account_codes engine. Also the profit and loss entries in the BS are now computed the same way as the P&L. task-3701151
Belgian payroll users can now export social security certificates and social balance sheets to Excel, making the reports easier to share and analyze. Social balance sheet calculations are now prepared month by month, improving accuracy for figures that must be assessed on a monthly basis.
Original PR description
This PR adds the export to xlsx for the social security certificate and the social_balance_sheet for the l10n belgian payroll. I split the pdf export method to not have to copy paste the data retrieval code and make it easy, if needed in the future, to adapt the methods to export in the two format at the same time or to change the data structure without having to retrieve the data 2 times. In addition to that the reports for the social balance sheet is now split by a period of one month instead of being done for the whole period at once. This has be done because the social balance sheet needs to be done for each month of the period because some data have to be kept into a certain ratio each month and thus a whole period ratio is not correct. task-3506703 / 3506713
2 changes
Enhancements to existing features
This update significantly improves the speed of the Point of Sale system when processing numpad button presses, especially for businesses with large product catalogs. By implementing a smart caching system, the system now responds almost instantly instead of taking 15+ seconds, making the checkout experience much faster and more responsive for cashiers.
Original PR description
Description of the issue/feature this PR addresses: This commit addresses slow performance of the JS `OrderLine.findAttribute` method when `attributes_by_ptal_id` is exceedingly large. Before this…
Description of the issue/feature this PR addresses: This commit addresses slow performance of the JS `OrderLine.findAttribute` method when `attributes_by_ptal_id` is exceedingly large. Before this commit, `findAttribute` would loop over all the values of `this.pos.attributes_by_ptal_id`, and filter out only the attributes that have at least one of the passed in ptal IDs (from the `values` parameter) within the attribute's "values" list. It would also modify the attribute to include a `"valuesForOrderLine"` key mapping to a list of all of the found ptal IDs from that attribute's values. This method becomes slow when `this.pos.attributes_by_ptal_id` is very large. Since it needs to loop over every single attribute. This commit provides a workaround to this slowness, by caching the search for valid attributes that this method performs in a lookup table. First, we construct the lookup table in `_processData` method of the `PosStore` class. `_add_ptal_ids_by_ptav_id` does this, by looping over all the values of all the attributes, mapping the ptav ID of the attribute to all the ptal IDs we find. Now, inside `findAttribute`, we will instead loop over each of the passed in `values`. For each value, we will retrieve the all the cached ptal IDs from `this.pos.ptal_ids_by_ptav_id` for the given value. Now that we have the ptal IDs, we can get all the corresponding attributes from `this.pos.attributes_by_ptal_id`. For each of those attributes, we can do the same modification from the original method by adding the `"valuesForOrderLine"` key/value. Finally we return all the modified attributes. This new method has a nested for loop, which may seem like a problem. But I believe that both the things being looped over (`values` and `this.pos.ptal_ids_by_ptav_id[value]`) should be very small compared to the potential size of `this.pos.attributes_by_ptal_id`. (43,000 in this customer's DB) `findAttributes` is called many times whenever the POS's numpad buttons are pressed, so this commit has the overall effect of drastically reducing the input latency for a numpad press. However, I do believe that this is a workaround, and the real problem is that the entire `attributes_by_ptal_id` is always passed to the POS, regardless of what products are actually being ordered. `attributes_by_ptal_id` should instead be incrementally fetched as products are ordered (if this is possible). Benchmarks (in customer DB): Before commit, each keypad press took around 1-3 seconds per Order Line present in the POS. For 11 products this was ~15 second latency. After commit, each keypad press is almost instant. The `ptal_ids_by_ptav_id` lookup table will consume additional memory, in this customer's DB I've estimated it to be about 0.3MB more memory. Taking memory snapshots in profiler shows no significant different between versions, however this is inconsistent. Will attach profiler results to PR. Current behavior before PR: Poor performance of `OrderLine.findAttribute` Desired behavior after PR is merged: Fast performance of `OrderLine.findAttribute` for a memory tradeoff. opw-3788840
This improvement removes unnecessary attribute parameters from product URLs when a product has no variants. Previously, product URLs would display with empty attribute markers (e.g., /shop/product-1#attr=), which looked unprofessional. Now, simple products without variants will have clean, straightforward URLs (e.g., /shop/product-1), improving the appearance and user experience of your eCommerce store.
Original PR description
Description of the issue/feature this PR addresses: Avoid ugly URL if no variant on your eCommerce. Current behavior before PR: Product URL are like /shop/product-1#attr= Desired behavior after PR is merged: Product URL are like /shop/product-1 when no attributes --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr