Daily updates from Odoo
Navigate
Branch
Tuesday, January 28, 2020
50 changes
New functionality added to Odoo
Odoo can now fetch live currency exchange rates from the National Bank of Romania. This helps Romanian businesses keep accounting currency rates current automatically, reducing manual updates and improving financial accuracy.
Enhancements to existing features
This update improves day-to-day accounting and expense workflows by hiding empty dashboard lines, adding easier access to expense reports, and making printed invoice notes clearer. These changes help users find relevant information faster and produce cleaner customer-facing documents.
Original PR description
Task 2176461 * Dashboard: don't show lins if there is no data * Add new menu for expense reports * Reorganize notes on bottom of printed invoice Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Timesheet reports have been refined to make the information easier to read and analyze. Graph measure labels now better reflect the intended business wording, improving clarity for users reviewing time, attendance, and sales-related timesheet data.
Original PR description
Some small improvements in timesheet report view. In measures of graph, take string attribute into account. TaskID: 2149371 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Updates help text on employee work information fields to better explain who is responsible for coaching, time off approvals, and expense approvals. This helps HR users understand what each responsible person field means and what happens when no approver is set.
Original PR description
Task : https://www.odoo.com/web#id=2168330&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.a8dff92edca2e7c537e89e03eb5dce09 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update prepares Odoo Events to support ticket management without requiring the eCommerce sales flow. It also cleans event setup data, improves ticket-related views and tests, and fixes event scheduling and seat limit editing issues.
Original PR description
PURPOSE Integration between event and eCommerce is required only when users handle the entire selling process online. However users may require ticketing support while managing payments outside of…
PURPOSE
Integration between event and eCommerce is required only when users handle the
entire selling process online. However users may require ticketing support
while managing payments outside of Odoo. Purpose of this commit is to prepare
support of tickets directly in event application without need of sales.
SPECIFICATIONS
Clean existing event type demo and data
Clean fields definition and parameters (no functional or technical
changes, just cleaning their definition).
Add tests before updating models. As some event models (event.type and
event.ticket notably) are about to be modified let us add some tests to avoid
regressions. Security tests are also moved in their own file. Some internals
tests defined in event_sale are also moved in their own file. That way we
avoid bloating files with unrelated tests. Future commits will add tests for
event and event.type models.
Prepare views for ticket model update :
* define views for ticket model. Currently views are directly embedded
in o2m of event.type and event.event, leading to complex xpath to
modify them. They are now real views;
* split templates in website_event_sale, to have templates related to
website_event and website_sale separated, leading to more simple diff
comprehension;
Add some fixes :
* copy event type mail scheduling only if activated on event type;
fix seats_max field not editable;
See sub commits for more details.
LINKS
Task ID 2177281 (support tickets directly in event)
Prepares Community PR #43488
Closes Community PR #44066The sales invoice creation wizard now has unique identifiers on key buttons and sections. This makes future customizations safer and easier by avoiding fragile references to duplicate or unnamed screen elements.
Original PR description
Description of the issue/feature this PR addresses: Set unique ID's on button and div elements. Current behavior before PR: 1. Before this commit there were two buttons on this wizard with the same name 'create_invoices' that do different things. One creates the invoice and the other one creates and opens the invoices. 2. Before the commit there are two divs without an ID. Desired behavior after PR is merged: 1. By setting an unique ID on both buttons we can do a clean and easy xpath. Something like `<xpath expr="//button[@id='create_invoice_open']" position="replace"/>` instead of having to use indexes or dangerous behaviours 2. By setting an ID on the divs we can easily xpath by name. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Event teams can now manage sponsors more like business contacts, with better views and built-in communication and activity tracking. Attendee handling is also easier through batch updates, improved event lists, better website sale registration links, plus small fixes for mailing defaults and empty phone or email display.
Original PR description
Purpose ======= Improve the sponsors and attendees integration in event. Focus on : * sponsor management: transform it into a real business document allowing to communicate with sponsors) ; *…
Purpose
=======
Improve the sponsors and attendees integration in event. Focus on :
* sponsor management: transform it into a real business document allowing
to communicate with sponsors) ;
* attendee management: improve views, ease searching / updating them in
batch;
Specifications
==============
Sponsors
--------
Move all the views related to sponsor and sponsor type to their own file to
clean module organization.
Add integration with mailgateway and activities through mail.thread and
mail.activity.mixin inheritance.
Improve sponsor views: add a real form view and add a small kanban view
displaying some partner / sponsor information.
Attendees
---------
In order to allow state management in batch, state field is made editable in
multi edit mode of registrations. That way event managers are able to work in
batch. It required to move some code currently called in custom action-called
methods directly in write. It makes sense to consider that some required code
is called by writing on state field instead of depending on calling the right
method. Indeed there is not much "business" code to move: calling mail
schedulers on confirmation, and putting the closing date when closing.
Event and registration tree views are improved, some fields are now editable
in multi edit mode.
When a user register on a event from website, it will create a sale order and
a partner (the customer of the SO). Set automatically the partner of the
registration to the partner of the sale order.
Other
-----
This merge include a fix in mass mailing (default domain propagation) and
web (void values display for phone widget). See sub commits for more details.
Task ID 2119333
PR #40949Pivot table exports now download as XLSX files instead of older XLS files, allowing much larger spreadsheets with more rows and columns. The export also consistently includes the measure row, making downloaded reports clearer even when only one measure is selected.
Original PR description
Task:https://www.odoo.com/web#id=2127388&action=333&active_id=1251&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.4fde01e8f05ca7b57c03c22600d70e41 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The event kanban card layout was adjusted to make room for additional footer information, such as social media statistics. This keeps event cards visually consistent while enabling clearer reporting in related integrations.
Original PR description
Purpose ======= In "Event social Facebook", we want to insert some statistics in the footer of the kanban card. So, we added a div element, to be able to add the fotter bellow the card. Adjust the CSS to keep the same view. Task #1999230
Several business areas now use a simpler and more reliable way to interpret saved filter criteria and domains. This is an internal improvement that should help maintain consistency across reports, imports, subscriptions, planning, marketing automation, and social notifications without changing day-to-day workflows.
Original PR description
To evaluate a domain, it is easier to use ast Goes with odoo/odoo#43831
This update makes several small accounting workflows clearer and easier to use. Users can better distinguish debits and credits during batch payment reconciliation, see clearer wording for deferred revenue actions, and preview PDFs while navigating journal items with the keyboard.
Original PR description
Task 2176461 * Differentiate debit/credit in reconciliation of batch payments * Change label of button for deferred revenues * Show pdf on keyboard nav in journal items list views
The help text for the Timesheet responsible field on employee work information was updated to better explain who approves an employee's timesheets. This helps HR and managers understand what happens when no specific approver is assigned.
Original PR description
Task :https://www.odoo.com/web#id=2168330&action=327&model=project.task&view_type=form&menu_id=4720 Pad :https://pad.odoo.com/p/r.a8dff92edca2e7c537e89e03eb5dce09
Managers can now choose which employees receive a published planning schedule and narrow the shifts being sent by role, project, or task. Shift templates can also include project and task details, helping teams prepare more relevant schedules with clearer context.
Original PR description
Improve the publish and send action: we can choose which employee will received this planning, we can filter slot by role, project or/and task. Add task and project on shift templates. TaskID: 2146842
Timesheet grid entries with very long name segments are now shortened, making the grid easier to read and navigate. Timesheet report views were also improved to provide clearer reporting for business users.
Original PR description
In grid view, if the length of a block of the name line, is longer than 50 characters, we reduce it. Improve timesheet report views. TaskID: 2149371
Planning managers can now choose exactly which employees receive published schedules and filter shifts by role, project, or task before sending. Shift templates now include project and task details, and schedule dates and times better respect each user's language preferences.
Original PR description
Improve the publish and send action: we can choose which employee will received this planning, we can filter slot by role, project or/and task. Improve front-end: take into account langage preferences to display date and time. Add task and project on shift templates. TaskID: 2146842
Sales teams can now be automatically prompted to take manual follow-up actions when customer invoices become overdue. This helps ensure unpaid invoices are noticed sooner and followed up by the right salesperson.
Original PR description
Today, there is nothing that reminds a salesperson that an invoice becomes overdue. By allowing to create a manual activity in the followup models, one can remind the sale person than an invoice has not yet been paid.
Resolved issues and error corrections
The event barcode interface now checks invoice payment status using the correct payment field. This prevents registrations from being evaluated against outdated invoice status data after accounting model changes.
Original PR description
…rface PURPOSE There has been a few changes in the accounting module since the version 12.4. The field 'invoice_ids' in the 'sale.order' model is now related to the 'account.move' model instead of the 'account.invoice' model. The field that contain the payment state is now called 'invoice_payment_state'. This field changed name again in master into 'payment_state'. SPECIFICATION Change the call from 'invoice.state' into 'invoice.payment_state'. LINKS Task ID : 2180184 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a visual issue on website process step blocks where the first and last connecting lines could disappear after editing the page. The change keeps the intended design intact for visitors and editors, avoiding broken-looking website content.
Original PR description
First & last lines are on `i:after`. After editing, the i is replaced by a span, so the line disappeared. See https://github.com/odoo/design-themes/commit/cae0a546cb8e671cc2797bf975413bac746a2b08 which is the original themes commit. opw-2177464
Calendar users can now deselect every filter in a category without losing access to the filter list. This prevents users from getting stuck with an empty calendar that requires a page reload to restore filter options.
Original PR description
Before this commit: In calendar view, when you unselect all filters of a category, all events disappear (it's expected), but all filters also disappear. So you can't selected anything, you must reload the view to unlock the situation. After this commit: When you unselect all filters of a category, all events disappear but the filters stay as before selection (of course the last unselected filter stay unselected). TaskID: 2146842 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Calendar users can now uncheck all filters in a category without losing the filter options from the screen. This prevents users from getting stuck with no way to reselect filters unless they reload the view, making calendar filtering smoother and less disruptive.
Original PR description
Before this commit: In calendar view, when you unselect all filters of a category, all events disappear (it's expected), but all filters also disappear. So you can't selectd anything, you must reload the view to unlock the situation. After this commit: When you unselect all filters of a category, all events disappear but the filters stay as before selection (of course the last unselected filter stay unselected). TaskID: 2146842 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue in the UK Reports module where invalid user view fields could cause installation to fail. The change helps ensure the module can be installed reliably without blocking setup for affected businesses.
Original PR description
Invalid fields cause an installation crash. opw-2093465 X-original-commit: 49f1904797056d54d9909a07ec5c52cb31a7a8e5 Forward-Port-Of: #6418
Selecting documents now feels more responsive because the side details panel no longer blocks the visual selection update. This improves day-to-day usability for people managing documents, especially when changing selections frequently.
Original PR description
This commit increases the visual responsiveness of the selection of documents by moving the rendering of the `DocumentsInspector` to a different callStack so it can be painted after the selection. The slowness of the rendering of the `DocumentsInspector` is caused by the fact that we currently destroy and re-create the `DocumentsInspector` as we change the record selection (instead of updating it).
Code cleanup and technical improvements
The activity view has been modernized behind the scenes using Odoo's newer interface framework. This helps keep the mail activity experience maintainable and ready for future improvements, with little expected change for day-to-day users.
Original PR description
This PR migrates the activity view renderer to owl
Miscellaneous changes
Before this commit, a move can be 'assigned' even if it has no reserved quantity. How to reproduce: * For a tracked product, add some quantities for a LN/SN. Create an another LN/SN with no quantity; * Create a delivery for this product; * Confirm it and check availability; * On the move line, change the SN/LN for the one without quantity. → The move has no reserved quantity but is still marked as `assigned`. task-2171546 Forward-Port-Of: odoo/odoo#43979
Original PR description
Before this commit, a move can be 'assigned' even if it has no reserved quantity. How to reproduce: * For a tracked product, add some quantities for a LN/SN. Create an another LN/SN with no quantity; * Create a delivery for this product; * Confirm it and check availability; * On the move line, change the SN/LN for the one without quantity. → The move has no reserved quantity but is still marked as `assigned`. task-2171546 Forward-Port-Of: odoo/odoo#43979
**[FIX] module.py: --upgrades-paths dynamic hooks** Migration have long been only accessible thanks to a symlink from `odoo.base.maintenance` to our private migration repository. Thank to the change of bbb1a8f151b0 it is now possible to give a load the migrations scripts from a path given in options. The `initialize_sys_path` function has been updated to hooks the new paths or the legacy symlink and to provide aliases to the previous import logic to ensure backward compatibility. `
Original PR description
**[FIX] module.py: --upgrades-paths dynamic hooks** Migration have long been only accessible thanks to a symlink from `odoo.base.maintenance` to our private migration repository. Thank to the change…
**[FIX] module.py: --upgrades-paths dynamic hooks** Migration have long been only accessible thanks to a symlink from `odoo.base.maintenance` to our private migration repository. Thank to the change of bbb1a8f151b0 it is now possible to give a load the migrations scripts from a path given in options. The `initialize_sys_path` function has been updated to hooks the new paths or the legacy symlink and to provide aliases to the previous import logic to ensure backward compatibility. `odoo.upgrades` (`community/odoo/upgrades`) is a new namespace that hook all `--upgrades-paths` directories or the `community/odoo/base/maintenance/migrations` symlink if none is previded. `odoo.addons.base.maintenance.migrations` has been made an alias to `odoo.upgrades`. The `odoo.upgrades` is the desired method for accessing migrations scripts and should be used by all new scripts. **[FIX] config: Error on wrong Upgrade Path** The --upgrades-path option is a coma separated list of folders where to find migration scripts. It should contain python scripts for a specific module and a specific version. The validation verifies there are python programs enclosed by two directories (`module/version/`) within the given path. Task: 2178274 Forward-Port-Of: odoo/odoo#43953 Forward-Port-Of: odoo/odoo#43681
- Create a product A, FIFO and Automated - Create a PO for 50 units - Receive 45 units, no backorder - Create a landed cost for the picking The landed cost is split between the two move lines (45 units and 5 units). This occurs since in v13, there is no canceled picking created for the backorder, but a canceled stock move. We only keep done moves. opw-2179145 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is mer
Original PR description
- Create a product A, FIFO and Automated - Create a PO for 50 units - Receive 45 units, no backorder - Create a landed cost for the picking The landed cost is split between the two move lines (45 units and 5 units). This occurs since in v13, there is no canceled picking created for the backorder, but a canceled stock move. We only keep done moves. opw-2179145 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44065
When a contract is closed, set the date of the day. Add multi-edit on work_entry list taskId: 2180263 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44007 Forward-Port-Of: odoo/odoo#43904
Original PR description
When a contract is closed, set the date of the day. Add multi-edit on work_entry list taskId: 2180263 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44007 Forward-Port-Of: odoo/odoo#43904
Sponsors' ribbons and agenda tracks filter are broken following the refactoring of website_event. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42165
Original PR description
Sponsors' ribbons and agenda tracks filter are broken following the refactoring of website_event. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42165
When running the scheduler, either from the cron or from Inventory, _run_scheduler_tasks calls _merge_quants. However, when there were quants to merge, the query from _merge_quants would not be applied from this function. This is because the parameter use_new_cursor was used but a manual commit was missing after calling _merge_quants. For run_scheduler, we use the parameter use_new_cursor except for tests. We add a commit in _run_scheduler_tasks, so that the result of _merge_quants is co
Original PR description
When running the scheduler, either from the cron or from Inventory, _run_scheduler_tasks calls _merge_quants. However, when there were quants to merge, the query from _merge_quants would not be applied from this function. This is because the parameter use_new_cursor was used but a manual commit was missing after calling _merge_quants. For run_scheduler, we use the parameter use_new_cursor except for tests. We add a commit in _run_scheduler_tasks, so that the result of _merge_quants is committed in the database. opw 2155559 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44073 Forward-Port-Of: odoo/odoo#43896
When we have multiple journal items with the same account in debit or credit, only the last one is taken into account. This could happend if we have a opening entry with lines depending on the partner (receivable, payable for instance) closes https://github.com/odoo/odoo/issues/43736 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43903
Original PR description
When we have multiple journal items with the same account in debit or credit, only the last one is taken into account. This could happend if we have a opening entry with lines depending on the partner (receivable, payable for instance) closes https://github.com/odoo/odoo/issues/43736 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43903
When a move is created through a push rule, the system will first try to find a picking to put it into before creating a new one. It is possible the move is placed into an immediate picking where the reservation fields are hidden and the initial demand is updated according to the qty_done with [0]. As this behaviour is unwanted, do not merge move into immediate transfers (which should be short-lived anyway). [0] 8303b1a69e96807bcb548ef079dcb463e34df36b Forward-Port-Of: odoo/odoo#4406
Original PR description
When a move is created through a push rule, the system will first try to find a picking to put it into before creating a new one. It is possible the move is placed into an immediate picking where the reservation fields are hidden and the initial demand is updated according to the qty_done with [0]. As this behaviour is unwanted, do not merge move into immediate transfers (which should be short-lived anyway). [0] 8303b1a69e96807bcb548ef079dcb463e34df36b Forward-Port-Of: odoo/odoo#44063
Usecase for example A black T-shirt made from a white T-shirt and black color. This behavior was possible in 12.0 and 11.0 and was removed by commit 77a8d92196924075f3e822fd218f57142cf20284 Close #40540 Forward-Port-Of: odoo/odoo#43392
Original PR description
Usecase for example A black T-shirt made from a white T-shirt and black color. This behavior was possible in 12.0 and 11.0 and was removed by commit 77a8d92196924075f3e822fd218f57142cf20284 Close #40540 Forward-Port-Of: odoo/odoo#43392
Steps to reproduce the bug: - Let's consider a company partner P with company_id = A - Let's consider an other partner C which is a child of P - Change the company_id of P to B Bug: The company_id of C was not changed even if the field company_id of C is in readonly as he has a parent. opw:2179632 Forward-Port-Of: odoo/odoo#43774
Original PR description
Steps to reproduce the bug: - Let's consider a company partner P with company_id = A - Let's consider an other partner C which is a child of P - Change the company_id of P to B Bug: The company_id of C was not changed even if the field company_id of C is in readonly as he has a parent. opw:2179632 Forward-Port-Of: odoo/odoo#43774
Description of the issue/feature this PR addresses: Allow overriding and adapting values when making invoices/down payments Current behavior before PR: The current functions to create invoices/down payments was pretty much impossible to override and modify and caused a lot of pains to manage Desired behavior after PR is merged: Since the huge function is split up into sub functions you can now override the smaller functions and modify to your likings. This is way more modular and easier to
Original PR description
Description of the issue/feature this PR addresses: Allow overriding and adapting values when making invoices/down payments Current behavior before PR: The current functions to create invoices/down payments was pretty much impossible to override and modify and caused a lot of pains to manage Desired behavior after PR is merged: Since the huge function is split up into sub functions you can now override the smaller functions and modify to your likings. This is way more modular and easier to manage as an outside dev. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44015 Forward-Port-Of: odoo/odoo#43532
- **[FIX] point_of_sale: Separate order sync from set table** Separate orders synchronization from set table to make the code clearer and enable overriding. - **[FIX] point_of_sale: Split bill** Clean code and make overrides easier. - **[FIX] point_of_sale: Cancel payment when switching to floor plan** Payments that used terminals were not correctly canceled when switching to the floor plan because there was no selected order. If a response was received at that time, a tr
Original PR description
- **[FIX] point_of_sale: Separate order sync from set table** Separate orders synchronization from set table to make the code clearer and enable overriding. - **[FIX] point_of_sale: Split bill** Clean code and make overrides easier. - **[FIX] point_of_sale: Cancel payment when switching to floor plan** Payments that used terminals were not correctly canceled when switching to the floor plan because there was no selected order. If a response was received at that time, a traceback appeared. - **[FIX] pos_restaurant: Auto switch to floor plan** A timeout is setup to go back to the floorplan after the user has been idle for 1 minute to synchronize orders. We now only keep this behaviour on the ProductScreen. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44034 Forward-Port-Of: odoo/odoo#43576
See https://github.com/odoo/odoo/commit/eb4aac3afaceb20c745f3bae0dd5142c1d2a2e1e task-2117636 Forward-Port-Of: odoo/odoo#44028
Original PR description
See https://github.com/odoo/odoo/commit/eb4aac3afaceb20c745f3bae0dd5142c1d2a2e1e task-2117636 Forward-Port-Of: odoo/odoo#44028
Studio customization is an exception, a data module added to ir_module but that is never added to graph since there is no manifest. OPW #2180885 closes #43880 Forward-Port-Of: odoo/odoo#43892
Original PR description
Studio customization is an exception, a data module added to ir_module but that is never added to graph since there is no manifest. OPW #2180885 closes #43880 Forward-Port-Of: odoo/odoo#43892
Sometimes when we try to buy a product that doesn't have any variants, it would result in an error saying there isn't any valid combination for that product. This was happening because `_get_variant_id_for_combination` was considering that the field `combination_indices` would always be equal to `''` (empty string) in such a case. This isn't true as `combination_indices` isn't a required field thus allowing `null` \ `None` to be valid values for that field. This fix will simply inc
Original PR description
Sometimes when we try to buy a product that doesn't have any variants, it would result in an error saying there isn't any valid combination for that product. This was happening because `_get_variant_id_for_combination` was considering that the field `combination_indices` would always be equal to `''` (empty string) in such a case. This isn't true as `combination_indices` isn't a required field thus allowing `null` \ `None` to be valid values for that field. This fix will simply include products with no values set for their `combination_indices` when searching a corresponding variant from the `product_template`. Forward-Port-Of: odoo/odoo#43581
When there are no items in the cart, pressing the print bill button may result in an error due to the translation (_t) module not being imported Description of the issue/feature this PR addresses: Bug fix for print bill button on empty cart Current behavior before PR: May result in an error being thrown Desired behavior after PR is merged: The popup is displayed correctly -- Forward-Port-Of: odoo/odoo#43741
Original PR description
When there are no items in the cart, pressing the print bill button may result in an error due to the translation (_t) module not being imported Description of the issue/feature this PR addresses: Bug fix for print bill button on empty cart Current behavior before PR: May result in an error being thrown Desired behavior after PR is merged: The popup is displayed correctly -- Forward-Port-Of: odoo/odoo#43741
Two of the UserErrors mentioned 'quantites' instead of 'quantities' before this commit. This commit fixes the terms and the translation file. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43713
Original PR description
Two of the UserErrors mentioned 'quantites' instead of 'quantities' before this commit. This commit fixes the terms and the translation file. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43713
**[FIX] account: Fix rounding issue on price_unit with price included tax** Suppose a price_unit of 2300 with a 5.5% price-included tax applied on it. The computed balance will be computed as follow: 2300.0 / 1.055 = 2180.0948 ~ 2180.09. Since accounting / business fields are synchronized, the inverse computation will try to recompute the price_unit based on the balance: 2180.09 * 1.055 = 2299.99495 ~ 2299.99. --issue: 2168073 **[FIX] sale: Fix account.move (invoices) access rights
Original PR description
**[FIX] account: Fix rounding issue on price_unit with price included tax** Suppose a price_unit of 2300 with a 5.5% price-included tax applied on it. The computed balance will be computed as follow: 2300.0 / 1.055 = 2180.0948 ~ 2180.09. Since accounting / business fields are synchronized, the inverse computation will try to recompute the price_unit based on the balance: 2180.09 * 1.055 = 2299.99495 ~ 2299.99. --issue: 2168073 **[FIX] sale: Fix account.move (invoices) access rights** Without any access rights on the 'account' module, a salesperson should be able to create a new invoice from a sale order. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43636
Before when we tried to print the sale report ticket from the front end, there was a traceback. Now use the correct values to prevent the traceback. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44009
Original PR description
Before when we tried to print the sale report ticket from the front end, there was a traceback. Now use the correct values to prevent the traceback. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44009
opw-2172459 opw-2176591 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44022
Original PR description
opw-2172459 opw-2176591 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44022
PostgresSQL TRIM function does not trim line return and other space characters that are not white space. For references having a non trimmed character regexp_split_to_array would create an array with an empty element. Such element could be matched to a counterpart with no numerics in the reference. TRIM(' \n001') => '\n001' regexp_split_to_array('\n001') => {"", "001"} By replacing the TRIM function by a substring using a regexp we also remove the other space characters such as tab
Original PR description
PostgresSQL TRIM function does not trim line return and other space characters that are not white space. For references having a non trimmed character regexp_split_to_array would create an array with…
PostgresSQL TRIM function does not trim line return and other space characters
that are not white space.
For references having a non trimmed character regexp_split_to_array would create an array
with an empty element. Such element could be matched to a counterpart with no numerics in
the reference.
TRIM(' \n001') => '\n001'
regexp_split_to_array('\n001') => {"", "001"}
By replacing the TRIM function by a substring using a regexp we
also remove the other space characters such as tab and line return.
**Description of the issue/feature this PR addresses:**
When clicking on the Reconcile button of a journal if your bank statement lines references have new lines in them or other non whitespace spacing characters (`\n`, `\t`, ...) you will end up with a matching with way to many entries. It will matches with all account.move with `/` in name.
**Current behavior before PR:**
Reference are split after being wrongly trimmed. Which leads to a list of reference that can contain empty string.
**Desired behavior after PR is merged:**
References are trimmed and doesn't try to match with other entries on an empty string.
-----
How to test it in postgres:
Query:
```
SELECT
regexp_split_to_array(TRIM(REGEXP_REPLACE(move_ref, '[^0-9|^\s]', '', 'g')), '\s+')
AS before_ref_array,
regexp_split_to_array(substring(REGEXP_REPLACE(move_ref, '[^0-9|^\s]', '', 'g'), '\S(?:.*\S)*'), '\s+')
AS after_ref_array,
regexp_split_to_array(TRIM(REGEXP_REPLACE(st_line_name, '[^0-9|^\s]', '', 'g')), '\s+')
AS before_move_array,
regexp_split_to_array(substring(REGEXP_REPLACE(st_line_name, '[^0-9|^\s]', '', 'g'), '\S(?:.*\S)*'), '\s+')
AS after_move_array,
regexp_split_to_array(TRIM(REGEXP_REPLACE(move_ref, '[^0-9|^\s]', '', 'g')),'\s+')
&& regexp_split_to_array(TRIM(REGEXP_REPLACE(st_line_name, '[^0-9|^\s]', '', 'g')), '\s+')
AS before_matching_rule,
regexp_split_to_array(substring(REGEXP_REPLACE(move_ref, '[^0-9|^\s]', '', 'g'), '\S(?:.*\S)*'), '\s+')
&& regexp_split_to_array(substring(REGEXP_REPLACE(st_line_name, '[^0-9|^\s]', '', 'g'), '\S(?:.*\S)*'), '\s+')
AS after_matching_rule
FROM (SELECT '/'::text AS move_ref, 'PAIEMENT PAR CARTE
MSFT *<E999999XYZ> 11/11'::text AS st_line_name) AS example;
```
Note:
This is one example (used in query upper) that we get in some bank statement lines:
```
PAIEMENT PAR CARTE
MSFT *<E999999XYZ> 11/11
```
Result:
```
before_ref_array | after_ref_array | before_move_array | after_move_array | before_matching_rule | after_matching_rule
------------------+-----------------+-------------------+------------------+----------------------+---------------------
{""} | | {"",999999,1111} | {999999,1111} | t |
```
Note that the substring will also return nothing to split when there is not at least one numeric char in this context. While it returns null instead of False it's equivalent.
**Recomended reading about trimming `:space:` class characters in postgreSQL:**
https://stackoverflow.com/questions/22699535/trim-trailing-spaces-with-postgresql/22701212#22701212
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#43604
Forward-Port-Of: odoo/odoo#43425Propagate the analytic tags from the subscription to the invoice. opw-2179633 Forward-Port-Of: odoo/enterprise#7976
Original PR description
Propagate the analytic tags from the subscription to the invoice. opw-2179633 Forward-Port-Of: odoo/enterprise#7976
Fix-multi closed contract without end date Fix time zone issue, now, to generate work entries, we use the tz on the calendar on contract. taskID: 2180263 Forward-Port-Of: odoo/enterprise#7961 Forward-Port-Of: odoo/enterprise#7924
Original PR description
Fix-multi closed contract without end date Fix time zone issue, now, to generate work entries, we use the tz on the calendar on contract. taskID: 2180263 Forward-Port-Of: odoo/enterprise#7961 Forward-Port-Of: odoo/enterprise#7924
When you are trying to perform an international shipping with fedex, you are blocked if you don't have the settings rights, because the code tries to read a system parameter. To avoid this error, we are reading it with as super user. Forward-Port-Of: odoo/enterprise#7977 Forward-Port-Of: odoo/enterprise#7968
Original PR description
When you are trying to perform an international shipping with fedex, you are blocked if you don't have the settings rights, because the code tries to read a system parameter. To avoid this error, we are reading it with as super user. Forward-Port-Of: odoo/enterprise#7977 Forward-Port-Of: odoo/enterprise#7968
…t' product because data was moved to industry_fsm_sale from industry_fsm by commit https://github.com/odoo/enterprise/commit/51bd521a2f95884d8c866a6d323364d6551db9ca#diff-7c6705ac245d17923659b22570af96dc, but data referance did not changed in python file, so 'timesheet product' comes blank due to product unfound. task-2177269 Forward-Port-Of: odoo/enterprise#7857
Original PR description
…t' product because data was moved to industry_fsm_sale from industry_fsm by commit https://github.com/odoo/enterprise/commit/51bd521a2f95884d8c866a6d323364d6551db9ca#diff-7c6705ac245d17923659b22570af96dc, but data referance did not changed in python file, so 'timesheet product' comes blank due to product unfound. task-2177269 Forward-Port-Of: odoo/enterprise#7857
Suppose two invoices of 1000.0 respectively in 2017 & 2018. - Open the Trial Balance in 2018: An initial balance of 1000.0 is reported in the current year earnings account corresponding to the invoice in 2017. - Set a comparison with the previous period. The current year earnings account is reported with 0.0 amount everywhere. Explanation: As the unaffected earnings was computed for each period but reported only for the oldest one, the current year earnings account was involved by
Original PR description
Suppose two invoices of 1000.0 respectively in 2017 & 2018. - Open the Trial Balance in 2018: An initial balance of 1000.0 is reported in the current year earnings account corresponding to the invoice in 2017. - Set a comparison with the previous period. The current year earnings account is reported with 0.0 amount everywhere. Explanation: As the unaffected earnings was computed for each period but reported only for the oldest one, the current year earnings account was involved by 2018 but only the initial balance of 2017 (0.0) was reported. This fix will only computed the unaffected earnings for the oldest period and then, will display the current year earnings account only according this one. Forward-Port-Of: odoo/enterprise#7943
- Create a BOM for product A - Create an ECO for the created BOM - Start New Revision - Add a product to the BOM 2 operations 'Add' are recorded on the ECO instead of one. The core of the issue is the use of a computed One2many field: `bom_change_ids`. The compute methods retrieves the differences between the old and the new BOM, and adds it to the list. However, it's impossible to make sure the compute method will be called only once in a transaction. And this is what causes the is
Original PR description
- Create a BOM for product A - Create an ECO for the created BOM - Start New Revision - Add a product to the BOM 2 operations 'Add' are recorded on the ECO instead of one. The core of the issue is…
- Create a BOM for product A - Create an ECO for the created BOM - Start New Revision - Add a product to the BOM 2 operations 'Add' are recorded on the ECO instead of one. The core of the issue is the use of a computed One2many field: `bom_change_ids`. The compute methods retrieves the differences between the old and the new BOM, and adds it to the list. However, it's impossible to make sure the compute method will be called only once in a transaction. And this is what causes the issue: the compute method is called twice, so the changes are recorded twice. Taking a step back, recording all changes in the BOM is usually not significant. Let's consider the following BOM modifications: - Add a product - Modify the product quantity - Remove the product If the user saves after each step, 3 BOM Changes are recorded. If the user saves only at the end, no change is recorded. Recording all modifications will likely bloat the differences between the two BOMs. Therefore, we clear all computed fields which use the same logic in order to record only the global differences. opw-2178950 Forward-Port-Of: odoo/enterprise#7931