Wednesday, April 10, 2024
36 changes · saas-17.1
Resolved issues and error corrections
In commit 9b6e1b992923872d45e5edc1857966932f33b9fa Russian translations were bootstrapped using an automated tool. This commit fixes an instance of `and` keyword wrongly translated to `и`, that caused errors during the automatic validation of paid invoices in Russian language: ``` File "addons/sale/models/payment_transaction.py", line 116, in _reconcile_after_done confirmed_orders._send_order_confirmation_mail() ```
Original PR description
In commit 9b6e1b992923872d45e5edc1857966932f33b9fa Russian translations were bootstrapped using an automated tool. This commit fixes an instance of `and` keyword wrongly translated to `и`, that caused errors during the automatic validation of paid invoices in Russian language: ``` File "addons/sale/models/payment_transaction.py", line 116, in _reconcile_after_done confirmed_orders._send_order_confirmation_mail() ```
After copying previous shifts and then using automatic planning, the highlighted results will now remain visible instead of disappearing. This helps planners clearly see which shifts were created or changed by their latest action, reducing confusion during scheduling.
Original PR description
Before this commit, when the user clicks on `Copy Previous` in the gantt view of `planning.slot`, a filter will be added to highlight the shifts added by the action executed. However, if the user clicks on `Auto Plan` to plan the open shifts automatically, the filter is disappeared and no shifts are highlighted as before. The reason is because we toggle the filter without checking if that filter is already there in the search view. This commit checks if the filter is already there before toggle it. If yes, then we notify the model instead of toggling the facet in the search view. runbot-55489 runbot-58209 runbot-56675 runbot-58149
Miscellaneous changes
This module was introduced in saas-16.4. In that version the sale order report and portal template displayed both price_subtotal and price_total for each sale order line. 655d375af83dd49bbbd5f5818e319c3b0e9778c1 removed price_total. Because this module removes price_subtotal we end up with no line total at all on the default Brazilian quotation PDF and portal view (just 3 columns: description, quantity and unit price). Loosely inspired by l10n_cl [1], this commit changes our approach to t
Original PR description
This module was introduced in saas-16.4. In that version the sale order report and portal template displayed both price_subtotal and price_total for each sale order line. 655d375af83dd49bbbd5f5818e319c3b0e9778c1 removed price_total. Because this module removes price_subtotal we end up with no line total at all on the default Brazilian quotation PDF and portal view (just 3 columns: description, quantity and unit price). Loosely inspired by l10n_cl [1], this commit changes our approach to turn the two places where we use price_subtotal into price_total. The aforementioned commit also changed the heading of this column from "Subtotal" to a more generic "Amount", so there's no inconsistency there. Although this is a bit of a mess, I can't think of a better solution. [1] https://github.com/odoo/odoo/blob/655d375af83dd49bbbd5f5818e319c3b0e9778c1/addons/l10n_cl/views/report_invoice.xml#L173-L175 Forward-Port-Of: odoo/odoo#159794
Description of the issue/feature this PR addresses: In odoo V17 if a user is creating a holiday request for a time of type that requires no validation, the confirm button is visible during the creation process due to this line https://github.com/odoo/odoo/blob/2876b8300d1f9a740deb0faa02399df2426df402/addons/hr_holidays/views/hr_leave_views.xml#L248 in prior versions this was not the case https://github.com/odoo/odoo/blob/391a427620b6aec690481fe7c7d0b0326b95ee8c/addons/hr_holidays/views/hr
Original PR description
Description of the issue/feature this PR addresses: In odoo V17 if a user is creating a holiday request for a time of type that requires no validation, the confirm button is visible during the…
Description of the issue/feature this PR addresses: In odoo V17 if a user is creating a holiday request for a time of type that requires no validation, the confirm button is visible during the creation process due to this line https://github.com/odoo/odoo/blob/2876b8300d1f9a740deb0faa02399df2426df402/addons/hr_holidays/views/hr_leave_views.xml#L248 in prior versions this was not the case https://github.com/odoo/odoo/blob/391a427620b6aec690481fe7c7d0b0326b95ee8c/addons/hr_holidays/views/hr_leave_views.xml#L238 So due to this change in Odoo V17 the confirm button is visible to the user while creating (before saving) so if the user clicks on the confirm button the behavior is it will save the record then set its state to confirm then will call action validate (all in the create function) after the execution of the create is finished it will call `action_confirm` which in turn will raise the user error. I added a check in the action confirm function to check if the time off requires no validation. alternatively I can revert the changes and add the `id == False` in the condition for the `action_confirm` button action. Current behavior before PR: A user error message is raised if the user clicks on the confirm button. see issue #160831 Desired behavior after PR is merged: No user error message that happens if the user clicks on the confirm button. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160839
Odoo implements its own lazy-loading mechanism for the biggest JS bundles that are loaded on the frontend. This mechanism allows the page to appear to the user very fast, at the downside of having some interactive elements (such as buttons) have no effect during the lazy loading. In general, this is not a problem since: - Standard links and buttons work, only those with custom effects (a modal, a custom JS behavior, etc) have no effect. - The full loading should not take long anyway. -
Original PR description
Odoo implements its own lazy-loading mechanism for the biggest JS bundles that are loaded on the frontend. This mechanism allows the page to appear to the user very fast, at the downside of having…
Odoo implements its own lazy-loading mechanism for the biggest JS bundles that are loaded on the frontend. This mechanism allows the page to appear to the user very fast, at the downside of having some interactive elements (such as buttons) have no effect during the lazy loading. In general, this is not a problem since: - Standard links and buttons work, only those with custom effects (a modal, a custom JS behavior, etc) have no effect. - The full loading should not take long anyway. - After the pages have been visited, everything should be in cache. However, in some cases (countries with poor internet connections), the experience can be confusing. Without lazy loading, they would have a page that appears as a blank white page for a few seconds. With our custom lazy loading, they get the website very fast... but some buttons appear buggy (no effect) for a few seconds. The long term plan is to review our lazy loading: - Should it be less delayed than it currently is? (at the time, this was the minimum delay that made Google give us good page scoring but it may not be as impacting as before) - Should some of the lazy-loaded JS should actually not be? - Should the assets be split differently? - Could we be able to remove some code that weighs too much? - ...? Meanwhile, this commit improves the behavior this way: during lazy loading, any click on a button is now ignored but a loading effect is displayed. Once the JS is fully loaded, the click is then re-played on the previously clicked button, hopefully triggering its effect. In any case, this cannot be worse than what we have before... except for: - **The reasonable risk we take merging this in stable (we considered merging in a more recent version but it is needed for some specific projects and many websites would benefit from this improvement).** - Any custom code that added behavior on buttons to be available during lazy loading... will just wait for lazy loading with a loading effect too now. This should be a good compromise as, again, that lazy loading is cached and should not take too long anyway. Note that this replaces the previous o_wait_lazy_js class behavior (it has now no effect). Overall: - This should not impact (neither improve nor worsen) most websites that are currently experienced from good internet connections. - This should be a big improvement for most websites that are currently experienced from bad internet connections. Related to task-3770362 Forward-Port-Of: odoo/odoo#159680 Forward-Port-Of: odoo/odoo#158661
### Steps to reproduce: - Go to Recruitment > Applications > All Applications - Create a new application and add Marc Demo as an interviewer - Change the recruitement access rights of Marc Demo to "Interviewer" - Log in as Marc Demo and got to the application ### Expected behavior: As said in the description of the "Interviewer" access rights: "Interviewer right will give access to all job position/applications where the employee is defined. It will allow to refuse, plan meetings. *
Original PR description
### Steps to reproduce: - Go to Recruitment > Applications > All Applications - Create a new application and add Marc Demo as an interviewer - Change the recruitement access rights of Marc Demo to "Interviewer" - Log in as Marc Demo and got to the application ### Expected behavior: As said in the description of the "Interviewer" access rights: "Interviewer right will give access to all job position/applications where the employee is defined. It will allow to refuse, plan meetings. **Chatter content will not be available.**" ### Current Behavior: You have access to the chatter. ### Note: This access right did not exist before saas-16.4 opw-3783965 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159470
Steps: - Install sales app. - Go to settings of sales. - See header field there is no download button. Issue: - Binary field should have download button and user should be able to download file with out issue. Cause: - Since Settings is abstract model so it does not contains id field in it and download button visibility depends on id field. Fix: - - Extend binary field for setting view to get proper file from related field where actual file is stored. task-3620555 Forward-Por
Original PR description
Steps: - Install sales app. - Go to settings of sales. - See header field there is no download button. Issue: - Binary field should have download button and user should be able to download file with out issue. Cause: - Since Settings is abstract model so it does not contains id field in it and download button visibility depends on id field. Fix: - - Extend binary field for setting view to get proper file from related field where actual file is stored. task-3620555 Forward-Port-Of: odoo/odoo#160070
**Description of the issue/feature this PR addresses:** Before this commit the time to unlink an account.move can take lot of time. The time to unreconcile can take lot of time. With 1 million `account.partial.reconcile`: Time to remove 1 `account.full.reconcile` : before 329 ms after 5 ms. Index size of `account.partial.reconcile` : before 59 Mo after 68 Mo (data size : 112 Mo) (+ 9 Mo) Before:  (+ 9 Mo) Before:   After:   @oco-odoo --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160709 Forward-Port-Of: odoo/odoo#141307
The tour mentioned the "Shop" menu item since [1]. This is obviously a mistake: the tour should work when only the website app is installed. [1]: https://github.com/odoo/odoo/commit/a4b1c268131ed771dd68616a26a9f1ce50a189f0 runbot-60696 Forward-Port-Of: odoo/odoo#161073
Original PR description
The tour mentioned the "Shop" menu item since [1]. This is obviously a mistake: the tour should work when only the website app is installed. [1]: https://github.com/odoo/odoo/commit/a4b1c268131ed771dd68616a26a9f1ce50a189f0 runbot-60696 Forward-Port-Of: odoo/odoo#161073
Outlook and similar Windows based systems use windows-874 for encoding Thai characters which is not natively known by Python. Simply aliasing the Windows encoding as cp874 adds support for this encoding. opw-3684161 X-original-commit: b991b28aad38b688a45371ffd6df8b08a03d0957 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/sub
Original PR description
Outlook and similar Windows based systems use windows-874 for encoding Thai characters which is not natively known by Python. Simply aliasing the Windows encoding as cp874 adds support for this encoding. opw-3684161 X-original-commit: b991b28aad38b688a45371ffd6df8b08a03d0957 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#160575
**Current Status** - when remove attachment or message, The system will perform deletion on the interface before performing deletion in the DB. However, in some situations, exceptions will occur during the deletion process. So it will happen that the attachment or message has been deleted on the interface but still exists under the database. From a function that helps optimize user experience, it will cause a worse situation with user experience **Solution** - Make rpc calls before deleti
Original PR description
**Current Status** - when remove attachment or message, The system will perform deletion on the interface before performing deletion in the DB. However, in some situations, exceptions will occur during the deletion process. So it will happen that the attachment or message has been deleted on the interface but still exists under the database. From a function that helps optimize user experience, it will cause a worse situation with user experience **Solution** - Make rpc calls before deleting messages or attachments on the interface 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#161023
Steps to reproduce: - Install Accounting, l10n_it_edi and Contacts - Switch to an Italian company (e.g. IT Company) - Go to Contacts and create a contact from San Marino: * Name: SM customer * Country: San Marino * Street, City, ZIP: [any] * Destination Code: [any] - Create an invoice: * Customer: [the created contact from San Marino] * Product: [any] - Confirm the invoice - Generate E-invoice XML via "Send & Print" button Issue: In the XML, the destination code (i.e.
Original PR description
Steps to reproduce: - Install Accounting, l10n_it_edi and Contacts - Switch to an Italian company (e.g. IT Company) - Go to Contacts and create a contact from San Marino: * Name: SM customer *…
Steps to reproduce: - Install Accounting, l10n_it_edi and Contacts - Switch to an Italian company (e.g. IT Company) - Go to Contacts and create a contact from San Marino: * Name: SM customer * Country: San Marino * Street, City, ZIP: [any] * Destination Code: [any] - Create an invoice: * Customer: [the created contact from San Marino] * Product: [any] - Confirm the invoice - Generate E-invoice XML via "Send & Print" button Issue: In the XML, the destination code (i.e. CodiceDestinatario) is the default one for non-Italian customer (i.e. XXXXXXX). Also, the VAT number (i.e. IdFiscaleIVA) is the default value for countries that are not in the European Union (i.e. OO99999999999). However, since October 2021, San Marino should be handled differently for Italian electronic invoices. A specific destination code (i.e. 2R4GTO8) should be used for all customers from San Marino. Source: https://www.credemtel.it/fattura-elettronica/fattura-elettronica-san-marino/ Solution: For customers from San Marino: - Keep VAT number - Set "2R4GTO8" as destination code opw-3819054 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160494
due to the absence of IR model data entries for certain account taxes, but with identical tax names, tax types, and scopes, attempts to create standard taxes with the same names alongside IR model data result in a constraint violation, specifically, "tax name must be unique." To address this constraint, we append "old" to the tax name for existing taxes lacking IR model data entries. see: https://github.com/odoo/odoo/blob/740fb9ac8c8e121820feeac0e1f25a304e47da9d/addons/account/models/account
Original PR description
due to the absence of IR model data entries for certain account taxes, but with identical tax names, tax types, and scopes, attempts to create standard taxes with the same names alongside IR model…
due to the absence of IR model data entries for certain account taxes, but with identical tax names, tax types, and scopes, attempts to create standard taxes with the same names alongside IR model data result in a constraint violation, specifically, "tax name must be unique." To address this constraint, we append "old" to the tax name for existing taxes lacking IR model data entries.
see:
https://github.com/odoo/odoo/blob/740fb9ac8c8e121820feeac0e1f25a304e47da9d/addons/account/models/account_tax.py#L202
```
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 4864, in _create
records._validate_fields(name for data in data_list for name in data['stored'])
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 1456, in _validate_fields
check(self)
File "/home/odoo/src/odoo/17.0/addons/account/models/account_tax.py", line 201, in _constrains_name
raise ValidationError(
odoo.exceptions.ValidationError: Tax names must be unique!
```
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#161054When creating a product document, it was still possible to save something that wasn't a pdf. The check only happened when modifying it. opw-3802795 Forward-Port-Of: odoo/odoo#160879
Original PR description
When creating a product document, it was still possible to save something that wasn't a pdf. The check only happened when modifying it. opw-3802795 Forward-Port-Of: odoo/odoo#160879
Steps to reproduce: - Add the same tag to 13 different blog posts. - On the "Blog" page, click on this tag to filter the blogs. -> Problem: the result displays "12 Articles" but they are actually 13. In this case, the result displays "12 Articles" as they are 12 articles on the current page. When going on the second page of the results, "1 Article" is displayed. This problem is solved by displaying the total number of articles found after the filtering operation rather than the number of
Original PR description
Steps to reproduce: - Add the same tag to 13 different blog posts. - On the "Blog" page, click on this tag to filter the blogs. -> Problem: the result displays "12 Articles" but they are actually 13. In this case, the result displays "12 Articles" as they are 12 articles on the current page. When going on the second page of the results, "1 Article" is displayed. This problem is solved by displaying the total number of articles found after the filtering operation rather than the number of articles on the page. opw-3802729 Screenshots of the problem:   Forward-Port-Of: odoo/odoo#160997 Forward-Port-Of: odoo/odoo#160654
Before this commit, when the user created a new quotation from Contact->Opportunity-> ("New Quotation" or "Quotations/orders widget button", archived records could be added to the quotation (e.g. ,product, taxes...) because the context was set to active_test = false. After this commit, the context is configured back to active_test = true when creating a quotation from opportunity. opw-3802796 Forward-Port-Of: odoo/odoo#160792 Forward-Port-Of: odoo/odoo#159335
Original PR description
Before this commit, when the user created a new quotation from Contact->Opportunity-> ("New Quotation" or "Quotations/orders widget button", archived records could be added to the quotation (e.g. ,product, taxes...) because the context was set to active_test = false. After this commit, the context is configured back to active_test = true when creating a quotation from opportunity.
opw-3802796
Forward-Port-Of: odoo/odoo#160792
Forward-Port-Of: odoo/odoo#159335When user tries to empty start date or end date in website using editor, a traceback will appear. Steps to reproduce the error: - Install "website_event" - Go to Website > Events > Open any Event > Register > Edit - Now try to empty start date or end date > Save Traceback: ``` TypeError: '<' not supported between instances of 'bool' and 'datetime.datetime' File "odoo/http.py", line 2251, in __call__ response = request._serve_db() File "odoo/http.py", line 1826, in _serve_d
Original PR description
When user tries to empty start date or end date in website using editor, a traceback will appear. Steps to reproduce the error: - Install "website_event" - Go to Website > Events > Open any Event >…
When user tries to empty start date or end date in website using editor,
a traceback will appear.
Steps to reproduce the error:
- Install "website_event"
- Go to Website > Events > Open any Event > Register > Edit
- Now try to empty start date or end date > Save
Traceback:
```
TypeError: '<' not supported between instances of 'bool' and 'datetime.datetime'
File "odoo/http.py", line 2251, in __call__
response = request._serve_db()
File "odoo/http.py", line 1826, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1847, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1824, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1832, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2057, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 34, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 30, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/website/models/ir_ui_view.py", line 487, in save
super(View, self).save(value, xpath=xpath)
File "addons/web_editor/models/ir_ui_view.py", line 257, in save
self.save_embedded_field(arch_section)
File "addons/web_editor/models/ir_ui_view.py", line 56, in save_embedded_field
record.write({field: value})
File "addons/website_event/models/event_event.py", line 261, in write
res = super(Event, self).write(vals)
File "addons/event/models/event_event.py", line 590, in write
res = super(EventEvent, self).write(vals)
File "addons/mail/models/mail_thread.py", line 319, in write
result = super(MailThread, self).write(values)
File "addons/mail/models/mail_activity_mixin.py", line 248, in write
return super(MailActivityMixin, self).write(vals)
File "addons/website/models/mixins.py", line 217, in write
return super(WebsitePublishedMixin, self).write(values)
File "addons/website/models/mixins.py", line 136, in write
return super().write(vals)
File "odoo/models.py", line 4536, in write
real_recs._validate_fields(vals, inverse_fields)
File "odoo/models.py", line 1483, in _validate_fields
check(self)
File "addons/event/models/event_event.py", line 570, in _check_closing_date
if event.date_end < event.date_begin:
```
https://github.com/odoo/odoo/blob/4759c6d1ee09c32381dc56c59c95949fd0e2807c/addons/event/models/event_event.py#L507 Here, When user tries to empty start date or end date,
start date or end date will become "False",
So it will lead to the above traceback.
solution:
A try-catch is used to catch typeerror at write of qweb fields.
sentry-5038057541
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#160744
Forward-Port-Of: odoo/odoo#1567077bbec42 removes the 'pos_done' state without providing a substitute. A discrepancy arises between the states defined in pos.order and sale.report. While pos.order can have a 'done' state, this state is not defined in sale.report. Consequently, it is possible to encounter a situation where a state exists in 'sale.report' without being defined in its state field. This inconsistency leads to an error in the web client when attempting to display the state 'done' from 'pos.order', as the system ca
Original PR description
7bbec42 removes the 'pos_done' state without providing a substitute. A discrepancy arises between the states defined in pos.order and sale.report. While pos.order can have a 'done' state, this state…
7bbec42 removes the 'pos_done' state without providing a substitute. A discrepancy arises between the states defined in pos.order and sale.report.
While pos.order can have a 'done' state, this state is not defined in sale.report. Consequently, it is possible to encounter a situation where a state exists in 'sale.report' without being defined in its state field. This inconsistency leads to an error in the web client when attempting to display the state 'done' from 'pos.order', as the system cannot locate a corresponding label for it.
Since we can't add a new state in stable, we'll re-use the sale.order 'sale' state which is the sale.order counterpart of pos.order 'done'.
**steps to reproduce:**
- sales / reporting / sales and go to pivot view
- remove all filters
- on the pivot view, select 'product category'
- click on a cell corresponding to POS (ex: all/saleable/pos)
- click on a line in the list view
**before this commit:**
```
Caused by: TypeError: Cannot read properties of undefined (reading '1')
at get string (https://60795873-17-0-all.runbot129.odoo.com/web/assets/af70128/web.assets_web.min.js:8393:281)
at SelectionField.template (eval at compile (https://60795873-17-0-all.runbot129.odoo.com/web/assets/af70128/web.assets_web.min.js:1500:374), <anonymous>:15:21)
at Fiber._render (https://60795873-17-0-all.runbot129.odoo.com/web/assets/af70128/web.assets_web.min.js:940:96)
at Fiber.render (https://60795873-17-0-all.runbot129.odoo.com/web/assets/af70128/web.assets_web.min.js:939:6)
at ComponentNode.initiateRender (https://60795873-17-0-all.runbot129.odoo.com/web/assets/af70128/web.assets_web.min.js:1007:47)
```
**after this commit:**
the form view is rendered
opw-3816652
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#160432-Since [1] we have add t-key for some template, but some aren't necessary because they not load via Owl, therefore remove it to avoid warning : "Unknown directives or unused attributes" [1]: https://github.com/odoo/odoo/pull/130467/commits/a9b577dfcbd6c01abdc649a3ea61f80e9018832d#diff-0ba40f64ee7d28c08bdbb7273985adc0d2d2b63d8c3233aa2630e6ba4bde4df9 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I conf
Original PR description
-Since [1] we have add t-key for some template, but some aren't necessary because they not load via Owl, therefore remove it to avoid warning : "Unknown directives or unused attributes" [1]: https://github.com/odoo/odoo/pull/130467/commits/a9b577dfcbd6c01abdc649a3ea61f80e9018832d#diff-0ba40f64ee7d28c08bdbb7273985adc0d2d2b63d8c3233aa2630e6ba4bde4df9 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#160863
Steps to reproduce: ------------------- - create a time off accrual plan with: - cap accrued time equals to `True` - maximum leave equals to `0 days` - create an allocation with this accrual plan - run the scheduled action "Accrual Time Off: Updates the number of time off" (make sure you have the right "lastcall" and "nextcall") Issue: ------ The number of days of the allocation is set to zero. This scenario makes no sense from a business point of view. In effect, we are
Original PR description
Steps to reproduce:
-------------------
- create a time off accrual plan with:
- cap accrued time equals to `True`
- maximum leave equals to `0 days`
- create an allocation with this accrual plan
- run the scheduled action "Accrual Time Off: Updates the number of time off"
(make sure you have the right "lastcall" and "nextcall")
Issue:
------
The number of days of the allocation is set to zero. This scenario makes no sense from a business point of view. In effect, we are blocking the accumulation of allocations at zero. The result is that there will never be any days allocated to these allocations.
Solution:
---------
Add a constraint to force a maximum leave number when cap accrued time is set.
opw-3847408
Forward-Port-Of: odoo/odoo#160626Before this PR, the error displayed in the public page was quite cryptic. It was hard for the user to understand that error and even harder to report it if needed. This PR makes the error more user friendly. task-3850559 Forward-Port-Of: odoo/odoo#160947
Original PR description
Before this PR, the error displayed in the public page was quite cryptic. It was hard for the user to understand that error and even harder to report it if needed. This PR makes the error more user friendly. task-3850559 Forward-Port-Of: odoo/odoo#160947
**Steps to reproduce:** - Install mrp and purchase - Go to "Inventory / Configuration / Settings" - Activate "Storage Locations" - Go to "Inventory / Configuration / Warehouse Management / Operations Types" - Edit "Receipts" type by activating "Show Detailed Operations" - Go to "Manufactoring / Configuration / Settings" - Activate "Subcontracting" - Create product: (e.g. Product XYZ) * Product Type: Storable Product - Create a BoM for Product XYZ: * BoM Type: Subcontracting * S
Original PR description
**Steps to reproduce:** - Install mrp and purchase - Go to "Inventory / Configuration / Settings" - Activate "Storage Locations" - Go to "Inventory / Configuration / Warehouse Management / Operations…
**Steps to reproduce:**
- Install mrp and purchase
- Go to "Inventory / Configuration / Settings"
- Activate "Storage Locations"
- Go to "Inventory / Configuration / Warehouse Management / Operations Types"
- Edit "Receipts" type by activating "Show Detailed Operations"
- Go to "Manufactoring / Configuration / Settings"
- Activate "Subcontracting"
- Create product: (e.g. Product XYZ)
* Product Type: Storable Product
- Create a BoM for Product XYZ:
* BoM Type: Subcontracting
* Subcontractors: [any] (e.g. Azure Interior)
- Create a PO:
* Vendor: Azure Interior
* Products: 2 x Product XYZ
- Confirm the PO
- Open the picking from PO via the Receipt smart button
- In "Operations" tab, set done to 1
- On the picking form, change the destination location (e.g. WH/Stock/Shelf1)
- Save
- In "Detailed Operations" tab, a line should have appeared
- Select the same destination location on that line (i.e. WH/Stock/Shelf1)
- Validate the picking and create a backorder for the remaining quantity to produce
- Go to "Inventory / Reporting / Locations"
- Check the locations of Product XYZ (Search Product: XYZ - Group by: Location)
=> The "On Hand Quantity" for Product XYZ is as followed:
* Virtual Locations/Production: -1.00 (correct)
* WH/Stock/Shelf1: 1.00 (correct)
- Open the backorder picking from PO via the Receipt smart button
- Record the production of the remaining unit
- Validate the picking
- Go to "Inventory / Reporting / Locations"
- Check the locations of Product XYZ
**Issue:**
The "On Hand Quantity" for Product XYZ is as followed:
* Partners/Vendors: -1.00 (incorrect, it should be empty)
* Physical Locations/Subcontracting Location: 1.00 (incorrect, it should be 0.00)
* Virtual Locations/Production: -2.00 (correct)
* WH/Stock/Shelf1: 2.00 (correct)
**Cause:**
When the PO is confirmed, the stock picking and the stock move are created, they both have the same source and destination locations.
However, in an overridden method from "mrp_subcontracting" module, a check is performed on the move to determine if it is a subcontract.
If it is the case, its source location is set to the subcontractor location and so, the source location of the picking and the move is not the same anymore.
When the destination location is changed on the picking, an onchange is triggering an update of the destination location AND the source location of the move to the values coming from the picking, erasing the subcontractor location set on the move.
The issue only happens for the backorder, because the source location update is not propagated to the stock move lines.
In the case of the original picking, the move lines were already created with the subcontractor location as source location.
But when the backorder is created, the move lines are created with the values coming from a move without the subcontractor location.
**Solution:**
Do not propagate "location_id" from the picking to the subcontracting moves.
opw-3777379
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#161011
Forward-Port-Of: odoo/odoo#1584424755b82fa40df50362e72ccc3e08f6ce5383dde3 changed the portal template used for subscriptions by overriding `_get_name_portal_content_view()`. Because of this, the override in `l10n_br_sales` no longer applies and we end up with the standard subscription portal view instead of the customized one for Brazil. Although not very nice, the only way around it I could think of was to create this new module so we can override again with a new portal template that inherits from sale_subscription.subscr
Original PR description
4755b82fa40df50362e72ccc3e08f6ce5383dde3 changed the portal template used for subscriptions by overriding `_get_name_portal_content_view()`. Because of this, the override in `l10n_br_sales` no longer applies and we end up with the standard subscription portal view instead of the customized one for Brazil. Although not very nice, the only way around it I could think of was to create this new module so we can override again with a new portal template that inherits from sale_subscription.subscription_portal_content. Forward-Port-Of: odoo/enterprise#59703
Currently, when you print the journal report, the header doesn't contain any information about the date/period. Steps to reproduce * install `account_reports` * open and export the Journal Report to PDF The period/date does not appear in the header (or anywhere in the PDF) opw-3827366 Forward-Port-Of: odoo/enterprise#59624
Original PR description
Currently, when you print the journal report, the header doesn't contain any information about the date/period. Steps to reproduce * install `account_reports` * open and export the Journal Report to PDF The period/date does not appear in the header (or anywhere in the PDF) opw-3827366 Forward-Port-Of: odoo/enterprise#59624
### Steps to reproduce: - Create a vendor bill for a partner with a super long name. - Go to Accounting > Reporting > Partner reports > Aged Payable - Generate the pdf #### > If the partner's name is long enough the last columns will not appear ### Cause of the issue: Pdf are generated in Odoo using wkhtmltopdf. This one takes an html file renders it in Qtweb (shrinking its content to fit a single screen) and making a screenshot to generate a pdf. However, there is a limit to the s
Original PR description
### Steps to reproduce: - Create a vendor bill for a partner with a super long name. - Go to Accounting > Reporting > Partner reports > Aged Payable - Generate the pdf #### > If the partner's name is…
### Steps to reproduce: - Create a vendor bill for a partner with a super long name. - Go to Accounting > Reporting > Partner reports > Aged Payable - Generate the pdf #### > If the partner's name is long enough the last columns will not appear ### Cause of the issue: Pdf are generated in Odoo using wkhtmltopdf. This one takes an html file renders it in Qtweb (shrinking its content to fit a single screen) and making a screenshot to generate a pdf. However, there is a limit to the shrinking applied to the html body. Therefore, if the content is too wide part of it will not appear on the pdf (this can easily been observed using Qtweb (but not with chrome)). Between 16.4 and 17.0 there was a refactoring of the way account reports are handled in Odoo see commit 2d77434 and commit b8209e2. Because of this refactoring, there is currently no width limit for cells of the table used in the body of account reports. As such, if the content of the first column is too wide, every other column will be pushed out of the screen before the pdf is generated. This is exactly what happens here. ### Fix: We added a max width to cells and a wordbreak option on the css file used for the html in the pdf export of every account reports. This ensures that the content of any cell will not push the other cells outside of the screen before the screen shot. ### Second Issue: Even with this issue out of the way, it is still possible for the content of the aged partner balance reports to be too wide after the shrink of the hmtl if you use a currency whose symbol is too long. The reason is the same as before coupled with the fact that these reports contain too many columns displaying the currency symbol of the company. ### Second part of the fix: To fix this second issue, we use a custom css class for the export of the two problematic reports (aged payable and aged receivable) when the currency symbol is too wide. opw-3749625 --- Forward-Port-Of: odoo/enterprise#58528
before this commit: TaxId and email address of shipper and recipient was not showing on commercial invoice. After this commit: Added relevant fields in fedex request. TaxId needs TinType to be passed in request, default value set to 'BUSINESS_NATIONAL'. https://support.shiptheory.com/support/solutions/articles/24000077333-which-tin-type-should-i-use-for-my-fedex-shipments- opw-3748463 Forward-Port-Of: odoo/enterprise#59421
Original PR description
before this commit: TaxId and email address of shipper and recipient was not showing on commercial invoice. After this commit: Added relevant fields in fedex request. TaxId needs TinType to be passed in request, default value set to 'BUSINESS_NATIONAL'. https://support.shiptheory.com/support/solutions/articles/24000077333-which-tin-type-should-i-use-for-my-fedex-shipments- opw-3748463 Forward-Port-Of: odoo/enterprise#59421
Contains four improvements for HMRC flow: 1- Successfully connecting to HMRC now shows a notification to let the user know they can send their reports. 2- The "send" button in the send HMRC wizard triggers the sending but nothing happens UI wise. Now, the wizard is closed and a confirmation notification is shown. 3- For a user wanting to submit the VAT report for two companies, after switching clicking on the "send to HMRC" button raises an error as the token does not correspond to the corre
Original PR description
Contains four improvements for HMRC flow: 1- Successfully connecting to HMRC now shows a notification to let the user know they can send their reports. 2- The "send" button in the send HMRC wizard…
Contains four improvements for HMRC flow: 1- Successfully connecting to HMRC now shows a notification to let the user know they can send their reports. 2- The "send" button in the send HMRC wizard triggers the sending but nothing happens UI wise. Now, the wizard is closed and a confirmation notification is shown. 3- For a user wanting to submit the VAT report for two companies, after switching clicking on the "send to HMRC" button raises an error as the token does not correspond to the correct company. Before, the user had to manually remove their authentication credentials to allow for a new connection to get a new token. Now, if we get an error from HMRC that the agent isn't authorised to submit the report, we clear the credentials ourselves and redirect the user to the login page, so they could get the correct token. 4- Trying to send the report without selecting an obligation returns a traceback error. Now, the send button will not appear unless an obligation is selected. task-3696341 Forward-Port-Of: odoo/enterprise#55988
To reproduce the issue: 1. Switch to the `Activity` view for the Documents module. 2. Click `+ Schedule Activity`. 3. The dialog box opens up with the list of documents. 4. Try to DRAG & DROP any document list item. 5. We get a TRACEBACK. Issue: - The `onRecordClick` and the `onDragStart` events bound on the record rows are executed when we DRAG & DROP or click the records from the list of documents. - When the method(`onDragStart`) is called from inside the `Dialog` scope, the `
Original PR description
To reproduce the issue: 1. Switch to the `Activity` view for the Documents module. 2. Click `+ Schedule Activity`. 3. The dialog box opens up with the list of documents. 4. Try to DRAG & DROP any…
To reproduce the issue:
1. Switch to the `Activity` view for the Documents module.
2. Click `+ Schedule Activity`.
3. The dialog box opens up with the list of documents.
4. Try to DRAG & DROP any document list item.
5. We get a TRACEBACK.
Issue:
- The `onRecordClick` and the `onDragStart` events bound on the record rows are
executed when we DRAG & DROP or click the records from the list of documents.
- When the method(`onDragStart`) is called from inside the `Dialog` scope, the
`foldersById` in the line of code below returns a singleton object(`{false: {…}}`)
with `false` being the folder_id of the `All` workspace.
- However, when the same method is called from the list/kanban view
(i.e. outside of the `Dialog` scope) then the `foldersById` would return an
object with all of the folderIds present as keys.
- In our case `foldersById[record.data.folder_id[0]].has_write_access` throws a
traceback because the value of every `record.data.folder_id[0]` is a `Number`
(as no document can be present inside the `All` workspace), but the
`foldersById` object only contains the `false` key.
Fix:
- The schedule activity dialog box renders the JS of the list view of the related module. In our case, it renders the base list view from the documents and renders the JS of it.
- We cannot change this in stable so we fix the issue in JS.
After this commit:
- The records are no longer selected.
- We no longer get the traceback.
Task-3727009
Forward-Port-Of: odoo/enterprise#56356In the "Profit and Loss" report, the `14P - Profit (Loss) of the Preceding Period Brought Forward (+)/(-)` line is grouped by account_id, showing then all the accounts from the preceding period that impact the final amount. Which provides a lot of information that may be too much. Only the total amount should be displayed. opw-3810161 Forward-Port-Of: odoo/enterprise#59640
Original PR description
In the "Profit and Loss" report, the `14P - Profit (Loss) of the Preceding Period Brought Forward (+)/(-)` line is grouped by account_id, showing then all the accounts from the preceding period that impact the final amount. Which provides a lot of information that may be too much. Only the total amount should be displayed. opw-3810161 Forward-Port-Of: odoo/enterprise#59640
### Steps to reproduce 1. Install "l10n_ph" 2. Switch to PH Company 3. Accounting / Reporting / Partner Reports / Summary Lists of Sales and Purchases 4. In the options/filters, change the "In" field You will be met with a traceback: `KeyError: 'no_format'` opw-3805585 Forward-Port-Of: odoo/enterprise#59338
Original PR description
### Steps to reproduce 1. Install "l10n_ph" 2. Switch to PH Company 3. Accounting / Reporting / Partner Reports / Summary Lists of Sales and Purchases 4. In the options/filters, change the "In" field You will be met with a traceback: `KeyError: 'no_format'` opw-3805585 Forward-Port-Of: odoo/enterprise#59338
**Current behavior:** The `rental.schedule` model/view does not have serial number data for order lines which are constructed while the `Rental Transfers` config option is active. This prevents the view from accurately grouping by serial number. **Expected behavior:** The schedule view will correctly group the records in this gantt view. **Steps to reproduce:** 1. Create a new rental product, ensure it has the 'By Unique Serial Number' tracking option 2. Create an on hand instance of
Original PR description
**Current behavior:** The `rental.schedule` model/view does not have serial number data for order lines which are constructed while the `Rental Transfers` config option is active. This prevents the…
**Current behavior:** The `rental.schedule` model/view does not have serial number data for order lines which are constructed while the `Rental Transfers` config option is active. This prevents the view from accurately grouping by serial number. **Expected behavior:** The schedule view will correctly group the records in this gantt view. **Steps to reproduce:** 1. Create a new rental product, ensure it has the 'By Unique Serial Number' tracking option 2. Create an on hand instance of this product with a serial number 3. In Rental settings, enable the `Rental Transfers` option 3. Create a new rental order for this product, go to the `Schedule` view in the Rental app, select Group By Serial Number, observe that the new order is listed as having an undefined serial number **Cause of the issue:** When the Rental Transfers option is enabled, the wizard which normally tracks rental pickups/returns gets circumvented to instead get organized via stock. The SQL view for the schedule model only looks in the tables managed by this wizard to find lot_ids of products included in rental orders. So when we don't use the wizard, that information never makes it to the proper place. **Fix:** Union the current view's table result with another query which will select the data for the excluded records. opw-3754422 Forward-Port-Of: odoo/enterprise#58986
This commit adds various changes to the codebase to fix issues with the leaderboard system, issues such as the leaderboard being displayed even though the current employee has no billable time rate, billing rate target not having the fa-building icon next to it, theorical working hours being incorrect, visual issues and many more. task-3570302 Forward-Port-Of: odoo/enterprise#50307
Original PR description
This commit adds various changes to the codebase to fix issues with the leaderboard system, issues such as the leaderboard being displayed even though the current employee has no billable time rate, billing rate target not having the fa-building icon next to it, theorical working hours being incorrect, visual issues and many more. task-3570302 Forward-Port-Of: odoo/enterprise#50307
In My Timesheets grid view if you have more than 26 lines, the last ones will display a border only Tweaked some conditions in the grid_timer_button_cell.xml Task-3670682 Forward-Port-Of: odoo/enterprise#59800 Forward-Port-Of: odoo/enterprise#53749
Original PR description
In My Timesheets grid view if you have more than 26 lines, the last ones will display a border only Tweaked some conditions in the grid_timer_button_cell.xml Task-3670682 Forward-Port-Of: odoo/enterprise#59800 Forward-Port-Of: odoo/enterprise#53749
With this commit on approval request's form view: * You have the same padding for dates * The primary button is "attached documents" if you don't linked a document or "confirm","approve" if you have already send a document. task : 3724860 Forward-Port-Of: odoo/enterprise#59988 Forward-Port-Of: odoo/enterprise#58863
Original PR description
With this commit on approval request's form view:
* You have the same padding for dates
* The primary button is "attached documents" if you don't linked a
document or "confirm","approve" if you have already send a document.
task : 3724860
Forward-Port-Of: odoo/enterprise#59988
Forward-Port-Of: odoo/enterprise#58863**Steps to reproduce:** (requires a real certificate and a real CAF) - Install Accounting and l10n_cl_edi_boletas - Switch to a Chilean company - Configure the localization settings with a real certificate and a real CAF - Create an invoice: * Customer: [a Chilean customer] (e.g. Blanco Martin & Asociados) * Document Type: (39) Boleta Electrónica * Product: [any] - Confirm the invoice - Click on "Send Now to SII" - "SII DTE status" will be "Ask For Status" and "Send Now to SII" w
Original PR description
**Steps to reproduce:** (requires a real certificate and a real CAF) - Install Accounting and l10n_cl_edi_boletas - Switch to a Chilean company - Configure the localization settings with a real…
**Steps to reproduce:** (requires a real certificate and a real CAF) - Install Accounting and l10n_cl_edi_boletas - Switch to a Chilean company - Configure the localization settings with a real certificate and a real CAF - Create an invoice: * Customer: [a Chilean customer] (e.g. Blanco Martin & Asociados) * Document Type: (39) Boleta Electrónica * Product: [any] - Confirm the invoice - Click on "Send Now to SII" - "SII DTE status" will be "Ask For Status" and "Send Now to SII" will change to "Verify on SII" - As soon as it changes to "Verify on SII", click on it - Repeat clicking on "Verify on SII" as soon as it becomes clickable **Issue:** At some point, "SII DTE status" will switch from "Ask For Status" to "Rejected", even if the invoice has not been officially rejected. And as "Verify on SII" link will not be available anymore, it will not be possible to correct the SII DTE status. **Cause:** While checking the SII result after clicking on "Verify on SII", we could receive a response with "estado: SOK" and "estadistica: []". This combination doesn't allow to determine a specific status for the SII DTE and therefore falls back on the default status that is "Rejected". **Solution:** If the SII DTE status cannot be determined, we should use "Ask For Status" as a fallback status to allow verifying it again. opw-3781373 Forward-Port-Of: odoo/enterprise#60284 Forward-Port-Of: odoo/enterprise#59523
… the cart -> 17.0 Steps to reproduce : -> Add a rental product to your cart with a rental period -> Go to the cart -> Remove one of the date from the rental period (either pickup date or return date) Issue : -> Get this traceback Cause: -> when we remove the date from the cart we find a traceback of 'start_date'. Solution: -> Added the condition so if the we remove the start date or end date we not get the traceback. opw-3638268 Forward-Port-Of: odoo/enterprise#58667
Original PR description
… the cart -> 17.0 Steps to reproduce : -> Add a rental product to your cart with a rental period -> Go to the cart -> Remove one of the date from the rental period (either pickup date or return date) Issue : -> Get this traceback Cause: -> when we remove the date from the cart we find a traceback of 'start_date'. Solution: -> Added the condition so if the we remove the start date or end date we not get the traceback. opw-3638268 Forward-Port-Of: odoo/enterprise#58667