Wednesday, February 1, 2023
37 changes · master
Enhancements to existing features
Odoo now reuses the same internal working environment during system startup and module setup instead of recreating it repeatedly. This reduces duplicated code for developers and helps make module installation and maintenance logic more consistent, with a related fix ensuring some localization translation-loading steps are actually run.
Original PR description
The goal of this revision is to re-use the environment among the
different steps of the registry loading,
instead of creating a new environment for each step.
1. Simply To avoid to repeat the line
`env = api.Environment(cr, SUPERUSER_ID, {})`
multiple times in the code
2. This also allows to share the context among the different
steps. This is not yet used in this revision, but it could
be, for instance to avoid the current repetition to add the keys
`install_module`, in `convert_csv_import` and `xml_import._tag_record`Lot and serial number labels now print in cleaner, more practical formats. The update adds common retail label sizes and supports both PDF and ZPL outputs, making labels easier to use in warehouse and retail operations.
Original PR description
Currently, when going in Products>Lots/Serial Numbers and printing labels, the output is just ugly. In this commit, There are a bunch of usual retail label sizes in pdf or zpl code. Task - 2678364
Website editors can now change a link's visible text directly from the link editing panel, making content updates faster and clearer. The change preserves overall formatting where possible and hides the text field for links that include media such as images or icons.
Original PR description
This commit adds a "text" input below the URL input in the link editor so user can use that zone when they need to edit link name. This link name is updated only when the input is changed so we don't lose formatting (e.g. if one letter is bold). Only the formatting applied to the entire selection is kept. (e.g. if you have a "link <b>like</b> this", nothing will be in bold if you update the label in the editor panel. Also, if there is a media in the selection (image, icon), the "text" input will be hidden. task-2900529
This update refreshes Odoo's spreadsheet engine with many usability fixes and small improvements. Users should see smoother collaboration, better editing behavior, improved menus, more reliable filtering and merging, and refinements to charts and spreadsheet layout handling.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/dac9cfd14 [REF] collaborative: don't dispatch commands twice to views…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/dac9cfd14 [REF] collaborative: don't dispatch commands twice to views https://github.com/odoo/o-spreadsheet/commit/04459ca94 [FIX] sheetview: check active sheet exists https://github.com/odoo/o-spreadsheet/commit/2f1852560 [FIX] EdgeScroll: Allow edge scrolling through hidden columns https://github.com/odoo/o-spreadsheet/commit/de4abb0b4 [IMP] Registry: add sequence to chart registry https://github.com/odoo/o-spreadsheet/commit/bb110f20d [IMP] Header: auto-resize of row height https://github.com/odoo/o-spreadsheet/commit/bfe777ada [IMP] topbar: CSS tweaking https://github.com/odoo/o-spreadsheet/commit/73379f013 [FIX] collaborative: don't render uselessly https://github.com/odoo/o-spreadsheet/commit/3dd59192a [FIX] freeze: check overlapping merge with command sheet https://github.com/odoo/o-spreadsheet/commit/520fdad1e [FIX] header size: compute the size before duplicating the sheet https://github.com/odoo/o-spreadsheet/commit/bc62fcff2 [FIX] data filters: don't copy filter values https://github.com/odoo/o-spreadsheet/commit/8ed593daa [FIX] merges: validate zone to unmerge https://github.com/odoo/o-spreadsheet/commit/21d1fb7e0 [FIX] collaborative: validate remote commands with allowDispatch https://github.com/odoo/o-spreadsheet/commit/ba4f998cb [FIX] collaborative: transform remote commands before dispatch to UI https://github.com/odoo/o-spreadsheet/commit/d811b1f08 [IMP] Function: add `hidden` tag to hide functions https://github.com/odoo/o-spreadsheet/commit/d24b6f09e [FIX] composer: (real) support of IME https://github.com/odoo/o-spreadsheet/commit/3edc780fd [FIX] popover: preserve scroll in popover https://github.com/odoo/o-spreadsheet/commit/4da67942c [FIX] topbar: properly toggle menus https://github.com/odoo/o-spreadsheet/commit/ecdd45fd6 [FIX] menu: reduce redundant calls to getter https://github.com/odoo/o-spreadsheet/commit/ccd231e4e [FIX] ripple: use `window.getComputedStyle()` only in `onClick` https://github.com/odoo/o-spreadsheet/commit/c8b5f70fc [FIX] drag&drop: preventDefault on passive wheel event https://github.com/odoo/o-spreadsheet/commit/db5b00246 [FIX] figure resizer: fix CSS https://github.com/odoo/o-spreadsheet/commit/a05fa98c2 [FIX] chart: default chart background behaviour https://github.com/odoo/o-spreadsheet/commit/015dd2cff [FIX] ColorPicker : showing black color selected upon reset https://github.com/odoo/o-spreadsheet/commit/3710b7df1 [IMP] css: use cssPropertiesToCss helper everywhere https://github.com/odoo/o-spreadsheet/commit/cd424377e [REF] tests: use helpers in autocomplete dropdown tests https://github.com/odoo/o-spreadsheet/commit/73c7dce73 [IMP] EventStream: self releasing does not call the release callback https://github.com/odoo/o-spreadsheet/commit/01e001d5a [IMP] demo: add Owl error handling in demo.js https://github.com/odoo/o-spreadsheet/commit/d1ad65205 [FIX] `Grid`: double click should target the main cell https://github.com/odoo/o-spreadsheet/commit/ccfd28c42 [IMP] Grid Composer: add cell reference when scrolling https://github.com/odoo/o-spreadsheet/commit/41708c7ae [FIX] Reference: Support sheet names containing exclamation points https://github.com/odoo/o-spreadsheet/commit/84d8ffab6 [FIX] package-lock.json: solve conflict in file https://github.com/odoo/o-spreadsheet/commit/98ad66f29 [FIX] config: bump owl version to 2.0.3 https://github.com/odoo/o-spreadsheet/commit/9a618dbb2 [IMP] top bar: add menu item to insert formula functions https://github.com/odoo/o-spreadsheet/commit/289ec5b92 [REF] compiler: use code builder https://github.com/odoo/o-spreadsheet/commit/71ae6cfa0 [FIX] grid_overlay: properly detect grid overlay resize https://github.com/odoo/o-spreadsheet/commit/be62b9ebf [FIX] sheetView: grid composer at wrong pos when cell not in viewport https://github.com/odoo/o-spreadsheet/commit/b3da747df [IMP] Autofill: alphanumeric values https://github.com/odoo/o-spreadsheet/commit/ca5becafa [IMP] composer: add multi line composer handling https://github.com/odoo/o-spreadsheet/commit/4aea6af88 [IMP] mockContentHelper: use focus to change window.mockContentHelper https://github.com/odoo/o-spreadsheet/commit/1bee3a4b6 [IMP] tokenize: add NEWLINE handling https://github.com/odoo/o-spreadsheet/commit/1da559c75 [FIX] menu: fix positioning of sub menus
The Field Service app now has dedicated menu options for managing projects and project stages, reducing the need to switch into the main Projects app. Field service projects and tasks are also hidden from the general Projects app, creating a cleaner separation between operational field work and standard project management.
Original PR description
This commit introduces some general ui improvements in the field service app. It adds a new "Projects" menu option that redirects the user to the field service project kanban view, it adds a new "Project Stages" menu option under configuration that redirects the user to the project stage list view and finally it hides all field service projects and tasks from the main projects app. These changes should help create a more clear separation between the field service app and the project app by minimising the number of times the user has to switch between the two and by hiding each category of project from the other app. task-2985017
This update streamlines how Odoo prepares and installs apps by reusing the same working context during registry loading. It mainly reduces duplicated internal code and makes future maintenance easier, with no expected change to day-to-day user workflows.
The subscription dashboard has been updated so multiple KPI charts and metrics can be requested together instead of one at a time. This should improve dashboard responsiveness and make key subscription insights like revenue, churn, contracts, and customer metrics more efficient to load.
Resolved issues and error corrections
List view totals for monetary amounts now use the relevant currency settings when displaying aggregate sums. This prevents totals from being rounded or shown with the wrong number of decimal places for currencies that require more than two digits of precision.
Original PR description
**Steps to follow** - Use a currency with more than 2 digits of precision - Create a journal entry - Add a few lines -> The sum is not formatted to the correct precision **Cause of the issue** The currency is not taken into account when calling formatMonetary opw-2753312 task-2822174
Code cleanup and technical improvements
This change reorganizes parts of the Point of Sale interface so popups, notifications, sound, and debug tools are managed separately instead of being bundled into one large screen component. The expected business benefit is easier maintenance and future development, with little to no direct change for end users.
Original PR description
*: pos_hr_restaurant, pos_restaurant This commit continues the work of simplifying the Chrome component, it moves the popup controller and the notification to their own component and service, and moves the state of the notification, sound and debug widget into their own services.
Miscellaneous changes
Steps to reproduce: - Install point_of_sale - Go to Point of Sale > Payment. - Click on the numpad for many numbers. Issue: The content will move which will also move the position of the number keys, creating sometimes missclicks. Solution: Added some changes to the numpad and payment screen content css in order to not shift but keep the same behavior. This issue affects all versions until master. opw-3089013 Forward-Port-Of: odoo/odoo#110733
Original PR description
Steps to reproduce: - Install point_of_sale - Go to Point of Sale > Payment. - Click on the numpad for many numbers. Issue: The content will move which will also move the position of the number keys, creating sometimes missclicks. Solution: Added some changes to the numpad and payment screen content css in order to not shift but keep the same behavior. This issue affects all versions until master. opw-3089013 Forward-Port-Of: odoo/odoo#110733
Original PR description
The goal of this revision is to re-use the environment among the
different steps of the registry loading,
instead of creating a new environment for each step.
1. Simply To avoid to repeat the line
`env = api.Environment(cr, SUPERUSER_ID, {})`
multiple times in the code
2. This also allows to share the context among the different
steps. This is not yet used in this revision, but it could
be, for instance to avoid the current repetition to add the keys
`install_module`, in `convert_csv_import` and `xml_import._tag_record`A spreadsheet template test was updated so it works correctly after multiline cell content was introduced. This helps keep document spreadsheet features reliably tested without changing user-facing behavior.
Original PR description
With the introduction of the multiline feature, the pivot template conversion test was broken because the test content of the cell was put on multi lines (for visibility purpose).
The Point of Sale IoT module was updated to stay aligned with recent changes in the core Point of Sale app. This helps ensure IoT-connected POS features continue working smoothly after internal code reorganizations.
Original PR description
The code of the point of sale has ranamed and moved some things, this commit adapts the code of pos_iot to match.
Before this commit, when editing a form view, when editing an input field, the status indicator buttons (the save and discard buttons) didn't show up until a click outside the field was done (change event). Now, the status indicator buttons shown as soon as the input field is edited (input event). task-id 3147130 Forward-Port-Of: odoo/odoo#111267 Forward-Port-Of: odoo/odoo#110981
Original PR description
Before this commit, when editing a form view, when editing an input field, the status indicator buttons (the save and discard buttons) didn't show up until a click outside the field was done (change event). Now, the status indicator buttons shown as soon as the input field is edited (input event). task-id 3147130 Forward-Port-Of: odoo/odoo#111267 Forward-Port-Of: odoo/odoo#110981
Everywhere, we use 'skip_invoice_sync' and not 'skip_sync_invoice' --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111369 Forward-Port-Of: odoo/odoo#111116
Original PR description
Everywhere, we use 'skip_invoice_sync' and not 'skip_sync_invoice' --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111369 Forward-Port-Of: odoo/odoo#111116
Added countries which have ports defined in aduana.cl but were not in the list. Description of the issue/feature this PR addresses: Some country codes defined by chilean customs were not in the list, including the US. Adding the missing countries will allow the soon to be implemented l10n_cl_edi_exports module to generate exportation invoices XMLs correctly for every country that has a listed port. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit
Original PR description
Added countries which have ports defined in aduana.cl but were not in the list. Description of the issue/feature this PR addresses: Some country codes defined by chilean customs were not in the list, including the US. Adding the missing countries will allow the soon to be implemented l10n_cl_edi_exports module to generate exportation invoices XMLs correctly for every country that has a listed port. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#109123
Currently the hsn_name should be submitted every time the hsn_code is (i.e. when the line is not 16% standard rate taxed). However when serialising the data, a mistake means that this field is always empty in the message that gets sent to the device. This is because of the re.sub('[^0-9.]+', '', ...) regular expression, which replaces all the characters of the description (excepting digits and periods). This commit adjusts the way that this field is serialised to utilise the same form
Original PR description
Currently the hsn_name should be submitted every time the hsn_code is (i.e. when the line is not 16% standard rate taxed). However when serialising the data, a mistake means that this field is always empty in the message that gets sent to the device.
This is because of the
re.sub('[^0-9.]+', '', ...)
regular expression, which replaces all the characters of the description (excepting digits and periods).
This commit adjusts the way that this field is serialised to utilise the same formatter (_l10n_ke_fmt) as the other text fields used to construct the message.
Forward-Port-Of: odoo/odoo#111442When the country is not defined on the company, there was an error when using the SA l10n. With this PR, we now check if the country is set before doing the stuff linked to the SA l10n. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#110331 Forward-Port-Of: odoo/odoo#109073
Original PR description
When the country is not defined on the company, there was an error when using the SA l10n. With this PR, we now check if the country is set before doing the stuff linked to the SA l10n. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#110331 Forward-Port-Of: odoo/odoo#109073
odoo/enterprise#36355 adds the ability to generate PDF's and attach them to the statement. To give the user feedback of completion, the PDF is then downloaded. Since this is a duplication of features, the report is no longer bound to the print menu. Task-3151040 Forward-Port-Of: odoo/odoo#111347 Forward-Port-Of: odoo/odoo#111133
Original PR description
odoo/enterprise#36355 adds the ability to generate PDF's and attach them to the statement. To give the user feedback of completion, the PDF is then downloaded. Since this is a duplication of features, the report is no longer bound to the print menu. Task-3151040 Forward-Port-Of: odoo/odoo#111347 Forward-Port-Of: odoo/odoo#111133
- have a current date of 24/03/2022; - have a date field of 29/01/2020; - use compute date (+5d for instance) on the field; - as the date field changed, the datepicker will update with the new value : 29/03/2022; - use again the compute field, with the same value (+5d); Before this commit, the datepicker didn't shown the result of the compute date but it will show 05/01/2022. This occurs because the datepicker updates when the dates are different, in this case the result of the computatio
Original PR description
- have a current date of 24/03/2022; - have a date field of 29/01/2020; - use compute date (+5d for instance) on the field; - as the date field changed, the datepicker will update with the new value : 29/03/2022; - use again the compute field, with the same value (+5d); Before this commit, the datepicker didn't shown the result of the compute date but it will show 05/01/2022. This occurs because the datepicker updates when the dates are different, in this case the result of the computation and the current date are the same. The shown date 05/01/2022 is shown because the input have 5 in it. Now, the datepicker input will always update, and the correct date is shown. Forward-Port-Of: odoo/odoo#111351
The aim of this commit is to fix the export fiscal position for invoices between Switzerland and the Principality of Liechtenstein in the Swiss localization. context: This commit corrects the Swiss national fiscal position, in accordance with legislation that considers Switzerland and Liechtenstein to be a common fiscal territory of application for VAT. Previous to this commit: - When the use create an invoice with a customer from Liechtenstein, the correct VAT is not applied because tra
Original PR description
The aim of this commit is to fix the export fiscal position for invoices between Switzerland and the Principality of Liechtenstein in the Swiss localization. context: This commit corrects the Swiss national fiscal position, in accordance with legislation that considers Switzerland and Liechtenstein to be a common fiscal territory of application for VAT. Previous to this commit: - When the use create an invoice with a customer from Liechtenstein, the correct VAT is not applied because transactions to Liechtenstein were considered as export transactions. After this commit: - When the use create an invoice with a customer from Liechtenstein, the correct VAT is applied because transactions to Liechtenstein are considered as domestic transactions. task-id: 3151891 Forward-Port-Of: odoo/odoo#111525 Forward-Port-Of: odoo/odoo#111309
When changing the padding of the grid items with the `Padding (Y, X)` option (when the grid mode is toggled), depending on these items content, the effects are not always visible. This commit adds a highlight effect on the grid items when the padding is changed, to better show the changes being made. task-3058630 Forward-Port-Of: odoo/odoo#105175
Original PR description
When changing the padding of the grid items with the `Padding (Y, X)` option (when the grid mode is toggled), depending on these items content, the effects are not always visible. This commit adds a highlight effect on the grid items when the padding is changed, to better show the changes being made. task-3058630 Forward-Port-Of: odoo/odoo#105175
- Open User-defined Filters in debug mode; - Create a new Filter, name it; - Use Contact model; - Add a filter in the domain; - Choose Last Update On; - on the domain code editor modify it to be : `[("write_date", "=", context_today())]` - Save the new filter and comeback to the filter lists; - Open again the filter; - Click in "Invalid DateTime"; - Choose a new date; - Discard the changes; - Click again in "Invalid DateTime". Before this commit, a traceback is raised. This error o
Original PR description
- Open User-defined Filters in debug mode;
- Create a new Filter, name it;
- Use Contact model;
- Add a filter in the domain;
- Choose Last Update On;
- on the domain code editor modify it to be : `[("write_date", "=", context_today())]`
- Save the new filter and comeback to the filter lists;
- Open again the filter;
- Click in "Invalid DateTime";
- Choose a new date;
- Discard the changes;
- Click again in "Invalid DateTime".
Before this commit, a traceback is raised. This error occurs because Bootstrap's Tempus Dominus don't manage correctly when in the setup we send `null` as date.
Now, we sent a invalid date to Tempus Dominus.
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Forward-Port-Of: odoo/odoo#111570The inalterability report can inflate the memory by loading all the pos orders. opw-3096445 **Description of the issue/feature this PR addresses:** To clear the records from memory after the report is generated. **Current behavior before PR:** With a significant number of POS orders (280000), after we open the report in menu `Point of Sale > Reporting > French Statements > POS Inalterability Check`, we start encountering MemoryErrors when visiting other menus. --- I confirm I
Original PR description
The inalterability report can inflate the memory by loading all the pos orders. opw-3096445 **Description of the issue/feature this PR addresses:** To clear the records from memory after the report is generated. **Current behavior before PR:** With a significant number of POS orders (280000), after we open the report in menu `Point of Sale > Reporting > French Statements > POS Inalterability Check`, we start encountering MemoryErrors when visiting other menus. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111475
Current behavior: When a user scans a badge, the user is prompted to enter his pin. If you click on cancel on the pin window you would be sent directly in the pos and no user would be logged in. Steps to reproduce: - setup any employee badge with number and PIN - Enable Multi Employees per Session in POS settings - Open a new session for this POS - Scan the badge with barcode scanner - At password screen, click cancel - No employee is shown in the top right but the session can be used
Original PR description
Current behavior: When a user scans a badge, the user is prompted to enter his pin. If you click on cancel on the pin window you would be sent directly in the pos and no user would be logged in. Steps to reproduce: - setup any employee badge with number and PIN - Enable Multi Employees per Session in POS settings - Open a new session for this POS - Scan the badge with barcode scanner - At password screen, click cancel - No employee is shown in the top right but the session can be used opw-3110299 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111457 Forward-Port-Of: odoo/odoo#109581
When confirming a MO for a SN-tracked product with at least one SN-tracked component, most of the time is taken by `_update_reserved_quantity` and `_apply_putaway_rule`. When a component is tracked by serial number, there will be one move_line with product_uom_qty = 1.0 and one reserved_quant with associated quant of 1.0 by serial number. When the mrp.production.product_qty gets bigger (> 1000) this becomes a performance bottleneck as it slows down the creation of smls and the search for cand
Original PR description
When confirming a MO for a SN-tracked product with at least one SN-tracked component, most of the time is taken by `_update_reserved_quantity` and `_apply_putaway_rule`. When a component is tracked…
When confirming a MO for a SN-tracked product with at least one SN-tracked component, most of the time is taken by `_update_reserved_quantity` and `_apply_putaway_rule`. When a component is tracked by serial number, there will be one move_line with product_uom_qty = 1.0 and one reserved_quant with associated quant of 1.0 by serial number. When the mrp.production.product_qty gets bigger (> 1000) this becomes a performance bottleneck as it slows down the creation of smls and the search for candidate move_lines in `_update_reserved_quantity`. To fix that, this PR delays the creation of move_lines with sn-tracked products. Because move_lines with sn-tracked product_id are not eligible as to-update candidates, we can create them at the end of the method. This speeds up the search for to-update candidates as these lines are not written to `self.move_line_ids` during the for loop. This also speeds up the creation of serial-tracked smls as it calls self.create only once at the end. #### Speedup Testing database with purchase, sale_management, stock and mrp installed. Timing to confirm a Manufacturing Order for an SN-tracked product (Table) with an SN-tracked component (Table Top) and a lot-tracked component (Table leg) while increasing the MO's `product_qty` | product_qty | Before PR | After PR | |:------------:|:-----------:|:---------:| | 5 | 1.64s | 1.64s | | 50 | 2.17s | 1.75s | | 250 | 3.82s | 2.44s | | 1000 | 14.08s | 6.34s | | 3000 | 1min12s | 18.33s | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#110972
By making the search_read inside 'get_table_draft_orders' non-hardcoded, its domain can now be modified by inheriting _get_domain_from_draft_orders from other modules. Forward-Port-Of: odoo/odoo#111509 Forward-Port-Of: odoo/odoo#109688
Original PR description
By making the search_read inside 'get_table_draft_orders' non-hardcoded, its domain can now be modified by inheriting _get_domain_from_draft_orders from other modules. Forward-Port-Of: odoo/odoo#111509 Forward-Port-Of: odoo/odoo#109688
When resetting the editor, we need to remove the focus listener if one was previously added. Otherwise, the editor will try to connect too much for each resetEditor call. task-3164032 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111454
Original PR description
When resetting the editor, we need to remove the focus listener if one was previously added. Otherwise, the editor will try to connect too much for each resetEditor call. task-3164032 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111454
1. On [Settings]>[Users & Companies]>[Users] add a user with: - admin rights to purchase and accounting, user right to inventory - admin rights to all three 2. Go to [Purchase], create a RFQ and click Create Bill 3. On the top right corner left of Receipt, Vendor Bills will be shown 4. It is only viewed by user with admin rights to all three apps Request: Allow Inventory users to view vendor bills as in pre-versions Applicable versions: 16.0 up to master opw-3135682 --- I confi
Original PR description
1. On [Settings]>[Users & Companies]>[Users] add a user with: - admin rights to purchase and accounting, user right to inventory - admin rights to all three 2. Go to [Purchase], create a RFQ and click Create Bill 3. On the top right corner left of Receipt, Vendor Bills will be shown 4. It is only viewed by user with admin rights to all three apps Request: Allow Inventory users to view vendor bills as in pre-versions Applicable versions: 16.0 up to master opw-3135682 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111241
Problem: It is possible for an `account.bank.statement.line` to have in the database the field `amount` set to `NULL`. It happens when importing from the 'bank statement line' list view (Favorites>Import Records), a csv file that have no column 'amount'. This causes an issue for the queries accesing that value, as they expect a number and get a Nonetype (for example in the function `_compute_running_balance`). Solution: As this is stable, we cannot change the attributes of the field. So h
Original PR description
Problem: It is possible for an `account.bank.statement.line` to have in the database the field `amount` set to `NULL`. It happens when importing from the 'bank statement line' list view (Favorites>Import Records), a csv file that have no column 'amount'. This causes an issue for the queries accesing that value, as they expect a number and get a Nonetype (for example in the function `_compute_running_balance`). Solution: As this is stable, we cannot change the attributes of the field. So here, in the `create` function, we set the amount to 0 if it is not specified. Like when you create a bank statement line with the 'create' button, where this field is set to 0 per default (client side). opw-3161652 Forward-Port-Of: odoo/odoo#111554
Some people create a lot of references but don't use them in their stock. To avoid a big computation time to know the quantities for each product in each location, we only compute it for product having `stock.move` opw-3144094 Forward-Port-Of: odoo/odoo#111611
Original PR description
Some people create a lot of references but don't use them in their stock. To avoid a big computation time to know the quantities for each product in each location, we only compute it for product having `stock.move` opw-3144094 Forward-Port-Of: odoo/odoo#111611
When expense account on deferred expense model has a default tax, the tax is applied on the deferred expense entries when they should not be. Task: 3129411 Forward-Port-Of: odoo/enterprise#36143
Original PR description
When expense account on deferred expense model has a default tax, the tax is applied on the deferred expense entries when they should not be. Task: 3129411 Forward-Port-Of: odoo/enterprise#36143
To reproduce: - Add a manual entry for a value lower than the liquidity amount - select the auto balancing line - remove the manual entry - The Manual Operations tab is still active while no line is mounted, therefore displaying an incomplete form With this commit, the Matching Entries tab is selected when any line is removed. Forward-Port-Of: odoo/enterprise#36569
Original PR description
To reproduce: - Add a manual entry for a value lower than the liquidity amount - select the auto balancing line - remove the manual entry - The Manual Operations tab is still active while no line is mounted, therefore displaying an incomplete form With this commit, the Matching Entries tab is selected when any line is removed. Forward-Port-Of: odoo/enterprise#36569
Before this commit, the next invoice date was incremented for all kind of invoice. Forward-Port-Of: odoo/enterprise#36237 Forward-Port-Of: odoo/enterprise#35082
Original PR description
Before this commit, the next invoice date was incremented for all kind of invoice. Forward-Port-Of: odoo/enterprise#36237 Forward-Port-Of: odoo/enterprise#35082
When importing a statement, the printed PDF is attached to the statement, and is accessible in the chatter of all the journal entries related to that statement. We don't have this feature when statements are created manually. With this PR, a new action is added to the statement tree view. When clicked, the PDF is generated and attached to the statement records. The preview is then available on the relevant Journal Entries. Task-3151040 Forward-Port-Of: odoo/enterprise#36462 Forward-Port-
Original PR description
When importing a statement, the printed PDF is attached to the statement, and is accessible in the chatter of all the journal entries related to that statement. We don't have this feature when statements are created manually. With this PR, a new action is added to the statement tree view. When clicked, the PDF is generated and attached to the statement records. The preview is then available on the relevant Journal Entries. Task-3151040 Forward-Port-Of: odoo/enterprise#36462 Forward-Port-Of: odoo/enterprise#36355
Currently when computing `sale.rental.schedule._is_available`, if one record passes the `if-condition`, `sol.virtual_available_at_date` will be computed for all the sale.order.lines in `self.order_line_id`. This is because an if condition has no impact on the prefetch_ids. So, when reaching the line `sol.virtual_available_at_date`, the ORM will expand the ids by `sol._prefetch_ids`, which equal `self.order_line_id._prefetch_ids` here. Calling `self.filtered` before looping through records
Original PR description
Currently when computing `sale.rental.schedule._is_available`, if one record passes the `if-condition`, `sol.virtual_available_at_date` will be computed for all the sale.order.lines in…
Currently when computing `sale.rental.schedule._is_available`, if one record passes the `if-condition`, `sol.virtual_available_at_date` will be computed for all the sale.order.lines in `self.order_line_id`. This is because an if condition has no impact on the prefetch_ids. So, when reaching the line `sol.virtual_available_at_date`, the ORM will expand the ids by `sol._prefetch_ids`, which equal `self.order_line_id._prefetch_ids` here. Calling `self.filtered` before looping through records sets the prefetch_ids to the subset of records that pass the condition. If lots of records do not pass the condition, calling filtered beforehand can lead to a significant speed-up. #### Speed up In a customer DB, loading the 'Schedule' Gantt View for the current Month, `len(self) = 881` and `len(quoted_rentals_with_product) = 1`, the time of `_compute_is_available` went from 8s -> 0.2s. #### Concerns The "issue" with this solution is that the performances can vary depending on the number of sale.rental.schedules that pass the filtered condition. This means that the time to load the 'Schedule' GanttView can change from day to day. Even more so thanks to the cond `r.return_date > fields.Datetime.now()`. I'm not really sure if this could be an issue UX-wise as the daily loading time changes may be confusing. This is something that can happen in current patch, if one loads the GanttView for May on the 31th and no sale.rental.schedule has `return_date > fields.Datetime.now()`, the GanttView will load way faster than on the 30th for instance. However it will probably happen more frequently with the `filtered` solution. Forward-Port-Of: odoo/enterprise#33561 Forward-Port-Of: odoo/enterprise#27997
Make sure the synchronization between account.bank.statement.line & account.move is disabled when performing the reconciliation. If not, it's triggering a lot of unecessary update on account.move/account.move.line slowing down the reconciliation Forward-Port-Of: odoo/enterprise#36470 Forward-Port-Of: odoo/enterprise#36334
Original PR description
Make sure the synchronization between account.bank.statement.line & account.move is disabled when performing the reconciliation. If not, it's triggering a lot of unecessary update on account.move/account.move.line slowing down the reconciliation Forward-Port-Of: odoo/enterprise#36470 Forward-Port-Of: odoo/enterprise#36334
…ommit/15805358a0a0f8aa31c2306d6bfeb60e9bec3237 This is slowing down the 'onchange' on the bank reco widget by ~300% and the web_search_read by ~400%. Forward-Port-Of: odoo/enterprise#36527
Original PR description
…ommit/15805358a0a0f8aa31c2306d6bfeb60e9bec3237 This is slowing down the 'onchange' on the bank reco widget by ~300% and the web_search_read by ~400%. Forward-Port-Of: odoo/enterprise#36527