Monday, June 3, 2024
8 changes · saas-17.2
Enhancements to existing features
The CRM calling module’s automated tests were moved to a newer testing framework. This helps maintain test reliability and makes future updates easier without changing end-user functionality.
Original PR description
Purpose of this PR: To Convert the qunit testcases to hoot. Part of: [3818666](https://www.odoo.com/web#id=3818666&cids=2&menu_id=4720&action=333&active_id=1519&model=project.task&view_type=form)
Miscellaneous changes
Steps: - Create a database on SaaS - Activate debug mode - Load demo data if not enabled - Install l10n_be_hr_contract_salary Actual result: - Module l10n_be_hr_contract_salary installed - Demo data not loaded properly, traceback Expected result - Module l10n_be_hr_contract_salary installed - Demo data loaded opw-3930487 Forward-Port-Of: odoo/enterprise#63433 Forward-Port-Of: odoo/enterprise#63328
Original PR description
Steps: - Create a database on SaaS - Activate debug mode - Load demo data if not enabled - Install l10n_be_hr_contract_salary Actual result: - Module l10n_be_hr_contract_salary installed - Demo data not loaded properly, traceback Expected result - Module l10n_be_hr_contract_salary installed - Demo data loaded opw-3930487 Forward-Port-Of: odoo/enterprise#63433 Forward-Port-Of: odoo/enterprise#63328
Steps to reproduce ================== - Create a new model with studio - Go to the contaxt form view - Add a new many2one field linked to the newly created model - Exit studio - Create a new contact - Type something in the many2one field - Click on Create an Edit => The name should be kept Cause of the issue ================== Studio models uses x_name as the _rec_name opw-3919262 Forward-Port-Of: odoo/enterprise#63362 Forward-Port-Of: odoo/enterprise#62424
Original PR description
Steps to reproduce ================== - Create a new model with studio - Go to the contaxt form view - Add a new many2one field linked to the newly created model - Exit studio - Create a new contact - Type something in the many2one field - Click on Create an Edit => The name should be kept Cause of the issue ================== Studio models uses x_name as the _rec_name opw-3919262 Forward-Port-Of: odoo/enterprise#63362 Forward-Port-Of: odoo/enterprise#62424
Problem -------- https://github.com/odoo/odoo/pull/156655 hides the miscellaneous entry total if there is a discrepancy between the journal currency and journal's default account currency. This fix is not ideal as the total is the sum of the balance field (company currency), while the displayed total uses the journal currency. Since this could be a foreign bank account, the journal currency is correct. Solution -------- Sum the `amount_currency` field instead of the `balance` field.
Original PR description
Problem -------- https://github.com/odoo/odoo/pull/156655 hides the miscellaneous entry total if there is a discrepancy between the journal currency and journal's default account currency. This fix is not ideal as the total is the sum of the balance field (company currency), while the displayed total uses the journal currency. Since this could be a foreign bank account, the journal currency is correct. Solution -------- Sum the `amount_currency` field instead of the `balance` field. Caveat ------- Yes, it's possible we are summing apples and oranges as the currencies of the misc move lines may not be the same. In this case, a warning icon is displayed indicating multiple currencies. A module update is required to view this icon. https://github.com/odoo/odoo/commit/7ef468402d327855ee6323b6a7f82ac6989ee28a#r141889189 opw-3767010 Forward-Port-Of: odoo/odoo#165441
Currently, an exception is generated when the user tries to access embed view of slides by following the steps: - Install "eLearning" with a demo data - Open external embed view of slide 1 by "/slides/embed_external/1" in url Stack Trace: ``` AttributeError: 'slide.channel' object has no attribute 'website_share_url' File "<1405>", line 313, in template_1405 File "<1405>", line 151, in template_1405_content File "<1405>", line 18, in template_1405_t_call_0 QWebException: Error
Original PR description
Currently, an exception is generated when the user tries to access embed view of slides by following the steps: - Install "eLearning" with a demo data - Open external embed view of slide 1 by…
Currently, an exception is generated when the user tries to access embed view of slides by following the steps: - Install "eLearning" with a demo data - Open external embed view of slide 1 by "/slides/embed_external/1" in url Stack Trace: ``` AttributeError: 'slide.channel' object has no attribute 'website_share_url' File "<1405>", line 313, in template_1405 File "<1405>", line 151, in template_1405_content File "<1405>", line 18, in template_1405_t_call_0 QWebException: Error while render the template AttributeError: 'slide.channel' object has no attribute 'website_share_url' Template: ir.ui.view(1405,) Path: /t/html/body/div/div[2]/t[1]/t/t[4] Node: <t t-set="include_embed" t-value="True"/> ``` This error is because commit [1] added code that tries to access the 'website_share_url' field in the 'slide.channel' model in template 'embed_slide' , but it actually belongs to 'slide.slide'. This commit resolved the above issue by accessing "website_share_url" with "slide" instead of "slide.channel". [1] - https://github.com/odoo/odoo/commit/db63c03af9932ae4d9b786620e88e62ce938589a sentry-5095823727 Forward-Port-Of: odoo/odoo#159446 Forward-Port-Of: odoo/odoo#159238
Ubuntu 24.04 Noble ships werkzeug==3.0.1[^1], that version dropped some Py2/Py3 code compatibility to only support Py3. This is the case for the `iri_to_uri` function that since 3.0.0 doesn't support bytes anymore[^2]. Since Odoo 13 only supports Py3 too, it is fine to always decode the query string (which was what `iri_to_uri` was doing anyway). [^1]: https://packages.ubuntu.com/noble/python3-werkzeug [^2]: https://werkzeug.palletsprojects.com/en/3.0.x/urls/ Forward-Port-Of: odoo/odoo#1668
Original PR description
Ubuntu 24.04 Noble ships werkzeug==3.0.1[^1], that version dropped some Py2/Py3 code compatibility to only support Py3. This is the case for the `iri_to_uri` function that since 3.0.0 doesn't support bytes anymore[^2]. Since Odoo 13 only supports Py3 too, it is fine to always decode the query string (which was what `iri_to_uri` was doing anyway). [^1]: https://packages.ubuntu.com/noble/python3-werkzeug [^2]: https://werkzeug.palletsprojects.com/en/3.0.x/urls/ Forward-Port-Of: odoo/odoo#166854 Forward-Port-Of: odoo/odoo#166814
After version >= `16.4` module **repair** is **[using](https://github.com/odoo/odoo/blob/c002aad906bef390d6d7fd5c795a8e6baa5fd31d/addons/repair/models/repair.py#L571-L578)** attribute `_get_default_warehouse_id` which is **[defined](https://github.com/odoo/odoo/blob/c002aad906bef390d6d7fd5c795a8e6baa5fd31d/addons/sale_stock/models/res_users.py#L12-L17)** in module `sale_stock`. There is no dependency between that 2 modules. But as the module `sale_stock` is **autoinstall=1** and its all depen
Original PR description
After version >= `16.4` module **repair** is **[using](https://github.com/odoo/odoo/blob/c002aad906bef390d6d7fd5c795a8e6baa5fd31d/addons/repair/models/repair.py#L571-L578)** attribute…
After version >= `16.4` module **repair** is **[using](https://github.com/odoo/odoo/blob/c002aad906bef390d6d7fd5c795a8e6baa5fd31d/addons/repair/models/repair.py#L571-L578)** attribute `_get_default_warehouse_id` which is **[defined](https://github.com/odoo/odoo/blob/c002aad906bef390d6d7fd5c795a8e6baa5fd31d/addons/sale_stock/models/res_users.py#L12-L17)** in module `sale_stock`. There is no dependency between that 2 modules.
But as the module `sale_stock` is **autoinstall=1** and its all dependencies are being installed when we install `repair` the module **sale_stock** is also being installed automatically. That is why when we install **repair** we will not have any problem on using that attribute. If we uninstall that `sale_stock` we will have problem because `repair` module will not be able to find the attribute `_get_default_warehouse_id`.
For fixing the issue I added that attribute in module `stock` as it is dependent for both of `repair` and `sale_stock`, and also I use the inheritence in module `sale_stock`
**Steps to reproduce:**
1. Install `repair` on `16.0`
2. Uninstall `sale_stock`
3. Try to upgrade to `17.0`
You will error similar to this:
```
File "/home/odoo/src/odoo/17.0/addons/repair/models/repair.py", line 28, in _default_picking_type_id
return self._get_picking_type().get((self.env.company, self.env.user))
File "/home/odoo/src/odoo/17.0/addons/repair/models/repair.py", line 563, in _get_picking_type
default_warehouse = self.env.user.with_company(companies.id)._get_default_warehouse_id()
AttributeError: 'res.users' object has no attribute '_get_default_warehouse_id'
```
upg-1565705
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#166006Currently, when trying to merge a PDF generated from Google sheet in the PDF quote builder, a traceback happens due to a known problem in older versions of pypdf2. This was fixed in pypdf2 2.4.2 (see: https://github.com/py-pdf/pypdf/commit/02c601c86819578d9796479a1b8953accefea92b ) It doesn't seem to happen with other editors, and google sheet doesn't allow the use of form fields anyway. Forward-Port-Of: odoo/odoo#166901
Original PR description
Currently, when trying to merge a PDF generated from Google sheet in the PDF quote builder, a traceback happens due to a known problem in older versions of pypdf2. This was fixed in pypdf2 2.4.2 (see: https://github.com/py-pdf/pypdf/commit/02c601c86819578d9796479a1b8953accefea92b ) It doesn't seem to happen with other editors, and google sheet doesn't allow the use of form fields anyway. Forward-Port-Of: odoo/odoo#166901