Tuesday, December 17, 2024
18 changes · saas-17.4
Miscellaneous changes
Description of the issue/feature this PR addresses: - On the error message when we check the lot and it's linked to another product it displays the location_id instead of the lot_id which isn't correct. Current behavior before PR: - Incorrect displayed value in the error message. Desired behavior after PR is merged: - Replace the location name with the lot name. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/od
Original PR description
Description of the issue/feature this PR addresses: - On the error message when we check the lot and it's linked to another product it displays the location_id instead of the lot_id which isn't correct. Current behavior before PR: - Incorrect displayed value in the error message. Desired behavior after PR is merged: - Replace the location name with the lot name. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190165
### After this PR: This PR simply add a search function to stock_picking_batch move_line_ids field --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189172
Original PR description
### After this PR: This PR simply add a search function to stock_picking_batch move_line_ids field --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189172
This commit fixes a bug introduced by [#166482](https://github.com/odoo/odoo/pull/166482), where it attempts to reconcile an account_move_line twice, and fails to do so the second time, which prevents the confirmation of invoices. The fix adds a step to remove already reconciled items from the reconciliation plan. opw-4148669 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180903
Original PR description
This commit fixes a bug introduced by [#166482](https://github.com/odoo/odoo/pull/166482), where it attempts to reconcile an account_move_line twice, and fails to do so the second time, which prevents the confirmation of invoices. The fix adds a step to remove already reconciled items from the reconciliation plan. opw-4148669 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180903
Fixes two bugs on carry over amount: reset accrual carryover to lost state: steps: - set the carry over to "carry over with maximum" - set a number of days to carry over and save - set the carry over type back to "None" -> You still carry over the amount of days you typed in instead of 0 always carryover the cap: steps: - create an accrual plan with: - 21 days per year alloc - start immediate - 28 days cap - carryover with max 7 days - create
Original PR description
Fixes two bugs on carry over amount:
reset accrual carryover to lost state:
steps:
- set the carry over to "carry over with maximum"
- set a number of days to carry over and save
- set the carry over type back to "None"
-> You still carry over the amount of days you typed in instead of 0
always carryover the cap:
steps:
- create an accrual plan with:
- 21 days per year alloc
- start immediate
- 28 days cap
- carryover with max 7 days
- create allocation for the current year (1/1/XXXX)
- take 15 days holidays -> 6 days left on the alloc
- check the leaves left for next year -> 28 days, should be 27 (21 + 6)
This happened because the carry-over calculation didn't take into account
the number of days left on the allocation and always carried over the cap.
Forward-Port-Of: odoo/odoo#188621Versions -------- - 17.0+ Steps ----- 1. Edit a product page in eCommerce; 2. enable "Buy Now" button; 3. disable "Select Quantity". Issue ----- The "Buy Now" button becomes comically large. Cause ----- In 16.0, this specific configuration also enlarged the "Add to Cart" button, so a conditional was added to keep the "Buy Now" button the same size. With the UI changes in 16.3+, the cart button no longer changes size, but doing the same for the "Buy Now" button was overlooke
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Edit a product page in eCommerce; 2. enable "Buy Now" button; 3. disable "Select Quantity". Issue ----- The "Buy Now" button becomes comically large. Cause ----- In 16.0, this specific configuration also enlarged the "Add to Cart" button, so a conditional was added to keep the "Buy Now" button the same size. With the UI changes in 16.3+, the cart button no longer changes size, but doing the same for the "Buy Now" button was overlooked. Solution -------- No longer change the button size on `not hasQuantities or not hasBuyNow` opw-4404060 Forward-Port-Of: odoo/odoo#190635
This is a regression since 48ef812a. Before, the field's views were rendered directly, getting all the decoration classes on them. Since 48ef812a, they are rendered as a child of a parent `Field` component (a `div`), which gets the decoration classes instead [^1]. The issue was partially fixed by 2f99f7dc, but only for `<input/>` and `<textarea/>` elements. The same fix is now applied to the `<select/>` element. [^1]: https://github.com/odoo/odoo/blob/60c7b65f/addons/web/static/src/
Original PR description
This is a regression since 48ef812a. Before, the field's views were rendered directly, getting all the decoration classes on them. Since 48ef812a, they are rendered as a child of a parent `Field` component (a `div`), which gets the decoration classes instead [^1]. The issue was partially fixed by 2f99f7dc, but only for `<input/>` and `<textarea/>` elements. The same fix is now applied to the `<select/>` element. [^1]: https://github.com/odoo/odoo/blob/60c7b65f/addons/web/static/src/views/fields/field.xml#L4-L8 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190763
As creating/obtaining a registry does not set the `dbname` context variable on the current thread, it must be set manually for the standalone tests to run correctly. Forward-Port-Of: odoo/odoo#190330
Original PR description
As creating/obtaining a registry does not set the `dbname` context variable on the current thread, it must be set manually for the standalone tests to run correctly. Forward-Port-Of: odoo/odoo#190330
Any computed fields that depend on `customer_rank` or `supplier_rank` were not being recomputed when the ranks changed. This isn't noticeable on standard Odoo code, but downstream modules that use such feature wouldn't work. @moduon MT-8208 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189127
Original PR description
Any computed fields that depend on `customer_rank` or `supplier_rank` were not being recomputed when the ranks changed. This isn't noticeable on standard Odoo code, but downstream modules that use such feature wouldn't work. @moduon MT-8208 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189127
Improve loop detection and break. Indeed heavy usage of mailgateway on Odoo servers lead us to face email loops. Those lead to email being disabled on our servers due to email limit, and to other issues (spam, never ending notifications, ...) on hosted servers. Three scenarios are fixed with this PR. See individual commits for more details. Those are * having followers using alias email, and using a mail provider that rewrites msg-id: we cannot detect message duplication and this ma
Original PR description
Improve loop detection and break. Indeed heavy usage of mailgateway on Odoo servers lead us to face email loops. Those lead to email being disabled on our servers due to email limit, and to other…
Improve loop detection and break. Indeed heavy usage of mailgateway on Odoo servers lead us to face email loops. Those lead to email being disabled on our servers due to email limit, and to other issues (spam, never ending notifications, ...) on hosted servers. Three scenarios are fixed with this PR. See individual commits for more details. Those are * having followers using alias email, and using a mail provider that rewrites msg-id: we cannot detect message duplication and this may generate loops. Several mail providers rewrite message IDs and that is a pain for us. We therefore add a custom header allowing to keep message ID in envelope; * replying to bounce may create bounce in loops: this is fixed using the loop detection custom reference; * detect loops on record update in addition to record creation: do not limit loops detection on aliases creating records, also check updated records; Task-3895869 OPW-4051539 OPW-4295745 OPW-4302257 Forward-Port-Of: odoo/odoo#190744 Forward-Port-Of: odoo/odoo#187696
Steps to reproduce: - define your language as French/BE - create a bill (facture fournisseur) - edit the vat with '20.13' using the numpad decimal key Issue: the amount is '2013.00' Cause: numpad decimal in belgian layout is a comma `,` which in this is interpreted as a thousands separator. Solution: Use the `useNumpadDecimal` hook opw-4284370 Forward-Port-Of: odoo/odoo#190482 Forward-Port-Of: odoo/odoo#189582
Original PR description
Steps to reproduce: - define your language as French/BE - create a bill (facture fournisseur) - edit the vat with '20.13' using the numpad decimal key Issue: the amount is '2013.00' Cause: numpad decimal in belgian layout is a comma `,` which in this is interpreted as a thousands separator. Solution: Use the `useNumpadDecimal` hook opw-4284370 Forward-Port-Of: odoo/odoo#190482 Forward-Port-Of: odoo/odoo#189582
Since commits [1] and [2], the gradient background colors for headers in the mobile version were not applied. This commit resolves the issue. Steps to reproduce: - Open the Website Editor. - Click on the header. - Change the background color of the header and select a custom gradient. - Exit edit mode. - Click on the mobile icon to view the mobile version. - Click the hamburger icon. - Observe that the gradient background is not applied. opw-4329423 [1]: https://github.com/odoo
Original PR description
Since commits [1] and [2], the gradient background colors for headers in the mobile version were not applied. This commit resolves the issue. Steps to reproduce: - Open the Website Editor. - Click on the header. - Change the background color of the header and select a custom gradient. - Exit edit mode. - Click on the mobile icon to view the mobile version. - Click the hamburger icon. - Observe that the gradient background is not applied. opw-4329423 [1]: https://github.com/odoo/odoo/commit/2dc3b28e570492b0484d185eb656e74df9c59d68 [2]: https://github.com/odoo/odoo/commit/bc13176de8d66bbdc1c536017b1f046c5fd31a86 Forward-Port-Of: odoo/odoo#190200
When the user tries to reset the password, a traceback will appear. Steps to reproduce the error: - Install ``auth_signup`` - Configure "Outgoing mail server" - Now Log out - Click on Sign in > Reset Password > Enter your email > Click on ``Reset Password`` twice Traceback: ``` InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block File "odoo/http.py", line 2365, in __call__ response = request._serve_db() File "odoo/htt
Original PR description
When the user tries to reset the password, a traceback will appear. Steps to reproduce the error: - Install ``auth_signup`` - Configure "Outgoing mail server" - Now Log out - Click on Sign in > Reset…
When the user tries to reset the password, a traceback will appear.
Steps to reproduce the error:
- Install ``auth_signup``
- Configure "Outgoing mail server"
- Now Log out
- Click on Sign in > Reset Password > Enter your email >
Click on ``Reset Password`` twice
Traceback:
```
InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
File "odoo/http.py", line 2365, in __call__
response = request._serve_db()
File "odoo/http.py", line 1892, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1955, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1922, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2082, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 331, in _dispatch
result.flatten()
File "odoo/http.py", line 1389, in flatten
self.response.append(self.render())
File "odoo/http.py", line 1381, in render
return request.env["ir.ui.view"]._render_template(self.template, self.qcontext)
File "home/odoo/src/enterprise/18.0/web_studio/models/ir_ui_view.py", line 1315, in _render_template
return super(View, self)._render_template(template, values)
File "odoo/addons/base/models/ir_ui_view.py", line 2185, in _render_template
return self.env['ir.qweb']._render(template, values)
File "odoo/tools/profiler.py", line 306, in _tracked_method_render
return method_render(self, template, values, **options)
File "odoo/addons/base/models/ir_qweb.py", line 597, in _render
template_functions, def_name = irQweb._compile(template)
File "odoo/tools/profiler.py", line 314, in _tracked_compile
return method_compile(self, template)
File "odoo/addons/base/models/ir_qweb.py", line 666, in _compile
return self._load_values(base_key_cache, generate_functions)
File "odoo/addons/base/models/ir_qweb.py", line 2524, in _load_values
return get_value()
File "odoo/addons/base/models/ir_qweb.py", line 635, in generate_functions
code, options, def_name = self._generate_code(template)
File "odoo/addons/base/models/ir_qweb.py", line 691, in _generate_code
element, document, ref = self._get_template(template)
File "odoo/addons/base/models/ir_qweb.py", line 822, in _get_template
doc_or_elem, ref = self._load(ref_alias) or (None, None)
File "odoo/addons/base/models/ir_qweb.py", line 859, in _load
view = IrUIView._get(ref)
File "odoo/addons/base/models/ir_ui_view.py", line 2085, in _get
return self.browse(self._get_view_id(view_ref))
File "odoo/addons/base/models/ir_ui_view.py", line 2073, in _get_view_id
view = self.sudo().search([('key', '=', template)], limit=1)
File "odoo/models.py", line 1717, in search
return self.search_fetch(domain, [], offset=offset, limit=limit, order=order)
File "odoo/models.py", line 1749, in search_fetch
return self._fetch_query(query, fields_to_fetch)
File "odoo/models.py", line 4180, in _fetch_query
fetched = self.browse(query)
File "odoo/models.py", line 6154, in browse
if not ids:
File "odoo/tools/query.py", line 261, in __bool__
return bool(self.get_result_ids())
File "odoo/tools/query.py", line 225, in get_result_ids
self._ids = tuple(id_ for id_, in self._env.execute_query(self.select()))
File "odoo/api.py", line 962, in execute_query
self.cr.execute(query)
File "odoo/sql_db.py", line 354, in execute
res = self._obj.execute(query, params)
```
After this commit, user can not click on ``Reset Password`` button multiple times.
sentry-5661309399
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#184862revert the commit as when we fetch archived warehouse's pos type it will raise error for other source or destination loction for newly created stock operation type like even functinally also there is no need to fetch archived warehouse's operation type. ``` quality Control cross Dock, Storage type ``` we got this error during upgrade : ``` File "/home/odoo/src/odoo/saas-17.4/odoo/sql_db.py", line 347, in execute res = self._obj.execute(query, params) psycopg2.errors.NotNullVi
Original PR description
revert the commit as when we fetch archived warehouse's pos type it will raise error for other source or destination loction for newly created stock operation type like even functinally also there is…
revert the commit
as when we fetch archived warehouse's pos type
it will raise error for other source or destination loction for newly created stock operation type like
even functinally also there is no need to fetch
archived warehouse's operation type.
```
quality Control
cross Dock,
Storage type
```
we got this error during upgrade :
```
File "/home/odoo/src/odoo/saas-17.4/odoo/sql_db.py", line 347, in execute
res = self._obj.execute(query, params)
psycopg2.errors.NotNullViolation: null value in column "default_location_src_id" of relation "stock_picking_type" violates not-null constraint
DETAIL: Failing row contains (33, 0, 28, 56, null, null, null, 4, null, null, 1, 1, 1, QC, internal, at_confirm, FBAQC, ask, {"en_US": "Quality Control"}, null, f, f, t, null, f, null, 2024-10-16 05:14:53.18448, 2024-10-16 05:14:53.18448, optional, optional, no, optional, null, null, t, null, null, 2x7xprice, 4x12_lots, pdf, null, null, null, null, null, null, null, null, null, t, null).
```
due to this two fix:
https://github.com/odoo/odoo/pull/151719/commits
https://github.com/odoo/odoo/pull/175838/files
so we need to avoid to fetch archived warehouse's picking type.
ref:
odoo/upgrade#6631
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#185244Have a list or kanban views with more than 10k records such that the count limit is reached, and the pager displays something like "1-80/10000+". Click on "10000+" to compute the real count. Before this commit, the context wasn't given to that call, which could obviously return a wrong result, for instance if the context has the "active_test" key set to false. task~4331708 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is mer
Original PR description
Have a list or kanban views with more than 10k records such that the count limit is reached, and the pager displays something like "1-80/10000+". Click on "10000+" to compute the real count. Before this commit, the context wasn't given to that call, which could obviously return a wrong result, for instance if the context has the "active_test" key set to false. task~4331708 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#190721
Steps to reproduce: [l10n_be_us_consolidation_demo] - go to consolidation > Test Chart > Consolidated Balance > Comparison > Test Chart - click on a cell to proceed to an audit Issue: Stacktrace Cause: Journal id is not defined. When there are multiple periods we use the `ComparisonBuilder` https://github.com/odoo/enterprise/blob/4367042c8c7f2190d23019e591c332045b7d4993/account_consolidation/report/trial_balance.py#L139 Which, contrarily to the DefautBuilder, journals is not define
Original PR description
Steps to reproduce: [l10n_be_us_consolidation_demo] - go to consolidation > Test Chart > Consolidated Balance > Comparison > Test Chart - click on a cell to proceed to an audit Issue: Stacktrace…
Steps to reproduce: [l10n_be_us_consolidation_demo] - go to consolidation > Test Chart > Consolidated Balance > Comparison > Test Chart - click on a cell to proceed to an audit Issue: Stacktrace Cause: Journal id is not defined. When there are multiple periods we use the `ComparisonBuilder` https://github.com/odoo/enterprise/blob/4367042c8c7f2190d23019e591c332045b7d4993/account_consolidation/report/trial_balance.py#L139 Which, contrarily to the DefautBuilder, journals is not defined. In the AbstractBuilder (inherited in the two builders), `auditable` is set to True without consideration of the builder's definition https://github.com/odoo/enterprise/blob/3e5ac3554f4fded90fd37c56c7c60723aec59404/account_consolidation/report/builder/abstract.py#L278 On the front side, whenver we click on a auditable cell, we call the action_open_audit but journal_id is defined https://github.com/odoo/enterprise/blob/2d774344109c2f9b55d9ea6160ae99aeca4f0420/account_consolidation/static/src/components/consolidation_report/line_cell/line_cell.js#L19-L38 -> error Solution: Asusming that `auditable` is the rule and the case for the comparison builder is the exception, auditable is set to False only in the ComparisonBuilder Since `consolidation` is meant to be decommissioned, the least impacting fix is being applied. Note: in 16.0, the cells are not auditable when using comparison periods. opw-4265031 Forward-Port-Of: odoo/enterprise#74577
It's not useful to keep the ZIP label in the calendar popover of tasks if there is no value to show. task-4221324 version-17.2 Forward-Port-Of: odoo/enterprise#73482
Original PR description
It's not useful to keep the ZIP label in the calendar popover of tasks if there is no value to show. task-4221324 version-17.2 Forward-Port-Of: odoo/enterprise#73482
**Issue:** In dark mode, for current day, half days off are displayed with white background in the Field Service Gantt View for the working part.  **Expected:** In dark mode, worked half days should have same background as entire worked day for current date. **Steps to reproduce:** - Activate Time Off and Field Service apps and activate Dark Mode; - In `Time Off / Management / Time Off` create a n
Original PR description
**Issue:** In dark mode, for current day, half days off are displayed with white background in the Field Service Gantt View for the working part.…
**Issue:** In dark mode, for current day, half days off are displayed with white background in the Field Service Gantt View for the working part.  **Expected:** In dark mode, worked half days should have same background as entire worked day for current date. **Steps to reproduce:** - Activate Time Off and Field Service apps and activate Dark Mode; - In `Time Off / Management / Time Off` create a new half day off time for any employee under contract (e.g. Mitchell Admin) for the current day; - Approve and validate; - Move to `Field Service / Planning / By User`; - Remove all search filters and display using Gantt View by week or by month; - *(opt) Create a new task for the chose user if does not appear*; - Look at the current day cell of the user. **Cause:** No dark theme background color is set to override the light theme. **Fix:** Setup background color for dark theme by overriding hard coded light theme color: https://github.com/odoo/enterprise/blob/7778a8e45502da89e27910efab401d3556d8c7f7/web_gantt/static/src/gantt_view.scss#L21   opw-4368966 Forward-Port-Of: odoo/enterprise#75651
This fix is to avoid the an error that occurs when a country does not have the VAT information set. Before this fix, when that situation happened the method get_vat_country returned False as those fields values and therefore the XML could not be processed since it was expected an integer and it got a boolean. After this fix, if a country does not have VAT information, the field will be process as 0 and the XML will be created, so the invoice will be confirmed. We already had this approach in t
Original PR description
This fix is to avoid the an error that occurs when a country does not have the VAT information set. Before this fix, when that situation happened the method get_vat_country returned False as those…
This fix is to avoid the an error that occurs when a country does not have the VAT information set. Before this fix, when that situation happened the method get_vat_country returned False as those fields values and therefore the XML could not be processed since it was expected an integer and it got a boolean. After this fix, if a country does not have VAT information, the field will be process as 0 and the XML will be created, so the invoice will be confirmed. We already had this approach in the past, inside the method wsfex_get_cae_request, but it was lost in a refactor made on the module. So what I did was just to recover that approach. https://github.com/odoo/enterprise/commit/33ea78a5bb34e657c16bcbb704eeb71897ae642d#diff-2459e118c605cf039bb94c62561285ad753b6a27c571f10a25547ee9b01aa318L741. Steps to reproduce the error: - Create a test contact based on Uruguay. - Go to Contacts/Configuration/Localization/Countries and delete all VAT information from Uruguay (Natural Person VAT, Legal Entity VAT, Other VAT) . - Create an invoice for the test client created before, add a product and all needed fields and try to confirm the invoice. - An error will pop up, saying that the server was unable to read request because of an error in the XML document. Forward-Port-Of: odoo/enterprise#75501