Monday, January 6, 2025
19 changes · saas-17.4
Resolved issues and error corrections
Some delivery pickup/location selection text on the website was not being translated for shoppers. The change makes those labels available in the website sales area so customers see them in their selected language.
Original PR description
There are some terms that are defined in `delivery` module but are not translated when you see them on the website. This happens because these strings are defined in the `delivery` module, which is not a frontend module. This commit redefines those strings in the `website_sale` module, which is a frontend module. Task-4328208 OPW-4403072 OPW-4326840
Live chat demo conversations now correctly show visitor messages as coming from “Visitor” instead of “Odoobot.” This makes demo data clearer and avoids confusion when showcasing or testing the live chat experience.
Original PR description
**Current behavior before PR:** Messages posted by visitors in demo data incorrectly displayed the author name as `Odoobot` instead of `Visitor`. This happened because the messages created for visitors in the demo data do not have the `author_id` field explicitly set to `False`, leading the `_message_compute_author()` method to compute the author incorrectly. **Desired behavior after PR is merged:** Messages posted by visitors in demo data correctly display the author name as Visitor. Task-[4420677](https://www.odoo.com/odoo/project/1519/tasks/4420677) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Point of Sale order report now excludes cancelled orders by default. This helps business users see more accurate sales reporting without cancelled transactions inflating or confusing the results.
Original PR description
Cancelled order should be ignored by default in the POS order report. Steps to reproduce: ------------------- * Open PoS create an order and go back to the backedn * Open the PoS again and close the PoS, it will cancel the order > Observation: Open PoS order report, it will include the cancelled order, that can be missleading. Why the fix: ------------ We add a new default filter that apply a domain to exclude the cancelled order from the report. opw-4257734
Non-Sales users can now open product Kanban views without hitting an access error related to subscription pricing. The view now only shows subscription pricing details to users with Sales permissions, avoiding disruption for Inventory and other users.
Original PR description
Steps to reproduce: ------------------- - Install sale_subscription and inventory. - Create a subscription product. - Log in as a non-Sales user (e.g., Inventory user). - Access the product list in Kanban view.(from stock) Issue: ------- Non-Sales users encounter an AccessError when the Kanban view attempts to read product_subscription_pricing_ids. This is due to: - "record.product_subscription_pricing_ids.raw_value.length" Attempted to be computed even if the user does not have the access rights. Fix: ----- Updated the Kanban view to conditionally render subscription pricing fields only for users in the Sales group. opw-4404190
Miscellaneous changes
Changing a product template's image with the `can_image_1024_be_zoomed` field present in the view produces a crash on save. **STEPS TO REPRODUCE** 1. Open a product form view 2. Using studio, add the `can_image_1024_be_zoomed` field 3. Change the image and save The product will be updated, but this error will be thrown: ``` binascii.Error: Incorrect padding ``` **CAUSE** https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/product/models/product_tem
Original PR description
Changing a product template's image with the `can_image_1024_be_zoomed` field present in the view produces a crash on save. **STEPS TO REPRODUCE** 1. Open a product form view 2. Using studio, add the…
Changing a product template's image with the `can_image_1024_be_zoomed` field present in the view produces a crash on save. **STEPS TO REPRODUCE** 1. Open a product form view 2. Using studio, add the `can_image_1024_be_zoomed` field 3. Change the image and save The product will be updated, but this error will be thrown: ``` binascii.Error: Incorrect padding ``` **CAUSE** https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/product/models/product_template.py#L186-L188 In the `RecordSet`'s context, `bin_size=True`, so accessing `image_<size>` returns a size instead of a binary. `_compute_can_image_1024_be_zoomed` calls `tools.is_image_size_above` with this binary size, while the method expects the full base64 encoded image. Ultimately, this causes `base64.b64decode` to crash with the above error. **FIX** Update the `RecordSet`'s context to `bin_size=False`. Accessing `image_<size>` from the `RecordSet` will then return the full binary instead of the size. **NOTES** In versions <17.0, read and write were done in separate network calls causing the recompute to happen during the flush of the write, which doesn't have `bin_size=True` in the context. Because the field is stored, the read will not cause a recompute and thus avoids any error. In >=17.0, because the read occurs before the flush, and the write has invalidated the field, the recompute will occur with the context of the read (`bin_size=True`), causing the issue. opw-4413647 Forward-Port-Of: odoo/odoo#192047
[FIX] portal, point_of_sale: return new instance of fields list This commit contains a backport of https://github.com/odoo/odoo/commit/1e39d5c2e5f4d4c77b0190ea1eb4781e2143657f to fix the following issue: In the l10n_mx localization, the field RFC(VAT) and zipcode should be required to prevent the field from being defaulted to "public en general". How to reproduce: -Install l10n_mx -Go to POS and sell an article to generate the ticket -Go to the POS portal to request an invoice -Fill
Original PR description
[FIX] portal, point_of_sale: return new instance of fields list This commit contains a backport of https://github.com/odoo/odoo/commit/1e39d5c2e5f4d4c77b0190ea1eb4781e2143657f to fix the following issue: In the l10n_mx localization, the field RFC(VAT) and zipcode should be required to prevent the field from being defaulted to "public en general". How to reproduce: -Install l10n_mx -Go to POS and sell an article to generate the ticket -Go to the POS portal to request an invoice -Fill all the fields except for RFC -Odoo does not request this field and allows the client to submit the information -The invoice will be generated to "public en general" and not to the client requesting the invoice (Expected when there is no RFC) opw-4332357 enterprise pr: https://github.com/odoo/enterprise/pull/74072 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191989 Forward-Port-Of: odoo/odoo#187674
to reproduce: ============= - create a leave for an employee of 3 days - create a public holiday that happens to be in the middle of the employee leave - check work entries for the employee on that period -> only work entries of the public holiday are created Problem: ======== - when the public holiday was created, the leave was not split to take into account the public holiday Solution: ========= - split the leave to take into account the public holiday opw-4353988 --- I co
Original PR description
to reproduce: ============= - create a leave for an employee of 3 days - create a public holiday that happens to be in the middle of the employee leave - check work entries for the employee on that period -> only work entries of the public holiday are created Problem: ======== - when the public holiday was created, the leave was not split to take into account the public holiday Solution: ========= - split the leave to take into account the public holiday opw-4353988 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192376 Forward-Port-Of: odoo/odoo#191552
This commit uses the `inset-inline-start` CSS property instead of `left` to account for RTL languages. (No linked task) Forward-Port-Of: odoo/odoo#191342
Original PR description
This commit uses the `inset-inline-start` CSS property instead of `left` to account for RTL languages. (No linked task) Forward-Port-Of: odoo/odoo#191342
Since [1], when an extra menu is displayed due to the top menu exceeding its maximum width, the active class is no longer applied correctly. This issue was introduced during the conversion from jQuery to vanilla JavaScript. Steps to reproduce: - Enter the Website in edit mode. - Navigate to Site > Menu Editor. - Add several menu items until the menu exceeds its maximum width. - Ensure that one of the items in the extra menu redirects to "Contact Us". - Click on the "Contact Us" menu it
Original PR description
Since [1], when an extra menu is displayed due to the top menu exceeding its maximum width, the active class is no longer applied correctly. This issue was introduced during the conversion from jQuery to vanilla JavaScript. Steps to reproduce: - Enter the Website in edit mode. - Navigate to Site > Menu Editor. - Add several menu items until the menu exceeds its maximum width. - Ensure that one of the items in the extra menu redirects to "Contact Us". - Click on the "Contact Us" menu item. - Open the dropdown menu (via the "+" icon) and observe that the "Contact Us" entry is not highlighted. This commit resolves the problem. [1]: https://github.com/odoo/odoo/commit/0de634965a0dec4470b30154f3722a1e83b0e866 task-4428845 opw-4383641 Forward-Port-Of: odoo/odoo#192164 Forward-Port-Of: odoo/odoo#191548
Currently, a traceback is occurring when the user tries to delete archived product variants. To reproduce this issue: 1) Install sale and enable product variants from configuration 2) Create a product from the variant and archive it 3) Now try to delete the above archived product. Error:- ``` KeyError: 2 ``` When the user archives a product and tries to delete the archived product, we get the `product_ids_by_template_id` as an empty dict. https://github.com/odoo/odoo/blob
Original PR description
Currently, a traceback is occurring when the user tries to delete archived product variants. To reproduce this issue: 1) Install sale and enable product variants from configuration 2) Create a product from the variant and archive it 3) Now try to delete the above archived product. Error:- ``` KeyError: 2 ``` When the user archives a product and tries to delete the archived product, we get the `product_ids_by_template_id` as an empty dict. https://github.com/odoo/odoo/blob/f118a44c5b15163556e3388c5a7daa72119f58f8/addons/product/models/product_product.py#L384-L388 This leads to the above traceback when accessing the product template id from an empty dict from the below line. https://github.com/odoo/odoo/blob/f118a44c5b15163556e3388c5a7daa72119f58f8/addons/product/models/product_product.py#L395 sentry-6173505059 Forward-Port-Of: odoo/odoo#191761
Before this commit, "search more" would not find any matches if searching partners by VAT numbers. After this commit, it becomes possible to search and "load more" partners by VAT number. opw-4379852 Forward-Port-Of: odoo/odoo#190621 Forward-Port-Of: odoo/odoo#189703
Original PR description
Before this commit, "search more" would not find any matches if searching partners by VAT numbers. After this commit, it becomes possible to search and "load more" partners by VAT number. opw-4379852 Forward-Port-Of: odoo/odoo#190621 Forward-Port-Of: odoo/odoo#189703
Base users do not have access to the model `spreadsheet.revision` which is directly affected in a collaborative context. The usual flow consists to give access to the revisions once we check the access rights on the related spreadsheet. The code that handled the restoration of previous versions did not follow this flow and base users would face access errors. Task-4397512 Forward-Port-Of: odoo/enterprise#75474
Original PR description
Base users do not have access to the model `spreadsheet.revision` which is directly affected in a collaborative context. The usual flow consists to give access to the revisions once we check the access rights on the related spreadsheet. The code that handled the restoration of previous versions did not follow this flow and base users would face access errors. Task-4397512 Forward-Port-Of: odoo/enterprise#75474
Forward-Port-Of: odoo/enterprise#76430
Original PR description
Forward-Port-Of: odoo/enterprise#76430
Before this commit, spans with no attribute and no special style were unwrapped by the OdooEditor, meaning the span itself disappeared, leaving its content in the parent element. This behavior breaks translations, as the whole span is used as a key to match translations After this commit, those spans are not removed. opw-3746922 opw-4318712 [++] Forward-Port-Of: odoo/enterprise#76000 Forward-Port-Of: odoo/enterprise#75962
Original PR description
Before this commit, spans with no attribute and no special style were unwrapped by the OdooEditor, meaning the span itself disappeared, leaving its content in the parent element. This behavior breaks translations, as the whole span is used as a key to match translations After this commit, those spans are not removed. opw-3746922 opw-4318712 [++] Forward-Port-Of: odoo/enterprise#76000 Forward-Port-Of: odoo/enterprise#75962
Steps to reproduce - Activate developer mode - Go to Accounting -> Configuration -> Accounting Reports - Create a composite report with 2 existing reports that have the "filter_unfold_all" activated, i.e. "Balance Sheet" and "Profit and Loss" - Create a menu item in the action of the report - Open the report - Press the filter "Unfold All" - Press the "PDF" button -> Results: the pdf has no line unfolded while they should (the web UI works as expected) Reason of the issue
Original PR description
Steps to reproduce - Activate developer mode - Go to Accounting -> Configuration -> Accounting Reports - Create a composite report with 2 existing reports that have the "filter_unfold_all" activated,…
Steps to reproduce - Activate developer mode - Go to Accounting -> Configuration -> Accounting Reports - Create a composite report with 2 existing reports that have the "filter_unfold_all" activated, i.e. "Balance Sheet" and "Profit and Loss" - Create a menu item in the action of the report - Open the report - Press the filter "Unfold All" - Press the "PDF" button -> Results: the pdf has no line unfolded while they should (the web UI works as expected) Reason of the issue: In the dispatch_report_action() function, the get_options() was wrong and unnecessary. This function is first called on the first section, then called on the composite report with its own options. This led to use the options of the composite report which does not have the filter_unfold_all field set to True. This also handles the case where a composite report has reports A and B, A having the filter_unfold_all while B doesn't have it. The expected result when printing it is that only report A has unfolded lines. task-4317649 Forward-Port-Of: odoo/enterprise#74826
Add missing english labels for the `l10n_mx_nationality` and `l10n_mx_type_of_operation`fields.  task-no Forward-Port-Of: odoo/enterprise#76055 Forward-Port-Of: odoo/enterprise#76038
Original PR description
Add missing english labels for the `l10n_mx_nationality` and `l10n_mx_type_of_operation`fields.  task-no Forward-Port-Of: odoo/enterprise#76055 Forward-Port-Of: odoo/enterprise#76038
Steps to reproduce: initial state: The accounting report "General Ledger" has the filter "unfold all" option activated and this filter can be selected on the report. - Create a new accounting report - Select "Composite Report" - Add the General Ledger as a section - Save -> When navigating to the General Ledger, it no longer has the "unfold all" option selected. Solution provided: If the report is accessible, should not change its fields when being added to a composite rep
Original PR description
Steps to reproduce: initial state: The accounting report "General Ledger" has the filter "unfold all" option activated and this filter can be selected on the report. - Create a new accounting report - Select "Composite Report" - Add the General Ledger as a section - Save -> When navigating to the General Ledger, it no longer has the "unfold all" option selected. Solution provided: If the report is accessible, should not change its fields when being added to a composite report. task-4317649 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188476
Steps to reproduce: - Install hr_timesheet (with demo data) - Navigate to portal > timesheet - Group by project Issue: When only the hr_timesheet module is installed and timesheets are grouped in the portal view, the column alignment is broken due to an incorrect colspan. Cause: When groupby is applied, the colspan is manually set to 4, causing misalignment between the header and row columns. Fix: This commit sets the last column's colspan to 2 when grouping is applied to fix th
Original PR description
Steps to reproduce: - Install hr_timesheet (with demo data) - Navigate to portal > timesheet - Group by project Issue: When only the hr_timesheet module is installed and timesheets are grouped in the portal view, the column alignment is broken due to an incorrect colspan. Cause: When groupby is applied, the colspan is manually set to 4, causing misalignment between the header and row columns. Fix: This commit sets the last column's colspan to 2 when grouping is applied to fix the alignment issue. task-4294780 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186532
Scenario: - install l10n_ch - go to /report/barcode/?barcode_type=QR&value=&width=150&height=150&mask=ch_cross => the ch_cross mask (swiss cross that should be in the center) is not in the center Issue: Reportlab QrCodeWidget has a fixed size to 32mm (with mm that is 72(ppi) / 25.4(1mm to inch) so ~2.83 pixels) and to get the widget to the full size, a zoom is applied on the Drawing content (so on the QrCodeWidget). Here are the zoom that are applied for several Drawing size:
Original PR description
Scenario: - install l10n_ch - go to /report/barcode/?barcode_type=QR&value=&width=150&height=150&mask=ch_cross => the ch_cross mask (swiss cross that should be in the center) is not in the center…
Scenario: - install l10n_ch - go to /report/barcode/?barcode_type=QR&value=&width=150&height=150&mask=ch_cross => the ch_cross mask (swiss cross that should be in the center) is not in the center Issue: Reportlab QrCodeWidget has a fixed size to 32mm (with mm that is 72(ppi) / 25.4(1mm to inch) so ~2.83 pixels) and to get the widget to the full size, a zoom is applied on the Drawing content (so on the QrCodeWidget). Here are the zoom that are applied for several Drawing size: - for 100 pixels: 100 / (32 * mm) => 1.012… - for 256 pixels: 256 / (32 * mm) => 2.822… - for 400 pixels: 400 / (32 * mm) => 4.409… But in the code, the zoom is just hardcoded to mm (~2.83) which corresponds to a barcode size of mm * 32 * mm => 257.127 pixels which is kind of good enough for 256 pixels, but wrong for most other size. In base code we only use 256 x 256 pixels so this is not much of an issue unless someone want to use it for something else. Fix: With this commit, we apply the Drawing zoom (on which we have the QrCodeWidget) to the ch_cross image. Note: Without the fix, the added test only fail on the third assertion for each loop iteration, the farer we are from 257x257 pixels the bigger the error is, for example for 256x256: Result: (38.45140, 38.45140, 52.25725984251969, 52.25725984251969) Expected: (38.28288, 38.28288, 52.02823111111111, 52.02823111111111) opw-4307177 PR NOTE: this could be merged in an higher version, and we could also just not fix this since as far as I can tell, we only need to support 256x256 and with and without the fix there is just one pixel of difference in this case.  Forward-Port-Of: odoo/odoo#192091