Monday, November 29, 2021
52 changes · master
New functionality added to Odoo
Surveys can now show different background images for individual sections, creating a more tailored experience as participants move through questions. When a section has no custom image, the survey’s default background remains in use, with smoother transitions where possible.
Original PR description
This merge adds the background per section feature. If the section to display has a background image configured, the background will be refreshed using that section background image. If the section…
This merge adds the background per section feature. If the section to display has a background image configured, the background will be refreshed using that section background image. If the section has no background, the survey background is used. The background is refreshed only if the previous and the next sections are different. The background is refreshed at the same time that the next question is loaded. To ease technical maintenance and to keep it simple, the background is always faded out on back or if survey has conditional questions. This is to avoid to load all the survey structure and to copy the get_next_question logic in the frontend. When loading the next question, we check that the question that will follow afterwards has the same background. If not, we force the background fade out when user goes to the next question (refresh_background_on_next). Otherwize, we only fade out the question and not the background to keep a smooth transition between questions and/or sections. Note: The next section to display depends on free text (section with description) configuration and on conditional questions. The next section to display can be the next question's section or directly the next question itself (if the question is a section). Task ID: 2225393
Marketing users can now save audience filters in Email Marketing and reuse them across future mailings. This makes it faster to target recurring customer segments without rebuilding the same criteria each time.
Original PR description
Whether targeting business objects or using mailing lists and contacts, marketing users usually refine the audience they're going to reach with a specific mailing thanks to filters. This commit allow users to save filters in mass_mailing to be able to reuse mailing lists and not be forced to recreate the audience they want to target. taskid:2092853 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Enhancements to existing features
The mail module’s automated tests were updated to avoid relying on an older internal test approach. This helps prepare the Discuss/mail area for a future framework upgrade while keeping the change internal and low risk for users.
Original PR description
Omission of some tests that still use `component.el`. In preparation of using OWL v2 in discuss code. Task-2694242 Task-2701230 Original PR: https://github.com/odoo/odoo/pull/80094
Resolved issues and error corrections
Improves performance when creating very large batches of records that include certain calculated fields. This reduces long processing times for bulk imports or automated data creation, making large operations complete much faster.
Original PR description
Issue: ------ The `create` method (models.py) doesn't scale correctly (with huge number of values) **when compute store no-readonly field(s) are in values** (at most one). It is due to the method…
Issue: ------ The `create` method (models.py) doesn't scale correctly (with huge number of values) **when compute store no-readonly field(s) are in values** (at most one). It is due to the method `protecting` (api.py) which has a bad complexity in the `create` situation (list of (field, records) pairs as argument): O(r²) with `r` = number of record containing the protected field: List of `len(r)` send to `protecting`, loop of this list (`r` factor), loop on fields (constant factor), create a new frozen set with the previous one (`r` factor). Fix: ---- Decrease the complexity to O(r) by creating a map of set of ids by protected field which allows avoiding recreating a new frozenset for each record (update with tuple of one inside => O(1)). Performance gain: ---------- For a very simple model with only one compute store no-readonly field, and all `create` `values` contains this field. ``` +--------------+---------------+---------------+---------------+----------------+ | Batch -> | 1000 | 10000 | 30000 | 80000 | +--------------+---------------+---------------+---------------+----------------+ | Before (sec) | 0.083 ± 0.006 | 1.433 ± 0.091 | 8.764 ± 0.609 | 94.428 ± 3.021 | | After (sec) | 0.069 ± 0.003 | 0.706 ± 0.006 | 2.188 ± 0.076 | 5.875 ± 0.104 | +--------------+---------------+---------------+---------------+----------------+ ```
Miscellaneous changes
When using account control on a journal, line_section and line_note do not block the process even though they are not in the allowed accounts (they don't have an account at all). But when adding new accounts in the account_control_ids field, the constraint is triggered by those lines. This PR makes the constraint ignore those lines when assessing if there's an issue. opw-2677597 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of:
Original PR description
When using account control on a journal, line_section and line_note do not block the process even though they are not in the allowed accounts (they don't have an account at all). But when adding new accounts in the account_control_ids field, the constraint is triggered by those lines. This PR makes the constraint ignore those lines when assessing if there's an issue. opw-2677597 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80263
Survey creators can now set a different background image for each section, making surveys more visually engaging and better aligned with themed or conditional question flows. When respondents move between sections, the page automatically shows the section-specific background or falls back to the survey's main background if none is set.
Original PR description
Purpose ======= Allow the user to configure a background per section. Can be useful to illustrate a selected theme, especially for survey with conditional questions (e.g.: burger quiz). Specifications ============== This merge adds the background per section feature. If the section to display has a background image configured, the background will be refreshed using that section background image. If the section has no background, the survey background is used. The background is refreshed only if the previous and the next sections are different. The background is refreshed at the same time that the next question is loaded. The next section to display depends on free text (section with description) configuration and on conditional questions. The next section to display can be the next question's section or directly the next question itself (if the question is a section). Link ==== Task ID: 2225393
Payment-related logs now use a consistent format across payment providers and identify transactions by their reference whenever possible. This makes it easier for support and operations teams to trace payment issues regardless of which provider handled the transaction.
Original PR description
The logs for payments contain the transaction reference whenever possible. Before logs for transactions contained the reference or the id of the transaction in an inconsistent way. Now transactions are identified by reference whenever possible. The logs for payments for the same function on different acquirers should have the same format. Same flow steps for different acquirers had information passed in different formats. Now at each step of a transaction flow log messages have the same format regardless of the acquirer. Overall the payment logs should have an uniform format. Hopefully understanding log messages related to transactions should be easier, as now log format is independent of the acquirer and transaction are easily identified by reference. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The website editor’s on/off toggle switches now show a grey cross when inactive and a green check mark when active. This makes settings easier to understand at a glance and improves the editing experience for users.
Original PR description
This commit aims to clarify the state of the boolean toggle widgets used in the web editor. To this end, a grayed out cross icon is added in the inactive state and a green check mark icon is added in the active state. task-2586313
This update renames internal mail test models to follow the newer JavaScript naming convention. It improves consistency for developers maintaining the mail module without changing business features or user workflows.
Original PR description
Rename models `test.*` to `Test*` in order to be consistent with the new naming convention for javascript models. Part of task-2701674.
This update improves clarity in settings screens by adding better subtitle styling. It also makes sales campaign totals more complete on dashboard buttons, while still respecting each user’s access rights when they open the underlying records.
The Social app experience has been cleaned up with clearer post previews, easier stream and comment flows, better demo content, and more useful YouTube previews. User permissions were also refined so social users and managers have more appropriate access while keeping business data visibility controlled.
Original PR description
PURPOSE Cleanup onboarding and usage of social app (and its sub apps) after a lot of new features done in 15.0. Provide some technical code cleaning to cleanup code and lessen technical debt.…
PURPOSE
Cleanup onboarding and usage of social app (and its sub apps) after a lot
of new features done in 15.0. Provide some technical code cleaning to cleanup
code and lessen technical debt.
SPECIFICATIONS
[IMP] social_*: add utility method to filter live post by media types.
This commit adds the same utility method that in social stream post model but in
social live_post to filter the live posts easily using their media type.
[IMP] social_*: revamp social post form view and preview
* add live_post_link to allow to go to the real post from preview
This commit adds a live_post_link computed field to live_post model.
this field is used in the live post preview and is used to allow the user
to navigate from the post preview to the real post on the target social
media. Note that Instagram live post link is never set for now as the
information we have do not allow us to compute the real link of the post
on Instagram;
* use user timezone to display publish date in post peview
* add cancel button to post view
* add info note about utmized link in the post content.
* add generic preview method for social.post.template to compute live_post_link
and published_date.
[IMP] social, social_*: revamp social stream post views and modal. This commit
applies multiple improvement to the stream post flow, notably on the stream
post modals (add stream and comments) and kanban.
* Add stream: swap order display of add stream modal, set stream_type_ids
by default if only one type for the media;
* Stream post comments modal: reposition of post comment input to make it
more obvious that this is post comment and not reply to other comments.
Display heart and thumbs up icons only if there are likes;
* Kanban view: review account stats: display up/down tendencies caret only
if != 0%
[IMP] social: move link account boutton to left on media kanban card
[IMP] social_*: revamp developper account setting display. This commit
simplifies the display of the developper account settings. From now on all
the developer account settings are regrouped under the same setting subsection
and duplicated informations are avoided.
[IMP] social_demo: complete social demo data and fake upload button
[IMP] social_*: review ACLS and information access
* apply groups on sales and lead counters for social posts. Compute the
counters in sudo in order to display the real aggregated number even
if the user does not have access to the records behind this number. Once
user clicks on the smart button, he can only view the records them has
access to;
* allow social user to read campaigns;
* allow social users to post their own social posts;
Note about ACLS. Distinction between the groups should be that
Social User:
* can read and edit all posts from other users
* create and edit posts + post his own post
* see all streams & accounts (with respect to multicompany rules)
* see and "use" Campaigns: if some models like SOs are unavaible, the stat
button should simply be hidden)
* read Social Post Templates
* delete posts only if there are their own
* For Demo module, give create access to social stream post to the users as
posting in demo mode automatically create stream posts.
Social Manager:
* access to everything (with respect to multico rules of course)
* delete streams
* access to the Configuration menu
* create, write & delete Social Post Templates
* full access on campaigns: if some models like SOs are unavaible,the stat
button should simply be hidden)
[IMP] social_youtube: display youtube thumbnails in (stream) post kanban views
This commits adds youtube thumbnails to social post kanban cards if the post
is linked to a youtube video. This thumbnails redirect on the related youtube
video. For stream posts that contain a youtube link in their message body a
thumbnail of the link youtube video is added to the kanban card.
To do both, new computed fields have been added:
* youtube_thumbnail_url
* youtube_video_url
Both field contains the url template for youtube video and thumbnail.
The advantage is that if the endpoint or part of the url changes, the update can
be done by code instead of having to update the templates.
[IMP] social_*: reorder smartbuttons on social post form view
Desired order:
1. Clicks
2. Opportunities
3. Quotations
4. Revenues
5. Engagment
6. Feed Posts
Task-2516278Marketing automation users can now save and reuse favorite audience filters, matching the experience already available in mass mailing. This makes it easier to manage recurring campaign segments and access them from a new Favorite Filters configuration menu.
Original PR description
this PR allow to save the favourite filter in marketing automation as we have in mass mailing. Task-id: 2092853
The Helpdesk team dashboard cards were redesigned to make key ticket metrics and actions easier to access. Managers and support teams can now quickly jump to important views such as open, urgent, unassigned, failed, closed, satisfaction, and SLA-related tickets directly from the dashboard.
Original PR description
Purpose of the commit is to improve the team kanban card layout on dashboard. task-2531483
The manual "Run Now" action for scheduled jobs now behaves the same way as automatic execution. This prevents user language settings from changing results unexpectedly, making logs and scheduled job behavior more consistent.
Original PR description
Change the lang of your user, translate the name of some records (e.g. translate the "Customizable Desk" product to "Bureau personnalisable") and create a cron that simply log the name of that record. Schedule the cron to be automatically executed, check the created log entry (`setting > technical > logging`) it is the default english name. Go back to the cron, click "run now" contextual button, check the created log entry: it is the translated name. When they are automatically executed by the cron worker, crons run with a minimal context without lang. When the user clicks on the "run now" button his context was wrongly used while executing the code. Closes #45388
# Description of the issue/feature this PR addresses: Inventory (31*) and Depreciation accounts (64*) are wrongly presented in the P&L report. # Current behavior before PR: Inventory accounts show up in the P&L report. Depreciation accounts show up along expenses, and should be in the depreciation group. # Desired behavior after PR is merged: Inventory accounts show up in the Balance Sheet as Current Assets. Depreciation accounts show up in the P&L as Depreciation. -- I
Original PR description
# Description of the issue/feature this PR addresses: Inventory (31*) and Depreciation accounts (64*) are wrongly presented in the P&L report. # Current behavior before PR: Inventory accounts show up in the P&L report. Depreciation accounts show up along expenses, and should be in the depreciation group. # Desired behavior after PR is merged: Inventory accounts show up in the Balance Sheet as Current Assets. Depreciation accounts show up in the P&L as Depreciation. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#62422
When using a mobile, scanning a product to manage a delivery won't work To reproduce the error: (Need stock_barcode. Use demo data) 1. In Operations Types, edit "Delivery Orders": - Enable "Show Detailed Operations" 3. Create a planned delivery order DO: - 1 x [FURN_1118] Corner Desk Black 4. Mark a Todo 5. Switch to a mobile view 6. Edit DO and scan 601647855640 (i.e., the barcode of FURN_1118) 7. Save DO Error: An error is displayed "The operation cannot be completed [..
Original PR description
When using a mobile, scanning a product to manage a delivery won't work
To reproduce the error:
(Need stock_barcode. Use demo data)
1. In Operations Types, edit "Delivery Orders":
- Enable "Show Detailed Operations"
3. Create a planned delivery order DO:
- 1 x [FURN_1118] Corner Desk Black
4. Mark a Todo
5. Switch to a mobile view
6. Edit DO and scan 601647855640 (i.e., the barcode of FURN_1118)
7. Save DO
Error: An error is displayed "The operation cannot be completed [...]
Model: Product Moves (Stock Move Line) (stock.move.line), Field: From
(location_id)"
The kanban view does not include both `location_id` and
`location_dest_id` although they are required
OPW-2688915
Forward-Port-Of: odoo/odoo#80162Forward-Port-Of: odoo/odoo#80284 Forward-Port-Of: odoo/odoo#79580
Original PR description
Forward-Port-Of: odoo/odoo#80284 Forward-Port-Of: odoo/odoo#79580
Bug introduced by: https://github.com/odoo/odoo/commit/bc131c0cfb51c953de8ec41fb820c8c7831eefb5 issue: 2668902 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80398 Forward-Port-Of: odoo/odoo#80370
Original PR description
Bug introduced by: https://github.com/odoo/odoo/commit/bc131c0cfb51c953de8ec41fb820c8c7831eefb5 issue: 2668902 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80398 Forward-Port-Of: odoo/odoo#80370
Forward-Port-Of: odoo/odoo#80412 Forward-Port-Of: odoo/odoo#80286
Original PR description
Forward-Port-Of: odoo/odoo#80412 Forward-Port-Of: odoo/odoo#80286
PURPOSE Mass Mailing Tour Bubble should not be appear any where else. SPECIFICATION Current: Tour bubble of mass mailing is appearing in many kanban view create button. To be: It should be only in mass_mailing module. Task Id: 2583760 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#79847 Forward-Port-Of: odoo/odoo#72966
Original PR description
PURPOSE Mass Mailing Tour Bubble should not be appear any where else. SPECIFICATION Current: Tour bubble of mass mailing is appearing in many kanban view create button. To be: It should be only in mass_mailing module. Task Id: 2583760 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#79847 Forward-Port-Of: odoo/odoo#72966
When the loaded res.partner has `name` = false, the call to localeCompare fails because boolean doesn't have the method. Note that `name` field of res.partner can be false because no default is specified in its declaration in the base module. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80103
Original PR description
When the loaded res.partner has `name` = false, the call to localeCompare fails because boolean doesn't have the method. Note that `name` field of res.partner can be false because no default is specified in its declaration in the base module. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80103
Purpose ======= Avoid displaying a traceback when editing a partner in form view because (as observed in crm and mass_mailing). This was due to the ev parameter being undefined in method _reset. A simple check has been added to see if the event is defined. Task-2694067 Forward-Port-Of: odoo/odoo#80270
Original PR description
Purpose ======= Avoid displaying a traceback when editing a partner in form view because (as observed in crm and mass_mailing). This was due to the ev parameter being undefined in method _reset. A simple check has been added to see if the event is defined. Task-2694067 Forward-Port-Of: odoo/odoo#80270
The changes brought with https://github.com/odoo/odoo/commit/6420b6d778ad24b9b441a7158ba85bc96ba5b60f changed the default PoS journal's type for `general` instead of `sale`, but no changes were made to the type's domain in the pos setting's view, preventing the user to choose that journal again once it has been changed. opw-2677130 Forward-Port-Of: odoo/odoo#80486
Original PR description
The changes brought with https://github.com/odoo/odoo/commit/6420b6d778ad24b9b441a7158ba85bc96ba5b60f changed the default PoS journal's type for `general` instead of `sale`, but no changes were made to the type's domain in the pos setting's view, preventing the user to choose that journal again once it has been changed. opw-2677130 Forward-Port-Of: odoo/odoo#80486
The number of leaves taken / available was no longer available in mobile. TaskID: 2701070 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#80498
Original PR description
The number of leaves taken / available was no longer available in mobile. TaskID: 2701070 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#80498
Currently, words are not breaking properly when reaching at the end of a line in the pie chart tooltip. It happens because of the 'word-break: break-all;' property used in the o_tooltip_legend class. and this property breaks the words at any character to prevent overflows. So this commit fixes the issue by removing the word-break property so that the CSS automatically applies the default line break rules. TaskID-2677129 Forward-Port-Of: odoo/odoo#79116
Original PR description
Currently, words are not breaking properly when reaching at the end of a line in the pie chart tooltip. It happens because of the 'word-break: break-all;' property used in the o_tooltip_legend class. and this property breaks the words at any character to prevent overflows. So this commit fixes the issue by removing the word-break property so that the CSS automatically applies the default line break rules. TaskID-2677129 Forward-Port-Of: odoo/odoo#79116
Partial backport of 9a46cc7ad89544a5669b4e5a7ae8b6c31d52eab3 to do the VIES check only for companies in the EU And Some countries, such as Portugal, persons also have VAT-like tax numbers, that can be used in invoices, just like company VAT numbers can. Originally by @dreispt in #76856 **Current behavior before PR:** We check the VAT of individuals with VIES which results in a failure. **Desired behavior after PR is merged:** We should only check the VAT with VIES for companies.
Original PR description
Partial backport of 9a46cc7ad89544a5669b4e5a7ae8b6c31d52eab3 to do the VIES check only for companies in the EU And Some countries, such as Portugal, persons also have VAT-like tax numbers, that can be used in invoices, just like company VAT numbers can. Originally by @dreispt in #76856 **Current behavior before PR:** We check the VAT of individuals with VIES which results in a failure. **Desired behavior after PR is merged:** We should only check the VAT with VIES for companies. Forward-Port-Of: odoo/odoo#80454 Forward-Port-Of: odoo/odoo#79779
When leaving the code view, we need to apply its html to the editable. This failed in mass_mailing because the editor rolled back the changes due to the top element being unremovable. To avoid that, we set the `skipRollback` argument of `historyStep` to `true` and thereby trust the user's changes. task-2701024 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80502
Original PR description
When leaving the code view, we need to apply its html to the editable. This failed in mass_mailing because the editor rolled back the changes due to the top element being unremovable. To avoid that, we set the `skipRollback` argument of `historyStep` to `true` and thereby trust the user's changes. task-2701024 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80502
In a multicompany environment, if you create a sale with company A, then switch to company B to generate the invoice. The latter should have, as company, company A. This is the case if you generate a regular invoice while this is not the case if you generate any of the down payment invoice. The way the invoice is generated is not the same. To fix that bug, I set the company of the order to the invoice environment such that the journal is correctly chosen. Once the journal is chosen, the
Original PR description
In a multicompany environment, if you create a sale with company A, then switch to company B to generate the invoice. The latter should have, as company, company A. This is the case if you generate a regular invoice while this is not the case if you generate any of the down payment invoice. The way the invoice is generated is not the same. To fix that bug, I set the company of the order to the invoice environment such that the journal is correctly chosen. Once the journal is chosen, the company can be deduced correctly. Signed-off-by: Adrien Minet <admi@odoo.com> -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80473
Before this commit, the `Last 30 days` filter is duplicate in the search view of rating.rating in `Reporting > Customer Ratings` menu of Project app. This commit removes the duplicate one. Part of task-2671848 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80496
Original PR description
Before this commit, the `Last 30 days` filter is duplicate in the search view of rating.rating in `Reporting > Customer Ratings` menu of Project app. This commit removes the duplicate one. Part of task-2671848 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80496
Purpose ======= If the user doesn't have access to ir.ui.view (aka no admin or website access rights), printing a report with a configured external layout will lead to a traceback, as it's forbidden for the use to read on the field "key" on the related ir.ui.view. As we only want to retrieve the view key, this is safe to use sudo at that point. TaskID: 2701251 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merge
Original PR description
Purpose ======= If the user doesn't have access to ir.ui.view (aka no admin or website access rights), printing a report with a configured external layout will lead to a traceback, as it's forbidden for the use to read on the field "key" on the related ir.ui.view. As we only want to retrieve the view key, this is safe to use sudo at that point. TaskID: 2701251 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#80510
Make a legacy widget trigger a do_Action with `this.do_action` in the options, pass the usual options for the doAction itself plus a props object in it. Before this commit, the action did not receive all the props. After this commit, it does. 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/odo
Original PR description
Make a legacy widget trigger a do_Action with `this.do_action` in the options, pass the usual options for the doAction itself plus a props object in it. Before this commit, the action did not receive all the props. After this commit, it does. 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#80350
### Current behavior a) For a service product with Invoicing Policy set to Prepaid/Fixed Price, when we create a Sales Order with this product and change his Cost with a custom value and confirm the SO, the product's cost is overridden by the product's default cost. b) If we create a service, with Invoicing Policy set to Prepaid/Fixed Price, its cost will be 0 even if we update it in the SO ### Steps to reproduce 1. Install Sales and enable Margins in app's settings 2. Install Timesheets
Original PR description
### Current behavior a) For a service product with Invoicing Policy set to Prepaid/Fixed Price, when we create a Sales Order with this product and change his Cost with a custom value and confirm the…
### Current behavior a) For a service product with Invoicing Policy set to Prepaid/Fixed Price, when we create a Sales Order with this product and change his Cost with a custom value and confirm the SO, the product's cost is overridden by the product's default cost. b) If we create a service, with Invoicing Policy set to Prepaid/Fixed Price, its cost will be 0 even if we update it in the SO ### Steps to reproduce 1. Install Sales and enable Margins in app's settings 2. Install Timesheets 3. Get a service type product with Invoicing Policy set to Prepaid/Fixed Price 4. Create a Sales Order 5. Add the service product from step 2 6. Change his cost 7. Confirm the SO ### Reason a) Purchase price is recalculated when it should not be so it's overridden by product's standard price b) When a service with Invoicing Policy set to Prepaid/Fixed Price is created, it will be considered as linked to timesheets and the cost will be 0, waiting to be recalculated with the linked timesheets (which won't happen because no linked timesheet will be created) #### Details For b), I added a condition on the service policy because, according to this declaration https://github.com/odoo/odoo/blob/f81063382d551261801288b66e4d75303a05cbb4/addons/sale_timesheet/models/product.py#L11 a service whose invoicing policy is set to Prepaid/Fixed Price will have its delivery method set to 'timesheet' and will therefore be considered as linked to a timesheet (which is false in this case) which will result in a cost equal to 0 OPW-2689756 Forward-Port-Of: odoo/odoo#80436
Description of the issue/feature this PR addresses: Associating an existing picking with `state` different to `draft` to a computed field (for example a field in `wizard`) the `state` field is recalculated setting the value to `draft`. The problem is found here https://github.com/odoo/odoo/blob/a05f4e05b9f4df88948ac3dfc1522828b63bfb64/addons/stock/models/stock_picking.py#L485 where is created a structure with the ID picking taken from `stock.move` as key (that is always an `Integer`) but her
Original PR description
Description of the issue/feature this PR addresses: Associating an existing picking with `state` different to `draft` to a computed field (for example a field in `wizard`) the `state` field is…
Description of the issue/feature this PR addresses: Associating an existing picking with `state` different to `draft` to a computed field (for example a field in `wizard`) the `state` field is recalculated setting the value to `draft`. The problem is found here https://github.com/odoo/odoo/blob/a05f4e05b9f4df88948ac3dfc1522828b63bfb64/addons/stock/models/stock_picking.py#L485 where is created a structure with the ID picking taken from `stock.move` as key (that is always an `Integer`) but here https://github.com/odoo/odoo/blob/a05f4e05b9f4df88948ac3dfc1522828b63bfb64/addons/stock/models/stock_picking.py#L492 the data is retrieved from structure using ID of `self` that can be of type `New_id`. Current behavior before PR: The picking state is incorrect as is always set to `draft`. Desired behavior after PR is merged: The picking state remain as expected. This is obtained adding to the structure the same type of ID used to retrieve it. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80430
Purpose: It does not make much sense to create allocations of such an Time Off Types that don't require allocation. task - 2658250 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#80209
Original PR description
Purpose: It does not make much sense to create allocations of such an Time Off Types that don't require allocation. task - 2658250 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#80209
Currently, in the overview page of timeoff, in gantt view all records of the company are displayed. The purpose of this commit is to improve the loading time by displaying less information. So in this commit, added a default filter "My Department" on overview page. TaskID: 2695774 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
Original PR description
Currently, in the overview page of timeoff, in gantt view all records of the company are displayed. The purpose of this commit is to improve the loading time by displaying less information. So in this commit, added a default filter "My Department" on overview page. TaskID: 2695774 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#80252
For things to be used in l10n_ar_reports Related to PR https://github.com/odoo/enterprise/pull/22379 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80413
Original PR description
For things to be used in l10n_ar_reports Related to PR https://github.com/odoo/enterprise/pull/22379 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80413
A pos.session cannot be closed if there is any draft|cancel account.move associated to one of its pos.order. The check is done during the reconciliation. This commit checks the invoices state at the very beginning of the closing and gives a more complete error message with the invoices name and state. With this info, the customer can check the invoices without asking the support. Steps to reproduce: - Have a V14 with point_of_sale and account_accountant (It is not reproducible in V13)
Original PR description
A pos.session cannot be closed if there is any draft|cancel account.move associated to one of its pos.order. The check is done during the reconciliation. This commit checks the invoices state at the…
A pos.session cannot be closed if there is any draft|cancel account.move associated to one of its pos.order. The check is done during the reconciliation. This commit checks the invoices state at the very beginning of the closing and gives a more complete error message with the invoices name and state. With this info, the customer can check the invoices without asking the support. Steps to reproduce: - Have a V14 with point_of_sale and account_accountant (It is not reproducible in V13) - Go to Point of Sale / Configuration / Point of Sale - Open a pos.config PC - Check "Invoicing" - Go to Point of Sale - Open a pos.session PS related to PC - Process a sell until the payment screen (pos.order PO) - At the payment screen, select any customer and invoice the order - Validate - Close PS - Go to Point of Sale / Orders / Orders - Open PO - Open the invoice associated - Click "Reset to draft" - Go to Point of Sale / Sessions - Open PS - Click "Close session & Post entries" opw-2658654 Forward-Port-Of: odoo/odoo#78777
latam task 664 Forward-Port-Of: odoo/enterprise#22379
Original PR description
latam task 664 Forward-Port-Of: odoo/enterprise#22379
Steps to reproduce: - Create a new customer invoice with a total balance equal to 0 and save it. - Click on the customer - Click on the smartbutton "Partner Ledger" - Select the filter "Only Show Unreconciled Entries" Result: The invoice with balance 0 is visible Expected behavior: The invoice with balance 0 should be hidden I appended a new rule (balance != 0) to the filter opw-2680453 Forward-Port-Of: odoo/enterprise#22505
Original PR description
Steps to reproduce: - Create a new customer invoice with a total balance equal to 0 and save it. - Click on the customer - Click on the smartbutton "Partner Ledger" - Select the filter "Only Show Unreconciled Entries" Result: The invoice with balance 0 is visible Expected behavior: The invoice with balance 0 should be hidden I appended a new rule (balance != 0) to the filter opw-2680453 Forward-Port-Of: odoo/enterprise#22505
Before: From employee settings, on 'Extra Time Off Allocation on contract signature' only those Time Off Types will show for which the valid allocations exist. Instead, show all the Time Off Types that requires allocations. task - 2658250 Forward-Port-Of: odoo/enterprise#22453
Original PR description
Before: From employee settings, on 'Extra Time Off Allocation on contract signature' only those Time Off Types will show for which the valid allocations exist. Instead, show all the Time Off Types that requires allocations. task - 2658250 Forward-Port-Of: odoo/enterprise#22453
…OCR detection Checking that the current user has multi-currency rights doesn't make much sense when the extraction status can be updated via the background cron or the webhook call. Forward-Port-Of: odoo/enterprise#22553
Original PR description
…OCR detection Checking that the current user has multi-currency rights doesn't make much sense when the extraction status can be updated via the background cron or the webhook call. Forward-Port-Of: odoo/enterprise#22553
Forward-Port-Of: odoo/enterprise#22577
Original PR description
Forward-Port-Of: odoo/enterprise#22577
… for do_action In the dashboard, click on a box. Before this commit, there was a traceback bacause the do_action's API has been clearified with the new WOWL implementation. This commit adapts existing code that should be converted to wowl in the near future. Forward-Port-Of: odoo/enterprise#22496
Original PR description
… for do_action In the dashboard, click on a box. Before this commit, there was a traceback bacause the do_action's API has been clearified with the new WOWL implementation. This commit adapts existing code that should be converted to wowl in the near future. Forward-Port-Of: odoo/enterprise#22496
Prior to this PR, I wanted to merge this fix in 11.0: https://github.com/odoo/enterprise/pull/22227 > Fix string to boolean comparison. Often the comparison ends up being "True" = True, evaluating to False, while in fact, it shouldn't. > > This is especially problematic when the database is undergoing an upgrade - in such case it tries to connect to eBay's API, but since such database has restricted network access, connection attempt results in a critical error thus failing the upgrade.
Original PR description
Prior to this PR, I wanted to merge this fix in 11.0: https://github.com/odoo/enterprise/pull/22227
> Fix string to boolean comparison. Often the comparison ends up being "True" = True, evaluating to False, while in fact, it shouldn't.
>
> This is especially problematic when the database is undergoing an upgrade - in such case it tries to connect to eBay's API, but since such database has restricted network access, connection attempt results in a critical error thus failing the upgrade.
In `get_values()` there was an attempt of writing a boolean field with a string value. That's fixed and it also takes into account that `get_param('ebay_out_of_stock')` may return `None`.
@beledouxdenis
Forward-Port-Of: odoo/enterprise#22383
Forward-Port-Of: odoo/enterprise#22265Forward-Port-Of: odoo/enterprise#22555
Original PR description
Forward-Port-Of: odoo/enterprise#22555
Let's take the following example: MARCH: Jules receives 2000 € APRIL: - We make a refund of -2000 € (we cancel the fdp what) - We make a new sheet of 2300 € (It's the right yip) For the moment, the SEPA file for April will contain an amount of € 2,300 for Jules (as the negative amounts are excluded), It was proposed to make an adaptation so that the file contains only € 300 (the difference). This is not really correct, because the -2000€ record is going to be marked as "Negative
Original PR description
Let's take the following example: MARCH: Jules receives 2000 € APRIL: - We make a refund of -2000 € (we cancel the fdp what) - We make a new sheet of 2300 € (It's the right yip) For the moment, the…
Let's take the following example: MARCH: Jules receives 2000 € APRIL: - We make a refund of -2000 € (we cancel the fdp what) - We make a new sheet of 2300 € (It's the right yip) For the moment, the SEPA file for April will contain an amount of € 2,300 for Jules (as the negative amounts are excluded), It was proposed to make an adaptation so that the file contains only € 300 (the difference). This is not really correct, because the -2000€ record is going to be marked as "Negative net to report" And in fact, I think we already have everything in hand. We should : - Transfer the -2000€ to the new 2300 sheet (the net will then be 300). - Uncheck the "negative net to report" box on the -2000€ form after validation of the batch (since it is already reported). As the negative net to report box is hidden, this commit displays it to allow managing this use case. Otherwise we will do some magic stuff and reduce the UX aspect (Why such and such thing is marked as net to report or not, and also if we validate several batches at the same time, it will be a mess). Forward-Port-Of: odoo/enterprise#22538
Problem ------- Stage in recruitement process can have a reward of 0 point but you still want to see them as done in the recruitement process so referrer can see the complete status of there referree application Right now if a stage reward 0 point, you will never see it as done in the referral dashboard Solution -------- Since point are created when the applicant go forward but also backward odd number of point record linked to a stage means the stage is done even number of point
Original PR description
Problem ------- Stage in recruitement process can have a reward of 0 point but you still want to see them as done in the recruitement process so referrer can see the complete status of there referree application Right now if a stage reward 0 point, you will never see it as done in the referral dashboard Solution -------- Since point are created when the applicant go forward but also backward odd number of point record linked to a stage means the stage is done even number of point record linked to a stage means the stage is not done Add test to avoid further regression Forward-Port-Of: odoo/enterprise#22530
In edit while signing mode, it is possible to add signature sign items, move them and finally sign them. Since the signature/initial sign item added while signing can be moved/resized, the HTML structure is different from a normal signature/initial sign item, therefore some edge cases need to be treated. Currently, when you sign a added signature sign item, the first sign is done when the user clicks in the div with class 'o_sign_item_display'. After signing, the signature image takes the who
Original PR description
In edit while signing mode, it is possible to add signature sign items, move them and finally sign them. Since the signature/initial sign item added while signing can be moved/resized, the HTML…
In edit while signing mode, it is possible to add signature sign items, move them and finally sign them. Since the signature/initial sign item added while signing can be moved/resized, the HTML structure is different from a normal signature/initial sign item, therefore some edge cases need to be treated. Currently, when you sign a added signature sign item, the first sign is done when the user clicks in the div with class 'o_sign_item_display'. After signing, the signature image takes the whole space and the move/resize handlers are deleted. So if you want to click the sign item again to edit the signature, the wizard doesn't open because we had registered the click event on the 'o_sign_item_display'. This PR changes the event listener to react to all clicks on the sign item and then check if it is in editMode and if 'o_sign_item_display' is there. This fixes the wizard not opening for the second time you click an added sign item trying to change the signature. task-2679957 Forward-Port-Of: odoo/enterprise#21960
The `_` could be redefined after the import while looping on multiple invoice lines. Forward-Port-Of: odoo/enterprise#22534 Forward-Port-Of: odoo/enterprise#21612
Original PR description
The `_` could be redefined after the import while looping on multiple invoice lines. Forward-Port-Of: odoo/enterprise#22534 Forward-Port-Of: odoo/enterprise#21612
Prior to this commit: The delivery guide reason could not be selected by the user since was not shown till the delivery guide was confirmed. Now is shown whenever the module is installed and the country code is Chile Forward-Port-Of: odoo/enterprise#22149
Original PR description
Prior to this commit: The delivery guide reason could not be selected by the user since was not shown till the delivery guide was confirmed. Now is shown whenever the module is installed and the country code is Chile Forward-Port-Of: odoo/enterprise#22149
PURPOSE Do not display blockUI twice when app is created. SPEC Display blockUI only once. TASK 2646205 Forward-Port-Of: odoo/enterprise#20952
Original PR description
PURPOSE Do not display blockUI twice when app is created. SPEC Display blockUI only once. TASK 2646205 Forward-Port-Of: odoo/enterprise#20952
If there are one or multiple companies and the `account_journal_payment_debit_account_id` & `account_journal_payment_credit_account_id` is not set for any of the companies like  Before this Commit: =================== The cash flow statement is printed with zero values for all the companies.  Before this Commit: =================== The cash flow statement is printed with zero values for all the companies.  After this Commit: ================= The cash flow statement is printed with correct values for all the companies.  opw - 2671338 opw - 2671177 Forward-Port-Of: odoo/enterprise#22484