Thursday, February 16, 2023
39 changes · master
Enhancements to existing features
Odoo now uses the standard Python approach for organizing its internal packages, replacing older compatibility behavior. This simplifies maintenance and reduces future upgrade risk without changing day-to-day business functionality.
Original PR description
PEP 420 (blaze it)
The web testing tools now better mirror how Odoo groups and summarizes records, including list-style summaries for linked records and numeric fields. This makes automated tests more reliable and helps reduce the risk of issues reaching users.
VAT identification labels have been updated for Latin American countries with major localizations. This helps users see country-appropriate tax terminology in accounting and company records, reducing confusion during setup and daily operations.
Original PR description
Update the VAT label for the latam countries with major localizations. 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
Resolved issues and error corrections
This fix allows employees to create timesheets for projects whose analytic account is not tied to a specific company. It prevents unnecessary timesheet creation failures in shared or company-neutral project setups.
Original PR description
This commit's purpose is to allow the creation of timesheet even if the analytic account of the project has no company_id 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
Code cleanup and technical improvements
This update reorganizes how field widgets are registered behind the scenes, separating business field details from the visual component setup. It should make future maintenance easier and more consistent across Odoo apps without changing day-to-day user workflows.
Original PR description
Before this commit, the field's description was stored on the component and this component was then registered. Now, an object describing the field is used on registration the same way as it is done for views since https://github.com/odoo/odoo/commit/b828cfc72c587d0b73fcc5459695705640437671. This split the component's description (props, template, ...) of the field's description (displayName, supportedTypes, ...) and makes it clearer. task: 3171520
Miscellaneous changes
Since commit (1), the write/writeText were no longer correctly called, since the browser native functions couldn't be called. Sometimes, it raised the "Illegal invocation..." error, or could have an unexpected behavior, preventing the value to be copied in the clipboard, which made the button pointless. No additional test was added, since it is difficult to test the clipboard API programmatically, and the current test coverage is all that we can do, without using the real clipboard object.
Original PR description
Since commit (1), the write/writeText were no longer correctly called, since the browser native functions couldn't be called. Sometimes, it raised the "Illegal invocation..." error, or could have an unexpected behavior, preventing the value to be copied in the clipboard, which made the button pointless. No additional test was added, since it is difficult to test the clipboard API programmatically, and the current test coverage is all that we can do, without using the real clipboard object. (1): 9cdcd1c1f7219030386d2c90205ea083eb835a13 Forward-Port-Of: odoo/odoo#112802
This fixes an issue where user avatar fields in kanban views could use the wrong display component. The change helps ensure assigned users or collaborators are shown correctly, improving clarity in records that rely on avatar-based user lists.
Original PR description
Before this commit, since the commit [1] changing the field registry, the component used for the `kanban.many2many_avatar_user` widget is not right one. This commit fixes the issue by setting the right component for the widget. [1] 9f4622492c5cd84847368d32bf02b0b538a6dd69
Point of Sale tax calculations now use the same tax amount values as the main accounting system, reducing the chance of inconsistencies. An internal duplicate field was removed and replaced with existing tax distribution data, making offline POS tax handling simpler and more reliable.
Original PR description
To be able to compute the taxes offline, the POS JS code mimicked the `compute_all` function in `account_tax.py`. At some point, the POS added an extra field on `account.tax` (see:…
To be able to compute the taxes offline, the POS JS code mimicked the `compute_all` function in `account_tax.py`. At some point, the POS added an extra field on `account.tax` (see:
https://github.com/odoo/odoo/commit/8fb53c53c3128e8cea7ef20b9ab4946ac2f9b7d9): `real_amount` which is defined as:
real_amount = tax.amount * sum(tax.repartition_line.factor)
Then, when fetching the data from the server to the client, the `real_amount` was passed in place of the `amount`.
But then, the `amount` field in the JS is no longer the same as in the python code and it is very error prone. In addition, it's easy to get rid of this extra field by using the sum of the factors from the repartition lines.
Now, we pass the sum(tax.repartition_lines.factor_percent)/100, which is equivalent to sum(tax.repartition_line.factor) to the client, and use it in the `compute_all` as done in the python function, and leave `tax.amount` untouched.
Both `compute_all` functions now operate using the same `tax.amount` and we get rid of the `real_amount` field.
upgrade-https://github.com/odoo/upgrade/pull/4307The domain selector has been reorganized so its code is centralized in fewer components and files. This makes the feature easier for developers to understand and maintain, with no expected change to day-to-day user behavior.
Original PR description
This commit is a refactoring of the domain selector to simplify it. The component DomainSelector now uses less sub components. Consequently, the code is centralized in fewer files and more readable. task: 3149707
This update reorganizes how custom field definitions are registered across several Odoo apps. It does not change business workflows, but makes the underlying structure clearer and easier to maintain for future improvements.
Original PR description
Before this commit, the field's description was stored on the component and this component was then registered. Now, an object describing the field is used on registration the same way as it is done for views since https://github.com/odoo/odoo/commit/b828cfc72c587d0b73fcc5459695705640437671. This split the component's description (props, template, ...) of the field's description (displayName, supportedTypes, ...) and makes it clearer. task: 3171520
This update restructures internal data model handling to align the enterprise codebase with related platform changes. It should help keep business apps consistent and easier to maintain, with limited direct impact on day-to-day users.
Original PR description
This commit is the counterpart of odoo/odoo#112518
*: base, http_routing, mass_mailing, stock, web, web_editor, website_slides In some situations `werkzeug.wrappers.Response` are used instead of `odoo.http.Reponse` that extends it. This is a problem because since [1] the calls to `set_cookie` expect it to accept the `cookie_type` parameter, which is not the case in the base werkzeug implementation. This commit replaces the `werkzeug.wrappers.Response` by `odoo.http.Response`. [1]: https://github.com/odoo/odoo/commit/2cbda6c98ee947c
Original PR description
*: base, http_routing, mass_mailing, stock, web, web_editor, website_slides In some situations `werkzeug.wrappers.Response` are used instead of `odoo.http.Reponse` that extends it. This is a problem because since [1] the calls to `set_cookie` expect it to accept the `cookie_type` parameter, which is not the case in the base werkzeug implementation. This commit replaces the `werkzeug.wrappers.Response` by `odoo.http.Response`. [1]: https://github.com/odoo/odoo/commit/2cbda6c98ee947cea1d06c09880eee8c758304a8 Forward-Port-Of: odoo/odoo#111997
Werkzeug 1.0 colorised some outputs on POSIX IFF `click` was installed. Since 2.0 (pallets/werkzeug#2012) werkzeug unconditionally colorises the log on POSIX. This is annoying when using output redirection (let alone logging to a non-stream), as werkzeug will dump ANSI color codes to the non-term stdout and thus the logfile. Werkzeug provides no official knob to control this behaviour, but it does have a secret flag which is normally used to check if colorama is available on windows (so th
Original PR description
Werkzeug 1.0 colorised some outputs on POSIX IFF `click` was installed. Since 2.0 (pallets/werkzeug#2012) werkzeug unconditionally colorises the log on POSIX. This is annoying when using output redirection (let alone logging to a non-stream), as werkzeug will dump ANSI color codes to the non-term stdout and thus the logfile. Werkzeug provides no official knob to control this behaviour, but it does have a secret flag which is normally used to check if colorama is available on windows (so the ANSI codes are not output if colorama won't be interpreting and stripping them on the way out). Since `werkzeug.serving` is available in pretty much all versions, we can just (un)set this flag if not logging to a tty, and versions 2+ should pick it up and disable colorisation. Forward-Port-Of: odoo/odoo#112794
Description of the issue/feature this PR addresses: - Added query time in debug mode for sql queries. Current behavior before PR: - Only the query is displayed. Desired behavior after PR is merged: - request time + query is now displayed. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#108043
Original PR description
Description of the issue/feature this PR addresses: - Added query time in debug mode for sql queries. Current behavior before PR: - Only the query is displayed. Desired behavior after PR is merged: - request time + query is now displayed. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#108043
The date from would not be formatted on leaves spanning multiple days. Forward-Port-Of: odoo/odoo#112785
Original PR description
The date from would not be formatted on leaves spanning multiple days. Forward-Port-Of: odoo/odoo#112785
Description of the issue/feature this PR addresses: We have a client with a database where the number of account.payment records now exceeds 150k. The account.chart.template existing_accounting method has extremely poor performance, causing Settings app not to load. No amount of ANALYZE seems to make any difference. By adding an explicit order to the queries within `existing_accounting` the PostgreSQL query cost drops to `cost=0.84..1.78 rows=1 width=4` from `cost=13061.20..18895.19
Original PR description
Description of the issue/feature this PR addresses: We have a client with a database where the number of account.payment records now exceeds 150k. The account.chart.template existing_accounting…
Description of the issue/feature this PR addresses:
We have a client with a database where the number of account.payment records now exceeds 150k.
The account.chart.template existing_accounting method has extremely poor performance, causing Settings app not to load.
No amount of ANALYZE seems to make any difference.
By adding an explicit order to the queries within `existing_accounting` the PostgreSQL query cost drops to `cost=0.84..1.78 rows=1 width=4` from `cost=13061.20..18895.19 rows=1 width=24` (on my local dev machine).
Query plan after:
```
devel => EXPLAIN SELECT "account_payment".id FROM "account_payment" LEFT JOIN "account_move" AS "account_payment__move_id" ON ("account_payment"."move_id" = "account_payment__move_id"."id") WHERE ("account_payment__move_id"."company_id" = 1) ORDER BY "account_payment".id DESC LIMIT 1;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------
Limit (cost=0.84..1.78 rows=1 width=4)
-> Nested Loop (cost=0.84..143789.87 rows=154031 width=4)
-> Index Scan Backward using account_payment_pkey on account_payment (cost=0.42..6559.15 rows=154031 width=8)
-> Index Scan using account_move_pkey on account_move account_payment__move_id (cost=0.42..0.89 rows=1 width=4)
Index Cond: (id = account_payment.move_id)
Filter: (company_id = 1)
```
Query plan before:
```
devel => EXPLAIN SELECT "account_payment".id FROM "account_payment" LEFT JOIN "account_move" AS "account_payment__move_id" ON ("account_payment"."move_id" = "account_payment__move_id"."id") WHERE ("account_payment__move_id"."company_id" = 1) ORDER BY "account_payment__move_id"."date" DESC,"account_payment__move_id"."name" DESC LIMIT 1;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=13061.20..18895.19 rows=1 width=24)
-> Nested Loop (cost=13061.20..898628048.52 rows=154031 width=24)
Join Filter: (account_payment.move_id = account_payment__move_id.id)
-> Gather Merge (cost=13061.20..110741.84 rows=308506 width=24)
Workers Planned: 2
-> Incremental Sort (cost=12061.18..74132.57 rows=128544 width=24)
Sort Key: account_payment__move_id.date DESC, account_payment__move_id.name DESC
Presorted Key: account_payment__move_id.date
-> Parallel Index Scan Backward using account_move_date_index on account_move account_payment__move_id (cost=0.42..57930.86 rows=128544 width=24)
Filter: (company_id = 1)
-> Materialize (cost=0.00..5366.47 rows=154031 width=8)
-> Seq Scan on account_payment (cost=0.00..3994.31 rows=154031 width=8)
```
Current behavior before PR:
Settings app will not load.
Desired behavior after PR is merged:
Settings app loads.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
CLA PR: https://github.com/odoo/odoo/pull/112468
Forward-Port-Of: odoo/odoo#112470When manually setting a discount on the first line of a sale order having more than 3 displayed lines, the product_discount_field widget prompts the user if he would like to apply the same discount to all the lines. This fails to apply when the localization uses a comma as decimal separator instead of a dot or uses a digit grouping symbol. This is because the widget calls the JS function Number() on the string that was entered by the user in the discount field, after it was formatted according
Original PR description
When manually setting a discount on the first line of a sale order having more than 3 displayed lines, the product_discount_field widget prompts the user if he would like to apply the same discount…
When manually setting a discount on the first line of a sale order having more than 3 displayed lines, the product_discount_field widget prompts the user if he would like to apply the same discount to all the lines.
This fails to apply when the localization uses a comma as decimal separator instead of a dot or uses a digit grouping symbol. This is because the widget calls the JS function Number() on the string that was entered by the user in the discount field, after it was formatted according to the localization.
Taking the number 1500 as an example, different cases are:
- Number("1500.0") gives 1500
- Number("1500,0") gives 'NaN'
- Number("1,500.0") gives 'NaN'
- Number("1.500,0") gives 'NaN'
This result is then used to apply the discount on the remaining lines of the sale orders. Using 'NaN' will result in a 0% discount.
The use of Number() can be avoided by using the property field 'value' of the product_discount_field widget.
opw-3127690
Forward-Port-Of: odoo/odoo#112692Reverting of [1] The commit was supposed to fix an issue in `stock_barcode_mrp`, but it only worked with planned transfers. In case of an immediate one, a traceback appeared under some conditions. Moreover, the commit creates a not so good behaviour in Inventory app. So, we remove [1] and replace it with a new fix oe-side (see PR linked with the one of this commit). [1] https://github.com/odoo/odoo/commit/879ef5ef6bc06e6db46f3e5f9285619316f183e8 OPW-3015933 Forward-Port-Of: odoo
Original PR description
Reverting of [1] The commit was supposed to fix an issue in `stock_barcode_mrp`, but it only worked with planned transfers. In case of an immediate one, a traceback appeared under some conditions. Moreover, the commit creates a not so good behaviour in Inventory app. So, we remove [1] and replace it with a new fix oe-side (see PR linked with the one of this commit). [1] https://github.com/odoo/odoo/commit/879ef5ef6bc06e6db46f3e5f9285619316f183e8 OPW-3015933 Forward-Port-Of: odoo/odoo#112757 Forward-Port-Of: odoo/odoo#112313
If you have a lot of attendance spread accross various employees and various dates, the report takes ages to load (or your browser freezes and you can't access reporting). And if it loads, the report is unreadable anyway. We now use a default filter to always display user friendly graphs. Since we group by day, a default period of a month seems like a good compromise. To reproduce the issue: - install hr_attendance - use a script to create some attendances (ex: create 300 employees and 3
Original PR description
If you have a lot of attendance spread accross various employees and various dates, the report takes ages to load (or your browser freezes and you can't access reporting). And if it loads, the report is unreadable anyway. We now use a default filter to always display user friendly graphs. Since we group by day, a default period of a month seems like a good compromise. To reproduce the issue: - install hr_attendance - use a script to create some attendances (ex: create 300 employees and 30 attendance for each, spread randomly in the last 3 years) - click on "Reporting" opw-3167099 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#112835
`handle_error`'s docstring states that it returns a `Response`, but in most case `HttpDispatcher.handle_error` returns an `HTTPException`. After discussion, the implementation is correct, `handle_error` should be documented to return a WSGI Application (a callable taking an `environ` and a `start_response` callable) instead. Forward-Port-Of: odoo/odoo#112690
Original PR description
`handle_error`'s docstring states that it returns a `Response`, but in most case `HttpDispatcher.handle_error` returns an `HTTPException`. After discussion, the implementation is correct, `handle_error` should be documented to return a WSGI Application (a callable taking an `environ` and a `start_response` callable) instead. Forward-Port-Of: odoo/odoo#112690
https://github.com/odoo/odoo/commit/c6f8ab69a0eb521ef3fc9a31f5a08bd1097bf1b2 After this commit, when pos_restaurant is installed, no cash payment method will be added. opw-2765443 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#112779 Forward-Port-Of: odoo/odoo#111081
Original PR description
https://github.com/odoo/odoo/commit/c6f8ab69a0eb521ef3fc9a31f5a08bd1097bf1b2 After this commit, when pos_restaurant is installed, no cash payment method will be added. opw-2765443 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#112779 Forward-Port-Of: odoo/odoo#111081
Following up https://github.com/odoo/odoo/pull/112692 that avoided the use of the 'Number' javascript function in the 'product_discount_field' widget, the call to that function was left in the code. It is useless and can be removed since the value of the new field used, the property field 'props.value', is already a float. Forward-Port-Of: odoo/odoo#112860
Original PR description
Following up https://github.com/odoo/odoo/pull/112692 that avoided the use of the 'Number' javascript function in the 'product_discount_field' widget, the call to that function was left in the code. It is useless and can be removed since the value of the new field used, the property field 'props.value', is already a float. Forward-Port-Of: odoo/odoo#112860
This commit fixes an issue where the "No records found" helper text is wrongly positioned below the sample data's records (i.e. not visible) instead of over them. This is basically a revert of https://github.com/odoo/odoo/commit/9407383a569711651182a3d0bebd2f990677e53f due to the changes in the DOM and styling made in the meantime. But actually we can go further and ensure we always have the ListView's table present in the DOM. This change allows to simplify the positioning of the hel
Original PR description
This commit fixes an issue where the "No records found" helper text is wrongly positioned below the sample data's records (i.e. not visible) instead of over them. This is basically a revert of…
This commit fixes an issue where the "No records found" helper text is wrongly positioned below the sample data's records (i.e. not visible) instead of over them. This is basically a revert of https://github.com/odoo/odoo/commit/9407383a569711651182a3d0bebd2f990677e53f due to the changes in the DOM and styling made in the meantime. But actually we can go further and ensure we always have the ListView's table present in the DOM. This change allows to simplify the positioning of the helper and the implementation of the Purchase's dashboard. Steps to reproduce: - create a new database **without demo data** - install "Planning" and "Sales" apps - with a mobile-like screen size, open Planning - switch to Gantt view - in a cell, click/tap on the magnifier button (which is on hover...) - the many2x view doesn't contain data => action helper "No records found" isn"t visible (scroll to bottom to find it) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#112626
Current behavior: When importing an order from the sales app in the PoS app, there was a text showing the "Old price" of the order line. But the actual price and the Old price were the same. Steps to reproduce: - Install the l10n_fr_pos_cert module - Install the pos_sale module - Create a sale order - Open a PoS session - Import the sale order in the PoS session - The order line is showing an "Old price" when it shouldn't. opw-3130969 --- I confirm I have signed the CLA and read
Original PR description
Current behavior: When importing an order from the sales app in the PoS app, there was a text showing the "Old price" of the order line. But the actual price and the Old price were the same. Steps to reproduce: - Install the l10n_fr_pos_cert module - Install the pos_sale module - Create a sale order - Open a PoS session - Import the sale order in the PoS session - The order line is showing an "Old price" when it shouldn't. opw-3130969 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#112229
[FIX] web_editor: commit changes when using the sidebar [FIX] web_editor: make to_inline with html2canvas fast [FIX] web_editor,mass_mailing: mailing sidebar glitch [FIX] mass_mailing, web_editor: call cleanForSave on cloned element task-3052658 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#112872 Forward-Port-Of: odoo/odoo#107881
Original PR description
[FIX] web_editor: commit changes when using the sidebar [FIX] web_editor: make to_inline with html2canvas fast [FIX] web_editor,mass_mailing: mailing sidebar glitch [FIX] mass_mailing, web_editor: call cleanForSave on cloned element task-3052658 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#112872 Forward-Port-Of: odoo/odoo#107881
Steps to reproduce: In Working Times, click on "SWITCH TO 2 WEEKS CALENDAR" for the default calendar used by the company. Issue: A ValidationError appears: 'Attendances can't overlap.' Cause: To create a two-week schedule, by default, we will use attendances provided for the company's default schedule. When we want to switch from a one-week schedule to a two-week schedule, we first delete the attendances from the schedule to be modified. However, if this schedule is the company's de
Original PR description
Steps to reproduce: In Working Times, click on "SWITCH TO 2 WEEKS CALENDAR" for the default calendar used by the company. Issue: A ValidationError appears: 'Attendances can't overlap.' Cause: To…
Steps to reproduce: In Working Times, click on "SWITCH TO 2 WEEKS CALENDAR" for the default calendar used by the company. Issue: A ValidationError appears: 'Attendances can't overlap.' Cause: To create a two-week schedule, by default, we will use attendances provided for the company's default schedule. When we want to switch from a one-week schedule to a two-week schedule, we first delete the attendances from the schedule to be modified. However, if this schedule is the company's default schedule, it will no longer have the default attendances that we must use to build the two-week schedule. So we end up with the two "fictitious" attendances that are used to delimit the two weeks. With only these two attendances, the constraint of not having two overlapping attendances is not respected (because the two attendances created will be modified to belong to the same week). Solution: Check that the calendar to be modified is not the default calendar used by the company. opw-3127337 Forward-Port-Of: odoo/odoo#111559
## Current behaviour When creating a custom menu that wants to display the list view of the `approval.product.line`, we get a stack trace about the lack of a "parent" field. ## Expected behaviour Should not have a stacktrace when creating a custom list view of `approval.product.line`. ## Steps to reproduce - Install Approvals and Studio - Create a custom menu with Studio based on the existing model `approval.product.line` - Open the new menu -> stacktrace ## Reason for the problem
Original PR description
## Current behaviour When creating a custom menu that wants to display the list view of the `approval.product.line`, we get a stack trace about the lack of a "parent" field. ## Expected behaviour…
## Current behaviour When creating a custom menu that wants to display the list view of the `approval.product.line`, we get a stack trace about the lack of a "parent" field. ## Expected behaviour Should not have a stacktrace when creating a custom list view of `approval.product.line`. ## Steps to reproduce - Install Approvals and Studio - Create a custom menu with Studio based on the existing model `approval.product.line` - Open the new menu -> stacktrace ## Reason for the problem By default, the view for `approval.product.line` is a view that is embedded by default, therefor in the domains for the attribute we use the "parent" field to reference to the "parent" view js-side. But when creating a menu via Studio, this assertion is not correct anymore, since the view is not embedded. ## Fix Create a separate list view for the model with a higher priority, so that studio takes it when creating the view. Also remove the attributes, since the fields don't exist on the model and we can't find their value from the "parent", since it doesn't exist. ## Affected versions - 14.0 - 15.0 - saas-15.2 - 16.0 - saas-16.1 - master --- opw-3164422 Forward-Port-Of: odoo/enterprise#37027
Steps to reproduce the bug: - Create a payslip P for period 01/02/23 to 28/02/23 - Set Date Account of P to 01/01/23 - Compute the sheet of P and create draft entry DE Bug: The accounting date of DE was 28/02/23 instead of 01/01/23 opw:3002816 Forward-Port-Of: odoo/enterprise#37062 Forward-Port-Of: odoo/enterprise#37005
Original PR description
Steps to reproduce the bug: - Create a payslip P for period 01/02/23 to 28/02/23 - Set Date Account of P to 01/01/23 - Compute the sheet of P and create draft entry DE Bug: The accounting date of DE was 28/02/23 instead of 01/01/23 opw:3002816 Forward-Port-Of: odoo/enterprise#37062 Forward-Port-Of: odoo/enterprise#37005
Steps to reproduce: - install sale_subscription and stock modules; - create two products, one recurring and one storable with minimum one unit on hand; - create a subscription with these two products (without start date). Issue: A traceback appears. Cause: In the case where we don't give a start date on the quotation, we will use functions of other modules (due to the storable product) which will call the function `_compute_last_invoice_date` before the start date has been set (which
Original PR description
Steps to reproduce: - install sale_subscription and stock modules; - create two products, one recurring and one storable with minimum one unit on hand; - create a subscription with these two products (without start date). Issue: A traceback appears. Cause: In the case where we don't give a start date on the quotation, we will use functions of other modules (due to the storable product) which will call the function `_compute_last_invoice_date` before the start date has been set (which triggers the error). In the flow, this date is set via the `_confirm_subscription` function afterwards. Solution: Check that the date exists before using it in the comparison. opw-3179800 Forward-Port-Of: odoo/enterprise#37095
Forward-Port-Of: odoo/enterprise#37092
Original PR description
Forward-Port-Of: odoo/enterprise#37092
Issue: Downloading the EDI document causes a traceback. Since https://github.com/odoo/odoo/pull/68299, the QWeb engine returns Markup. This makes b64encode fail at https://github.com/odoo/odoo/blob/8f61715e9048d7bb066d008c3993766e2c537db9/addons/account_edi/models/account_edi_document.py#L56 In https://github.com/odoo/enterprise/pull/21332 we fixed this problem for the main flow (sending the XML to SUNAT). We now fix this in the case of downloading the XML. Task: latam-localizatio
Original PR description
Issue: Downloading the EDI document causes a traceback. Since https://github.com/odoo/odoo/pull/68299, the QWeb engine returns Markup. This makes b64encode fail at https://github.com/odoo/odoo/blob/8f61715e9048d7bb066d008c3993766e2c537db9/addons/account_edi/models/account_edi_document.py#L56 In https://github.com/odoo/enterprise/pull/21332 we fixed this problem for the main flow (sending the XML to SUNAT). We now fix this in the case of downloading the XML. Task: latam-localizations n.975 Forward-Port-Of: odoo/enterprise#37088 Forward-Port-Of: odoo/enterprise#37084
[1] and [2] have been deployed so a user can add scan a kit in the barcode app. However, under some conditions, a traceback appeared. So, we revert [1] (see oc-side PR linked to this commit) and change the fix for a new one: if needed, we send RPC to explode the kit-SM. In the test, the commit adds a step: click on the pencil to edit the line. This was the origin of the traceback: without the new fix version, if the picking is immediate, clicking on the pencil will trigger a save and th
Original PR description
[1] and [2] have been deployed so a user can add scan a kit in the barcode app. However, under some conditions, a traceback appeared. So, we revert [1] (see oc-side PR linked to this commit) and change the fix for a new one: if needed, we send RPC to explode the kit-SM. In the test, the commit adds a step: click on the pencil to edit the line. This was the origin of the traceback: without the new fix version, if the picking is immediate, clicking on the pencil will trigger a save and this save will trigger the explode. As a result, we try to edit a line that does not exist anymore (because of the explode), hence the traceback. [1] https://github.com/odoo/odoo/commit/879ef5ef6bc06e6db46f3e5f9285619316f183e8 [2] https://github.com/odoo/enterprise/commit/2bdbf690acf31355ccb8c71190e4e2de0eb49f66 OPW-3015933 Forward-Port-Of: odoo/enterprise#37093 Forward-Port-Of: odoo/enterprise#36870
before this commit, on expanding the check register report by clicking the account shows the traceback. after this commit, on expanding the check register report, no traceback will be shown. Issue reported: https://github.com/odoo/odoo/issues/112480 Forward-Port-Of: odoo/enterprise#37003
Original PR description
before this commit, on expanding the check register report by clicking the account shows the traceback. after this commit, on expanding the check register report, no traceback will be shown. Issue reported: https://github.com/odoo/odoo/issues/112480 Forward-Port-Of: odoo/enterprise#37003
Hong Kong Payroll Localisation Features: - Add Working Times to include Weekend in the payslip to calculate Daily Wage - Add Payroll Structure for full time employee, including - Monthly Salary (CAP57) - Payment in Lieu of Notice - Long Service Payment - Severance Payment - Add Salary Rules - MPF - 713 computation gross - AutoPay or Second Batch AutoPay amount - End of year payment - Add Leave Types - Add Work Entry Types - Add Payslip Other Inputs (e.g. Back P
Original PR description
Hong Kong Payroll Localisation Features: - Add Working Times to include Weekend in the payslip to calculate Daily Wage - Add Payroll Structure for full time employee, including - Monthly Salary…
Hong Kong Payroll Localisation
Features:
- Add Working Times to include Weekend in the payslip to calculate Daily Wage
- Add Payroll Structure for full time employee, including
- Monthly Salary (CAP57)
- Payment in Lieu of Notice
- Long Service Payment
- Severance Payment
- Add Salary Rules
- MPF
- 713 computation gross
- AutoPay or Second Batch AutoPay amount
- End of year payment
- Add Leave Types
- Add Work Entry Types
- Add Payslip Other Inputs (e.g. Back Pay, Commission, etc)
- Add Rules parameter (e.g. MPF Threshold, MPF Maximum, etc)
- Allowance
- Internet Allowance
- Renting Allowance
- Leave can bypass work entry type such that some leaves can override public holiday or weekend.
- New fields under employee to calculate MPF Volunteer Contribution
- Daily Wage calculation will compare 713 daily wage or monthly daily wage is larger to decide to use which wage
- 713 Computation
- Use past 12 months payslip divided by work day to calculate the daily wage (Only use those work day which is full pay)
- If taking leave and the leave start day is from last month, the leave daily wage should use the first day of the leave.
- Add new fields, 713 Gross, MPF Gross, AutoPay Gross, Second AutoPay Gross in Payroll Report
Related: https://github.com/odoo/odoo/pull/112066
task-2455248
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/enterprise#34173Impacted versions: 16.0+ How to reproduce: -> difficult to test manually - make it so that a knowledge macro advances faster than the loading of the form view it goes to, so that the chatter is not loaded when the macro searches for it the first time. Current behavior: - The macro searches for the chatter and does not find it, so it searches in pages of the form view notebook and the traceback occurs Expected behavior: - No traceback Task-3188188 Forward-Port-Of: odoo/
Original PR description
Impacted versions: 16.0+ How to reproduce: -> difficult to test manually - make it so that a knowledge macro advances faster than the loading of the form view it goes to, so that the chatter is not loaded when the macro searches for it the first time. Current behavior: - The macro searches for the chatter and does not find it, so it searches in pages of the form view notebook and the traceback occurs Expected behavior: - No traceback Task-3188188 Forward-Port-Of: odoo/enterprise#37097
## Current behaviour If a user that doesn't have any access to contracts, adds a task in the gantt view and assigns an employee on it, he gets an Access Error for trying to access hr.contract, but the task is created nonetheless. ## Expected behaviour Should not get an Access Error, because the task gets added anyway, and you can add the task from the list view without any problem. (the issue is only on the gantt view). ## Steps to reproduce - Install hr_timesheet, contracts (not attend
Original PR description
## Current behaviour If a user that doesn't have any access to contracts, adds a task in the gantt view and assigns an employee on it, he gets an Access Error for trying to access hr.contract, but…
## Current behaviour If a user that doesn't have any access to contracts, adds a task in the gantt view and assigns an employee on it, he gets an Access Error for trying to access hr.contract, but the task is created nonetheless. ## Expected behaviour Should not get an Access Error, because the task gets added anyway, and you can add the task from the list view without any problem. (the issue is only on the gantt view). ## Steps to reproduce - Install hr_timesheet, contracts (not attendance) - On a user, remove all access rights that are HR related, timesheet rights should be `access to all employee timesheets` (not admin) - Create a new project as admin - Login as the other user - Go to your new project, gantt view, magnifying glass, create/new, assign another user on the task, save it - You get an access error for the model `hr.contract`. ## Reason for the problem When computing the schedule for the task, we need to evaluate the working calendar, which internally makes a few searches on `hr.contract`, which the current user doesn't have access to. ## Fix Add a few strategic `sudo()` in `project.task` to ignore the access requirements for the contracts. This way the client is not forced to grant contract access to a user which schedules task and assigns to other employees on the gantt view. ## Affected versions - 16.0 - saas-16.1 - master --- opw-3142948 Forward-Port-Of: odoo/enterprise#36940
This PR allow to do some UI improvements in the reports so that they are more readable for users. This PR adds the possibility to have highlight on hover (was present in v15 but no more in v16), also change some coloring (lines and subtable) on the journal report to have a more readable report. Finally the date present was repeated in the filter and on top of the report. When having no comparison, the date on top of the report is not displayed anymore to avoid repetition. Task-id: 3166902 Fo
Original PR description
This PR allow to do some UI improvements in the reports so that they are more readable for users. This PR adds the possibility to have highlight on hover (was present in v15 but no more in v16), also change some coloring (lines and subtable) on the journal report to have a more readable report. Finally the date present was repeated in the filter and on top of the report. When having no comparison, the date on top of the report is not displayed anymore to avoid repetition. Task-id: 3166902 Forward-Port-Of: odoo/enterprise#36617
Forward-Port-Of: odoo/enterprise#35798
Original PR description
Forward-Port-Of: odoo/enterprise#35798
## Current behaviour When setting the discount on an upsell manually, and then confirming the upsell, the discount value was reset at the value it was when creating the upsell. ## Expected behaviour Should be able to set the discount on the upsell manually and it should be kept that way, not being reset. ## Steps to reproduce - Install Subscriptions - Create a subscription, confirm it, invoice it, upsell it - Take note on the discount value - Change the discount manually, save it (sh
Original PR description
## Current behaviour When setting the discount on an upsell manually, and then confirming the upsell, the discount value was reset at the value it was when creating the upsell. ## Expected behaviour…
## Current behaviour When setting the discount on an upsell manually, and then confirming the upsell, the discount value was reset at the value it was when creating the upsell. ## Expected behaviour Should be able to set the discount on the upsell manually and it should be kept that way, not being reset. ## Steps to reproduce - Install Subscriptions - Create a subscription, confirm it, invoice it, upsell it - Take note on the discount value - Change the discount manually, save it (should stay changed to what you set) - Confirm the upsell, notice that it reverted back to the value we've taken note on. ## Reason for the problem Since the discount is a precomputed field, when we confirm the upsell, a new `next_invoice_date` is computed, which triggers the compute of the discount, which overwrite the manually set value. ## Fix We remove the dependency on `order_id.next_invoice_date` on `_compute_discount`, to prevent the computation when we confirm the upsell. ## Affected versions - 16.0 - saas-16.1 - master --- opw-3068419 Forward-Port-Of: odoo/enterprise#37110 Forward-Port-Of: odoo/enterprise#36929