Thursday, May 11, 2023
42 changes · master
Enhancements to existing features
This update adjusts how the Discuss messaging setup is loaded for users, making the mail app’s internal initialization cleaner and easier to maintain. It should help support reliable messaging behavior without changing the day-to-day user experience.
The eLearning attendee reporting list now shows the attendee associated with each record, making it easier to identify who attended. Users can also group the report by attendee for clearer analysis and follow-up.
Original PR description
before this commit, attendees details is not shown in the attendees list view eLearning -> Reporting -> Attendees after this commit, Attendees (partner_id) will be shown in the attendees list view and group by option is added in the search view --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
User selection autocomplete now prioritizes the currently logged-in user in avatar-based user fields. This makes assigning yourself or selecting your own user record quicker and more intuitive in mail-related workflows.
Original PR description
Task ID: 3291745
The spreadsheet context menu now shows dedicated icons for actions such as viewing related records or properties and setting a value as a filter. This makes these actions easier to recognize and helps users work faster in spreadsheet reports.
Original PR description
## Task Description This PR aims to add two new icons in the context menu of the spreadsheet, for the see records/see properties and the set as filter actions ## Related enterprise PR: - https://github.com/odoo/enterprise/pull/40713 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users applying a discount to the first sales order line now have a clearer way to dismiss the prompt asking whether to apply the discount to all lines. This improves usability by letting users cancel the action without making an unintended bulk discount change.
Original PR description
When applying a discount to the first SO line, a pop-up appears asking if the user wants to apply it on every line of the SO. This commit adds a cancel button for a better UX. task-3300071
The Luxembourg reporting tests were updated to align with newly standardized tax names. This helps ensure tax labels display consistently on invoices and supports improved tax search behavior without changing day-to-day workflows.
Original PR description
We want to invigorate a Tax Name Taxonomy so that tax names are as codified as possible. This allow for a better display on Invoice Description, and allowed us to implement a smart name_search. In the community PR we changed the name of the taxes, and those test are also impacted task-id: 3052677
Spreadsheet context menus now show icons for actions such as viewing related records or properties and setting a value as a filter. This makes these commonly used actions easier to recognize and quicker to find, improving day-to-day spreadsheet navigation.
Original PR description
## Task Description This PR aims to add two new icons in the context menu of the spreadsheet, for the see records/see properties and the set as filter actions ## Related community PR: - https://github.com/odoo/odoo/pull/120543
Resolved issues and error corrections
This update fixes an internal automated test for website module setup so it can reliably find the right page elements. It helps keep future website-related changes safer by reducing false test failures during development.
Original PR description
For a strange reason, another pull request revealed some errors in this test/
- `#top_menu a[href^='${url}'` is not a valid selector
- There are multiple `button.btn-primary` on the pageCode cleanup and technical improvements
Typing indicator behavior for mail and live chat has been reorganized into the Discuss experience. This internal cleanup should make messaging features easier to maintain while keeping the user experience consistent.
Miscellaneous changes
When receiving an email on a mailbox with an alias that triggers the creation of invoices, 4 bugs could occur. 1. If the xml received contains replacement characters (U+FFFD �), and the charset of the part of the email is "US-ASCII" the encoding of the string will fail, preventing the rest of the flow to be completed. Be more resilient, encode the string and ignores these characters if this case occurs. NB: sometimes, the charset is omitted for a Content-type: text/xml. This is valid
This update fixes several small HTML validity issues in Odoo's default website and web templates, including outdated browser compatibility values, phone links with spaces, and script attributes. These changes help pages pass standard validation checks and reduce the risk of display or integration issues without changing visible functionality.
Original PR description
No related task, just a quick fix while we talked about valid HTML in a recent unrelated editor task.
Original PR description
When receiving an email on a mailbox with an alias that triggers the creation of invoices, 4 bugs could occur. 1. If the xml received contains replacement characters (U+FFFD �), and the charset of…
When receiving an email on a mailbox with an alias that triggers the creation of invoices, 4 bugs could occur. 1. If the xml received contains replacement characters (U+FFFD �), and the charset of the part of the email is "US-ASCII" the encoding of the string will fail, preventing the rest of the flow to be completed. Be more resilient, encode the string and ignores these characters if this case occurs. NB: sometimes, the charset is omitted for a Content-type: text/xml. This is valid but not recommended (see: https://www.ietf.org/rfc/rfc2376.txt). In this case, the default used is "US-ASCII". This means that any non-ascii char will be lost (they are replaced by the replacement character: �, see: https://github.com/python/cpython/blob/3.10/Lib/email/contentmanager.py#L67) when decoding the attachment. 2. When the xml attachment is created in Odoo, the mimetype is 'text/plain' (rather than 'application/xml'). Thus, the `_decode_attachment` needs to be more flexible when guessing the type of the attachment (to know which function to use to read the content of the attachment and create the invoice). 3. When creating an invoice from an email with an xml attachment, the xml is attached as the `message_main_attachment_id`. It's only later on that the content of the xml is read and we possibly find the PDF in base64 inside. When creating the PDF attachment, it was not set as the `message_main_attachment_id`, so the PDF was not rendered on the right part of the invoice form view. Add a clause to replace the `message_main_attachment_id` in such a case. 4. When the xml attachment represents a credit note, the move_type of the invoice created by the email alias needs to be changed. Indeed, the invoice is created before decoding the attachment, so we can only change the `move_type` later. opw-3144519 opw-3149649 Forward-Port-Of: odoo/odoo#121033 Forward-Port-Of: odoo/odoo#119602
Related enterprise PR: https://github.com/odoo/enterprise/pull/39669 Steps to reproduce: - Install mrp_workorder - Create Product P1, Workcenter W1 - Edit W1 > Specific capacities > Add line: Product = P1, Start time = 5, End time = 5 - Create BoM > Product: P1, Operations tab > Add line: Workcenter = WC1, Default duration = 60:00 min > Save - Click on overview stat button Issue: The created operation has expected time of 60:00, instead of 70:00. The workcenter start and stop tim
Original PR description
Related enterprise PR: https://github.com/odoo/enterprise/pull/39669 Steps to reproduce: - Install mrp_workorder - Create Product P1, Workcenter W1 - Edit W1 > Specific capacities > Add line: Product = P1, Start time = 5, End time = 5 - Create BoM > Product: P1, Operations tab > Add line: Workcenter = WC1, Default duration = 60:00 min > Save - Click on overview stat button Issue: The created operation has expected time of 60:00, instead of 70:00. The workcenter start and stop times are considered in this calculation, so the workcenter capacities should be considered too. Solution: Use `_get_expected_duration` to compute the expected duration. opw-3229485 Forward-Port-Of: odoo/odoo#118360
When sending email with gift card, it will have the user langauge and not the partner language Steps to reproduce the error : 1- Add french and english language 2- Make the current language english 3- Install contact and sales and activate gift cards 4- create a contact having french language 5- create a gift card for the french partner and send it to him 6- the email will be in english lang The origin of the problem was the missing lang field in the template opw-3308919 Forward-Po
Original PR description
When sending email with gift card, it will have the user langauge and not the partner language Steps to reproduce the error : 1- Add french and english language 2- Make the current language english 3- Install contact and sales and activate gift cards 4- create a contact having french language 5- create a gift card for the french partner and send it to him 6- the email will be in english lang The origin of the problem was the missing lang field in the template opw-3308919 Forward-Port-Of: odoo/odoo#121028
While creating a new product in product category with barcode value in inventory module, `_check_barcode_uniqueness` method is called. In which variable 'domain' is passed, and getting wrong value. Steps to Produce:- 1) Go to Inventory then configuration 2) Click on 'Product Categories' under products 3) Click/Create Product Category 4) Click stat button 'product' 5) Create a product 6) Then add barcode value 7) Click on Save 8) Trace-back will be generated Reason:- While creati
Original PR description
While creating a new product in product category with barcode value in inventory module, `_check_barcode_uniqueness` method is called. In which variable 'domain' is passed, and getting wrong value.…
While creating a new product in product category with barcode value in inventory module, `_check_barcode_uniqueness` method is called. In which variable 'domain' is passed, and getting wrong value. Steps to Produce:- 1) Go to Inventory then configuration 2) Click on 'Product Categories' under products 3) Click/Create Product Category 4) Click stat button 'product' 5) Create a product 6) Then add barcode value 7) Click on Save 8) Trace-back will be generated Reason:- While creating new product from product category when user add the barcode value in product form, the '_check_barcode_uniqueness' method is called. In this method the value of 'domain' is getting updated by reference from variable 'domain' from method '_search' present in the same model. This results in a traceback with the message 'Invalid field product.packaging.categ_id'. Applying these changes will resolve this issue. See:-  sentry - 4073963761 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#120955 Forward-Port-Of: odoo/odoo#118339
When triggering the CRON "Sale Subscription: generate recurring invoices and payments", invoices are created from subscriptions, the emails and xml attachments are sent to the recipients. Similarly, the CRON "automatic invoicing: send ready invoice" should go through the Send and Print wizard to be able to create the xml attachments. task-3299540 Forward-Port-Of: odoo/odoo#121005
Original PR description
When triggering the CRON "Sale Subscription: generate recurring invoices and payments", invoices are created from subscriptions, the emails and xml attachments are sent to the recipients. Similarly, the CRON "automatic invoicing: send ready invoice" should go through the Send and Print wizard to be able to create the xml attachments. task-3299540 Forward-Port-Of: odoo/odoo#121005
Since 16.0's https://github.com/odoo/odoo/commit/0501bbd62e517f6c215d9e7e36d61747c7f5816b fields with groups are now removed from the view instead of being set as invisible. Scenario: - template user has group "Access to export feature" - create a new user while being in debug=0 mode - save => the users don't have the group "Access to export feature" set, because the corresponding field is not in the view. If the same scenario was done in debug=1 mode, we would get the group set.
Original PR description
Since 16.0's https://github.com/odoo/odoo/commit/0501bbd62e517f6c215d9e7e36d61747c7f5816b fields with groups are now removed from the view instead of being set as invisible. Scenario: - template user has group "Access to export feature" - create a new user while being in debug=0 mode - save => the users don't have the group "Access to export feature" set, because the corresponding field is not in the view. If the same scenario was done in debug=1 mode, we would get the group set. Solution: duplicate the field that are inside base.group_no_one section and have them be invisible if someone is not in debug mode. note: before the fix, added assert fails because there is missing groups in the newly created user. note: issue observed when working on another ticket Forward-Port-Of: odoo/odoo#120310
the error will occur when adding more than one attachment to draft invoice chatter and click on send button. applying these changes will resolve this issue. Traceback on sentry: ``` ValueError: too many values to unpack (expected 1) File "odoo/models.py", line 5183, in ensure_one _id, = self._ids ValueError: Expected singleton: ir.attachment(3028, 3029) File "odoo/http.py", line 2117, in __call__ response = request._serve_nodb() File "odoo/http.py", line 1667, in _s
Original PR description
the error will occur when adding more than one attachment to draft invoice chatter and click on send button. applying these changes will resolve this issue. Traceback on sentry: ``` ValueError: too…
the error will occur when adding more than one attachment to draft invoice chatter and click on send button.
applying these changes will resolve this issue.
Traceback on sentry:
```
ValueError: too many values to unpack (expected 1)
File "odoo/models.py", line 5183, in ensure_one
_id, = self._ids
ValueError: Expected singleton: ir.attachment(3028, 3029)
File "odoo/http.py", line 2117, in __call__
response = request._serve_nodb()
File "odoo/http.py", line 1667, in _serve_nodb
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1924, in dispatch
result = endpoint(**self.request.params)
File "odoo/http.py", line 715, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "home/odoo/src/custom/default/saas_worker/controllers/main.py", line 2233, in smtp
proxy.message_process(None, message)
File "addons/mail/models/mail_thread.py", line 1246, in message_process
thread_id = self._message_route_process(message, msg_dict, routes)
File "addons/mail/models/mail_thread.py", line 1180, in _message_route_process
new_msg = thread.message_post(**post_params)
File "addons/mail/models/mail_thread.py", line 2062, in message_post
self._message_post_after_hook(new_message, msg_values)
File "addons/account/models/account_move.py", line 4170, in _message_post_after_hook
self._extend_with_attachments(attachments, new=False)
File "addons/account/models/account_move.py", line 2890, in _extend_with_attachments
for file_data in attachments._unwrap_edi_attachments(): # sorted by priority
File "addons/account/models/ir_attachment.py", line 138, in _unwrap_edi_attachments
if supported_format['check'](self):
File "addons/account/models/ir_attachment.py", line 107, in <lambda>
'check': lambda attachment: 'pdf' in attachment.mimetype,
File "odoo/fields.py", line 1151, in __get__
record.ensure_one()
File "odoo/models.py", line 5186, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
sentry-4059207297
Forward-Port-Of: odoo/odoo#119822Signing CLA for contributing to Odoo --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#120750
Original PR description
Signing CLA for contributing to Odoo --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#120750
AttributeError "account.move.line" object has no attribute "purchase_line_id" occurs in `stock_account` when we confirm vendor BILL or REFUND with product costing method "first in first out" or "average cost". traceback on sentry:  With the recent reflacted changes in commit[1], the `purchase_line_id` field is used and it belongs to `purchase`, but it is not installed and
Original PR description
AttributeError "account.move.line" object has no attribute "purchase_line_id" occurs in `stock_account` when we confirm vendor BILL or REFUND with product costing method "first in first out" or "average cost". traceback on sentry:  With the recent reflacted changes in commit[1], the `purchase_line_id` field is used and it belongs to `purchase`, but it is not installed and does not depend, so it causes an error. The above issue is solved by removing some code in commit[1] from `stock_account` and adding it to `purchase_stock`. committ[1] - https://github.com/odoo/odoo/pull/99411/commits/e9ce88a9372843abef7cf8fc94c4dbe5f16c5fa3#diff-e6134a1a5a13058e35f86426a96db0acac44553fa3b0ca26716390f7b19fc96cR318 sentry-3975529425 Forward-Port-Of: odoo/odoo#120303 Forward-Port-Of: odoo/odoo#117876
- Add 16 document type for "in invoices" when partner type identification is RUC. 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#119706
Original PR description
- Add 16 document type for "in invoices" when partner type identification is RUC. 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#119706
Before this commit ================== Test connection without checking GST number. After this commit ================= This commit adds functionality to check whether the GST number is present or not before testing the connection. Task id - 3246786 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
Original PR description
Before this commit ================== Test connection without checking GST number. After this commit ================= This commit adds functionality to check whether the GST number is present or not before testing the connection. Task id - 3246786 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#120100
Current behavior: When adding a tips to an order, then applying a global discount. The discount is applied to the tips when it should not. Steps to reproduce: - Open POS - Add a product to the order - Add a tips to the order - Apply a global discount - The discount is calculated on the tips and the products opw-3271886 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#120926 Forward-Port-Of: odoo/odoo#120462
Original PR description
Current behavior: When adding a tips to an order, then applying a global discount. The discount is applied to the tips when it should not. Steps to reproduce: - Open POS - Add a product to the order - Add a tips to the order - Apply a global discount - The discount is calculated on the tips and the products opw-3271886 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#120926 Forward-Port-Of: odoo/odoo#120462
When l10n_mx_edi is installed and a payment is posted, the move_name field on account.move.line being a related to move_id.name is not well computed. That is because posting a move trigger the computed field in a protected mode due to `flush_recorset`. This mode prevents any computed field to be recomputed twice. This flush triggers `_compute_name` calling `sequence_mixin`, itself doing another `flush_recorset`. This extra flush triggers `_compute_l10n_mx_edi_cfdi_uuid` that access to `move
Original PR description
When l10n_mx_edi is installed and a payment is posted, the move_name field on account.move.line being a related to move_id.name is not well computed. That is because posting a move trigger the…
When l10n_mx_edi is installed and a payment is posted, the move_name field on account.move.line being a related to move_id.name is not well computed. That is because posting a move trigger the computed field in a protected mode due to `flush_recorset`. This mode prevents any computed field to be recomputed twice. This flush triggers `_compute_name` calling `sequence_mixin`, itself doing another `flush_recorset`. This extra flush triggers `_compute_l10n_mx_edi_cfdi_uuid` that access to `move.payment_id.reconciled_bill_ids`. This access to this field triggers its recomputation and then, `_compute_stat_buttons_from_reconciliation` is called. This method does `self.env['account.move.line'].flush_model()` that force the computation of `move_name` to `/`. `sequence_mixin` assigns the new `name` to the journal entry but `move_name` is not recomputed due to the protected environment. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#121064 Forward-Port-Of: odoo/odoo#120411
**Current behavior before PR:** When a new link a created on a new sentence, and clicked on it opens a popover, when your start hitting backspace then as your reach the extreme left it throws a trace-back error. **Desired behavior after PR is merged:** Trace-back error is not thrown while deleting backward it does not throw back. Task-Id: 3252709 Forward-Port-Of: odoo/odoo#118583
Original PR description
**Current behavior before PR:** When a new link a created on a new sentence, and clicked on it opens a popover, when your start hitting backspace then as your reach the extreme left it throws a trace-back error. **Desired behavior after PR is merged:** Trace-back error is not thrown while deleting backward it does not throw back. Task-Id: 3252709 Forward-Port-Of: odoo/odoo#118583
JSONDecodeError: Expecting value: line 1 column 1 (char 0) This error occurs when we try to upload an invalid json data file. ``` JSONDecodeError: Expecting value: line 1 column 1 (char 0) File "odoo/http.py", line 2093, in __call__ response = request._serve_db() File "odoo/http.py", line 1677, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "odoo/service/model.py", line 134, in retrying result = func() File "odoo/http.py", line 1704
Original PR description
JSONDecodeError: Expecting value: line 1 column 1 (char 0) This error occurs when we try to upload an invalid json data file. ``` JSONDecodeError: Expecting value: line 1 column 1 (char 0) File…
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
This error occurs when we try to upload an invalid json data file.
```
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
File "odoo/http.py", line 2093, in __call__
response = request._serve_db()
File "odoo/http.py", line 1677, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1704, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1901, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 234, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 149, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 708, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 28, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 24, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "home/odoo/src/enterprise/saas-16.1/spreadsheet_edition/models/spreadsheet_collaborative_mixin.py", line 51, in join_spreadsheet_session
"raw": self._get_spreadsheet_snapshot(),
File "home/odoo/src/enterprise/saas-16.1/spreadsheet_edition/models/spreadsheet_collaborative_mixin.py", line 146, in _get_spreadsheet_snapshot
return json.loads(base64.decodebytes(self.spreadsheet_snapshot))
File "__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
```
sentry- 3957419658
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#120637
Forward-Port-Of: odoo/odoo#117105Steps to reproduce: - Install purchase, inventory and manufacturing. - Now create a subcontractor, with it's corresponding location, it's set by default. - Go to this new location and set it as replenishment location. - Now create a Request for Quotation using this subcontractor. - We will receive a traceback whent trying to access replenishment. Issue: We got a traceback caused by the fact that we are trying to set as replenishment location, a location that doesn't have a warehouse
Original PR description
Steps to reproduce: - Install purchase, inventory and manufacturing. - Now create a subcontractor, with it's corresponding location, it's set by default. - Go to this new location and set it as replenishment location. - Now create a Request for Quotation using this subcontractor. - We will receive a traceback whent trying to access replenishment. Issue: We got a traceback caused by the fact that we are trying to set as replenishment location, a location that doesn't have a warehouse. Solution: We need to add the handling of this case, so we won't always need a warehouse for the orderpoint. opw-3164276 Forward-Port-Of: odoo/odoo#113361
On the ecommerce, we want the pricelist to be adapted to the user who is connected. If no user is logged in, the 'Public Pricelist' is used. To determine the pricelist that will be used (by default): https://github.com/odoo/odoo/blob/a3169ede4f609b56c83da04756d20b1c7a07251f/addons/website_sale/controllers/main.py#L350-L354 Therefore, if we have been to the shop as a 'Public user' and we decide to log in, we already have a pricelist in `request.session.get('website_sale_current_pl')`. S
Original PR description
On the ecommerce, we want the pricelist to be adapted to the user who is connected.
If no user is logged in, the 'Public Pricelist' is used.
To determine the pricelist that will be used (by default): https://github.com/odoo/odoo/blob/a3169ede4f609b56c83da04756d20b1c7a07251f/addons/website_sale/controllers/main.py#L350-L354
Therefore, if we have been to the shop as a 'Public user' and we decide to log in, we already have a pricelist in `request.session.get('website_sale_current_pl')`.
So we have to clear the pricelist when we connect to determine the new pricelist of the user.
opw-3228998
Forward-Port-Of: odoo/odoo#120991
Forward-Port-Of: odoo/odoo#118880In https://github.com/odoo/odoo/commit/6371565e6933d6ede88fa85992f4acbc2cb5327b we expect required fields to throw ValidationError when not set, we thus correct res_partner to raise that error when the email is implicitly required, so after this PR if we can try to create a new partner from the name directly then It will give a validation error and wizard will open for the creation of a new partner. **Task**-3297388 Forward-Port-Of: odoo/odoo#120638
Original PR description
In https://github.com/odoo/odoo/commit/6371565e6933d6ede88fa85992f4acbc2cb5327b we expect required fields to throw ValidationError when not set, we thus correct res_partner to raise that error when the email is implicitly required, so after this PR if we can try to create a new partner from the name directly then It will give a validation error and wizard will open for the creation of a new partner. **Task**-3297388 Forward-Port-Of: odoo/odoo#120638
## Current behaviour If we confirm an SO with a service with a delivery based on milestones, that creates both a project & task, and we set a project on the SO, the project for the milestone should be the one set on the SO, a ValidationError is raised for missing project on milestone. ## Expected behaviour No ValidationError, the milestone should use the project set on the SO. ## Steps to reproduce - Install Sales, Project - Check Milestones in Settings - Create a new project. - Crea
Original PR description
## Current behaviour If we confirm an SO with a service with a delivery based on milestones, that creates both a project & task, and we set a project on the SO, the project for the milestone should…
## Current behaviour If we confirm an SO with a service with a delivery based on milestones, that creates both a project & task, and we set a project on the SO, the project for the milestone should be the one set on the SO, a ValidationError is raised for missing project on milestone. ## Expected behaviour No ValidationError, the milestone should use the project set on the SO. ## Steps to reproduce - Install Sales, Project - Check Milestones in Settings - Create a new project. - Create a new product, type service, delivery milestones, on confirm create project & task - Create an SO, add a line with the new product. - Set a our new project on the SO (In the "Other Info" tab) - Confirm the SO, you are met with a ValidationError. ## Reason for the problem Since we are not *generating* a new project, `project_id` on the sale_order_line is empty, and we base ourself on it when creating the milestone in `_generate_milestone`, leading to the non-null validation error, because this field is `required=True` on milestones. ## Fix When creating the milestone in `_generate_milestone`, if the line doesn't have a `project_id`, we take the one set on the order. We don't set the `project_id` to the *determined_project* (`_determine_project`) at line 305 (after: `so_line._timesheet_create_task(project=project)`) because the `project_id` on the sale_order_line is marked as "Generated Project", which is not true in our case (the project isn't generated by the sale order line). ## Affected versions - 16.0 - saas-16.1 - saas-16.2 - master --- opw-3236235 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#120434
Before this commit, the user could use the blog publication date selector situated in the blog sidebar even when he was in edit mode. This date selector should behave like a link, it should not work in edit mode. This commit prevents the user from using this selector while he is in edit mode. Steps to reproduce the bug: - Go to /blog - Edit the page - Enable the sidebar option - Click on the select in the sidebar - Click on a date => An error is displayed. task-3213851 Forward-Por
Original PR description
Before this commit, the user could use the blog publication date selector situated in the blog sidebar even when he was in edit mode. This date selector should behave like a link, it should not work in edit mode. This commit prevents the user from using this selector while he is in edit mode. Steps to reproduce the bug: - Go to /blog - Edit the page - Enable the sidebar option - Click on the select in the sidebar - Click on a date => An error is displayed. task-3213851 Forward-Port-Of: odoo/odoo#119785
This commit adds buttons to existing documentation pages next to the features' labels in the settings. task-3297635 enterprise: https://github.com/odoo/enterprise/pull/40808 Forward-Port-Of: odoo/odoo#121078 Forward-Port-Of: odoo/odoo#120773
Original PR description
This commit adds buttons to existing documentation pages next to the features' labels in the settings. task-3297635 enterprise: https://github.com/odoo/enterprise/pull/40808 Forward-Port-Of: odoo/odoo#121078 Forward-Port-Of: odoo/odoo#120773
Before this commit: when reset template, the strategy is 1. write the template value from the data file with_context(lang=None) (some legacy translations may be kept, if their en_US values were not changed) 2. use the translations in the po file to override current translations But when a term is not translated in the po file (for example, all en_UK terms, since we don't have en.po), the old translation of the term cannot be overridden and reset After this commit: Thanks to the new
Original PR description
Before this commit: when reset template, the strategy is 1. write the template value from the data file with_context(lang=None) (some legacy translations may be kept, if their en_US values were not changed) 2. use the translations in the po file to override current translations But when a term is not translated in the po file (for example, all en_UK terms, since we don't have en.po), the old translation of the term cannot be overridden and reset After this commit: Thanks to the new feature introduced in #109858, the translation for a term can be voided before the step 2 As a result, translations for model translated fields can be correctly reset opw-3241014 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#116780
When mass_mailing was installed, the website snippets demo page did not work anymore. This is due to a combination of two factors: A. [1] marked views for removal just before the release of the 16.0 (so that they could be removed via an upgrade script later on after runbot things) but we forgot to remove them before the release. B. The views that [1] tweaked and should have been removed contain an apparently simple `<div>` with a comment... but it actually acts as an xpath
Original PR description
When mass_mailing was installed, the website snippets demo page did not work anymore. This is due to a combination of two factors: A. [1] marked views for removal just before the release of the 16.0…
When mass_mailing was installed, the website snippets demo page did not work anymore. This is due to a combination of two factors: A. [1] marked views for removal just before the release of the 16.0 (so that they could be removed via an upgrade script later on after runbot things) but we forgot to remove them before the release. B. The views that [1] tweaked and should have been removed contain an apparently simple `<div>` with a comment... but it actually acts as an xpath looking for a div as it is an extension view. Unfortunately, there is a bug in the t-call/inheritance system regarding this: when the main view containing this xpath is rendered directly, there is no issue (that's what edit mode works: a div is found and nothing is added inside). But when it is t-call'ed (as it is the case in the snippets demo page), the div cannot be found anymore (it seems to look for `/data/div` instead of `/t/div`). The bug described at B (if it is really a bug) could be worth checking but this is probably not worth the time until a real usecase occurs. For now, this commit fixes the broken demo page by using a real xpath to target the div. This is technically not a stable change but really, users should not have targeted a template which was clearly marked for removal. So hopefully, there should not be any issue. [1]: https://github.com/odoo/odoo/commit/3201eba9fd31602d709b962965e9c1411d1eeb6f#diff-b26221e9411fb6f3725ce5a30c4659a22d81a9a69f666bdbd6daa77e03ec3253R302-R308 task-3233465 Forward-Port-Of: odoo/odoo#121134
mimic what is done for `odoo.addons` \_\_path__. 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#121045
Original PR description
mimic what is done for `odoo.addons` \_\_path__. 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#121045
Problem: Currently, the outstanding payments only show on the bank reconciliation report if there are payments attached to journal entries. However, outstanding payments refer to journal entries that use an outstanding account. Thus, it is not required for the journal entries to have a payment in order for it to display on the bank reconciliation report. By query, the journal entries using an outstanding payment account is correctly fetched, but not properly displayed. Solution:The dictionary
Original PR description
Problem: Currently, the outstanding payments only show on the bank reconciliation report if there are payments attached to journal entries. However, outstanding payments refer to journal entries that use an outstanding account. Thus, it is not required for the journal entries to have a payment in order for it to display on the bank reconciliation report. By query, the journal entries using an outstanding payment account is correctly fetched, but not properly displayed. Solution:The dictionary, grouped_results, should be grouped by the move_id instead of payment_id. Move_id are guaranteed to have a unique value whereas payment_id is not since it can be false. With this fix, the journal entries that uses an outstanding account but has no payment will be displayed. opw-3230064 Forward-Port-Of: odoo/enterprise#40863 Forward-Port-Of: odoo/enterprise#40093
This commit adds buttons to existing documentation pages next to the features' labels in the settings. task-3297635 community: https://github.com/odoo/odoo/pull/120773 Forward-Port-Of: odoo/enterprise#40910 Forward-Port-Of: odoo/enterprise#40808
Original PR description
This commit adds buttons to existing documentation pages next to the features' labels in the settings. task-3297635 community: https://github.com/odoo/odoo/pull/120773 Forward-Port-Of: odoo/enterprise#40910 Forward-Port-Of: odoo/enterprise#40808
Before this commit, emptying the value of an advantage on the salary configurator would lead to an error because an empty text value cannot be converted to float. This commit fixes that issue by setting the value default to 0 for an empty field. Steps to reproduce: - go on an employee contract (on My Belgian Company for more advanced advantages in demo data) - generate a simulation link and follow the link - select Public Transportation and add a numbered value - unselect the field to
Original PR description
Before this commit, emptying the value of an advantage on the salary configurator would lead to an error because an empty text value cannot be converted to float. This commit fixes that issue by setting the value default to 0 for an empty field. Steps to reproduce: - go on an employee contract (on My Belgian Company for more advanced advantages in demo data) - generate a simulation link and follow the link - select Public Transportation and add a numbered value - unselect the field to update the simulation - empty the field - unselect the field to update the simulation once again Forward-Port-Of: odoo/enterprise#40877
**Steps to reproduce the bug:** - Connect as a user without HR rights - Go to Manufacturing > Operations > Work Orders **Problem:** an access error is raised The requested operation can not be completed due to security restrictions. Fields: - barcode (allowed for groups 'Employees / Officer: Manage all employees') We do a searchRead on the "hr.employee" model to load the "barcode" field for all employees, However, since the user "U1" does not have HR rights, a user access error occurs
Original PR description
**Steps to reproduce the bug:** - Connect as a user without HR rights - Go to Manufacturing > Operations > Work Orders **Problem:** an access error is raised The requested operation can not be…
**Steps to reproduce the bug:** - Connect as a user without HR rights - Go to Manufacturing > Operations > Work Orders **Problem:** an access error is raised The requested operation can not be completed due to security restrictions. Fields: - barcode (allowed for groups 'Employees / Officer: Manage all employees') We do a searchRead on the "hr.employee" model to load the "barcode" field for all employees, However, since the user "U1" does not have HR rights, a user access error occurs. **Solution:** When loading all employees, it is unnecessary to retrieve their barcodes. Because, When a barcode is scanned, the "onBarcodeScanned" function is triggered, in which we call the "get_employee_barcode" function on the Python side. This function performs a searchRead operation as a superuser to retrieve the specific employee. https://github.com/odoo/enterprise/blob/948358cb96cf32a153df95a8b9efa0bb56f5a53d/mrp_workorder_hr/static/src/views/hooks/employee_hooks.js#L215-L218 opw-3297355 Forward-Port-Of: odoo/enterprise#40865
Before this commit ================== Test connection without checking GST number. After this commit ================= This commit adds functionality to check whether the GST number is present or not before testing the connection. Task id - 3246786 Forward-Port-Of: odoo/enterprise#40522
Original PR description
Before this commit ================== Test connection without checking GST number. After this commit ================= This commit adds functionality to check whether the GST number is present or not before testing the connection. Task id - 3246786 Forward-Port-Of: odoo/enterprise#40522
Before this commit, the report_withhold in l10n_ec_edi inherited account's tax_group_totals template without the primary attr set to True. This meant it was replacing a condition in the original template and thus affecting other localizations. This commit fixes that, thank you @BIB for pointing it out. task-3011311 Forward-Port-Of: odoo/enterprise#37280
Original PR description
Before this commit, the report_withhold in l10n_ec_edi inherited account's tax_group_totals template without the primary attr set to True. This meant it was replacing a condition in the original template and thus affecting other localizations. This commit fixes that, thank you @BIB for pointing it out. task-3011311 Forward-Port-Of: odoo/enterprise#37280
In the case were the save rpc call fails (unstable Wifi for example), linesToSave was cleared anyway, and when we retried a save, `_getSaveCommand()` would not return any route and the save was ignored. Now, we only clear `linesToSave` after the rpc succeed, or there is no route. --- BEFORE FIX: https://watch.screencastify.com/v/IhS2jRLx9nOBEtTVfMPs AFTER FIX: https://watch.screencastify.com/v/VwlgnZbFyEVjJDCBZFgI --- OPW-3302173 Forward-Port-Of: odoo/enterprise#40899
Original PR description
In the case were the save rpc call fails (unstable Wifi for example), linesToSave was cleared anyway, and when we retried a save, `_getSaveCommand()` would not return any route and the save was ignored. Now, we only clear `linesToSave` after the rpc succeed, or there is no route. --- BEFORE FIX: https://watch.screencastify.com/v/IhS2jRLx9nOBEtTVfMPs AFTER FIX: https://watch.screencastify.com/v/VwlgnZbFyEVjJDCBZFgI --- OPW-3302173 Forward-Port-Of: odoo/enterprise#40899
Related community PR: https://github.com/odoo/odoo/pull/118360 Steps to reproduce: - Install mrp_workorder - Create Product P1, Workcenter W1 - Edit W1 > Specific capacities > Add line: Product = P1, Start time = 5, End time = 5 - Create BoM > Product: P1, Operations tab > Add line: Workcenter = WC1, Default duration = 60:00 min > Save - Click on overview stat button Issue: The created operation has expected time of 60:00, instead of 70:00. The workcenter start and stop times are
Original PR description
Related community PR: https://github.com/odoo/odoo/pull/118360 Steps to reproduce: - Install mrp_workorder - Create Product P1, Workcenter W1 - Edit W1 > Specific capacities > Add line: Product = P1, Start time = 5, End time = 5 - Create BoM > Product: P1, Operations tab > Add line: Workcenter = WC1, Default duration = 60:00 min > Save - Click on overview stat button Issue: The created operation has expected time of 60:00, instead of 70:00. The workcenter start and stop times are considered in this calculation, so the workcenter capacities should be considered too. Solution: Use `_get_expected_duration` to compute the expected duration. opw-3229485 Forward-Port-Of: odoo/enterprise#39669