Monday, January 24, 2022
23 changes · master
Enhancements to existing features
Recruitment now includes a dedicated Interviewer access level that is assigned automatically when someone is added as an interviewer on a job or application. Interviewers can only view the applications relevant to them, and sensitive chatter content is hidden to better protect confidential hiring information.
Original PR description
Create a new Interviewer access rights. This right is automatically given to users that are added as Interviewers on a Job Position or on an Application. An interviewer can only access applications they are interviewer for, and the chatter is disabled for them as it might contain some sensitive information (salary details, contract link, etc.) TaskID: 2669730 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
The database manager now has automated test coverage for key screens and database operations, reducing the risk of future breakages in this sensitive administration area. Updating the master password is also safer because it no longer rewrites unrelated configuration settings unexpectedly.
Original PR description
Implements test coverage for the database manager screens, which are "meta" tools that were not previously covered by the standard test suite. They require control of the super-admin password, and perform database management operations that are normally under control of the CI system. Also modifies the way the config is saved after setting the master password in order to avoid to add config parameters unexpectedly.
This update simplifies the internal setup for media link editing in the website editor now that earlier compatibility precautions are no longer needed. It keeps the feature easier to maintain in future versions without changing the expected user experience.
Original PR description
As we added the media link tool in a stable release (15.0) with [1], we had to make sure that there would be no cache issues. We don't have to worry about that for the next version so the code is simplified with this commit. [1] odoo#79295 -- task-2666467 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Recruitment interviewers now see fewer action buttons and are blocked from actions outside their role. This keeps hiring workflows clearer and helps ensure only authorized HR users can perform sensitive recruitment-related steps.
Original PR description
PR odoo/odoo#78622 introduced the notion of Recruitment Interviewers, this commit hides / denies action for them. TaskID: 2669730
Resolved issues and error corrections
This update keeps linked add-on folder paths intact so Odoo can still find and serve related static files. It prevents file access problems when add-ons are stored through symbolic links outside the configured add-ons path.
Original PR description
resolving the links may block reading static files if real path doesn't belong to addons_path. The problem is introduced on refactoring of the `load_manifest` function odoo@2e29a93
Features or functions removed from Odoo
An obsolete field setting has been removed after the related migration was completed. This simplifies the underlying system and reduces maintenance of unused code without expected impact for regular users.
Original PR description
It was only used one time. We don't want to keep useless fields anymore, the migration is done for that.
Code cleanup and technical improvements
This update corrects misspelled internal function names related to the email and web editor components. It does not change what users can do, but it improves code clarity and maintainability for future work.
Original PR description
This properly renames the functions `_createWysiwygIntance` and `_restartWysiwygIntance` to, respectively, `_createWysiwygInstance` and `_restartWysiwygInstance` since they both had a typo in them and it's triggering all of our OCDs. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
This commit restores the cache on the document that was lost with the new parsing system [1]. It allows for faster convertion to inline styles after the first time on the same document. [1] https://github.com/odoo/odoo/commit/10e749537186dfb80aee1f2537f3b5804f66cfe5#diff-5922d38ff6520249ff5b3a3240eebc350c6f9f4d9f486d512128c23261c45841L19 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#83097
Original PR description
This commit restores the cache on the document that was lost with the new parsing system [1]. It allows for faster convertion to inline styles after the first time on the same document. [1] https://github.com/odoo/odoo/commit/10e749537186dfb80aee1f2537f3b5804f66cfe5#diff-5922d38ff6520249ff5b3a3240eebc350c6f9f4d9f486d512128c23261c45841L19 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#83097
This fix ensures EU fiscal positions are applied only when the customer has a valid VAT number from another EU country and the goods are actually shipped out of the origin country. This helps businesses apply the correct tax treatment when orders use a separate delivery address, reducing VAT compliance mistakes.
Original PR description
The goal is to ensure that 2 conditions are met for a fiscal position to be applied (within the EU): - The customer must have a valid VAT number from another EU Member State - The goods must leave the country of origin Task: 2596204 Forward-Port-Of: odoo/odoo#75033
Commit [1] changed the data-target used by new indicators for no apparent reason. That broke their behavior. [1]: https://github.com/odoo/odoo/commit/33b74a0fba8915766753474acb629616a1d0f6b2 Forward-Port-Of: odoo/odoo#83113
Original PR description
Commit [1] changed the data-target used by new indicators for no apparent reason. That broke their behavior. [1]: https://github.com/odoo/odoo/commit/33b74a0fba8915766753474acb629616a1d0f6b2 Forward-Port-Of: odoo/odoo#83113
### Description of the issue/feature this PR addresses: When calling `/shop` route (or any similar one), big files (for eg. image_1920) are read while they shouldn't. The render of shop route triggers the method `_get_combination_info` and this method is reading all the big files just to know if they are there. The problem is big if for those files you have some kind of latency (for eg. nfs storage or using https://github.com/camptocamp/odoo-cloud-platform/tree/13.0/attachment_s3) I'm no
Original PR description
### Description of the issue/feature this PR addresses: When calling `/shop` route (or any similar one), big files (for eg. image_1920) are read while they shouldn't. The render of shop route…
### Description of the issue/feature this PR addresses:
When calling `/shop` route (or any similar one), big files (for eg. image_1920) are read while they shouldn't.
The render of shop route triggers the method `_get_combination_info` and this method is reading all the big files just to know if they are there.
The problem is big if for those files you have some kind of latency (for eg. nfs storage or using https://github.com/camptocamp/odoo-cloud-platform/tree/13.0/attachment_s3)
I'm not sure which would be the proper way to fix this. (clearly not as done on this PR)
This is the how methods are called
```
/home/odoo/custom/odoo/addons/website/models/ir_ui_view.py(344)render()
-> return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext)
/home/odoo/custom/odoo/addons/web_editor/models/ir_ui_view.py(27)render()
-> return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
/home/odoo/custom/odoo/odoo/addons/base/models/ir_ui_view.py(1199)render()
-> return self.env[engine].render(self.id, qcontext)
/home/odoo/custom/odoo/odoo/addons/base/models/ir_qweb.py(58)render()
-> result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
/home/odoo/custom/odoo/odoo/addons/base/models/qweb.py(260)render()
-> self.compile(template, options)(self, body.append, values or {})
/home/odoo/custom/odoo/odoo/addons/base/models/qweb.py(333)_compiled_fn()
-> return compiled(self, append, new, options, log)
<template>(1)template_website_sale_products_52()
<template>(2)body_call_content_50()
<template>(88)foreach_46()
<template>(89)foreach_45()
/home/odoo/custom/odoo/odoo/addons/base/models/qweb.py(333)_compiled_fn()
-> return compiled(self, append, new, options, log)
<template>(1)template_website_sale_products_item_3018()
/home/odoo/custom/odoo/addons/website_sale_stock/models/product_template.py(22)_get_combination_info()
-> parent_combination=parent_combination, only_template=only_template)
/home/odoo/custom/odoo/addons/website_sale/models/product.py(286)_get_combination_info()
-> parent_combination=parent_combination, only_template=only_template)
/home/odoo/custom/odoo/addons/sale/models/product_template.py(246)_get_combination_info()
-> display_image = bool(product_template.image_1920)
/home/odoo/custom/odoo/odoo/fields.py(1045)__get__()
-> recs._fetch_field(self)
/home/odoo/custom/odoo/odoo/models.py(3002)_fetch_field()
-> self._read(fnames)
/home/odoo/custom/odoo/odoo/models.py(3102)_read()
-> field.read(fetched)
/home/odoo/custom/odoo/odoo/fields.py(2013)read()
-> for att in records.env['ir.attachment'].sudo().search(domain)}
/home/odoo/custom/odoo/odoo/fields.py(2013)<dictcomp>()
-> for att in records.env['ir.attachment'].sudo().search(domain)}
/home/odoo/custom/odoo/odoo/fields.py(1062)__get__()
-> self.compute_value(recs)
/home/odoo/custom/odoo/odoo/fields.py(1981)compute_value()
-> super().compute_value(records_no_bin_size)
/home/odoo/custom/odoo/odoo/fields.py(1147)compute_value()
-> records._compute_field_value(self)
/home/odoo/custom/odoo/odoo/models.py(4018)_compute_field_value()
-> getattr(self, field.compute)()
/home/odoo/custom/odoo/odoo/addons/base/models/ir_attachment.py(199)_compute_datas()
-> attach.datas = self._file_read(attach.store_fname, bin_size)
```
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#83181
Forward-Port-Of: odoo/odoo#81767Current behavior: When using a Tax that has no account linked to it, you were not able to close the PoS Steps to reproduce: - Create: tax computation: FIXED - Create product with this new tax, set price, set available in POS (invoice policy: ordered quantity) - Create sales order, add product: tax is added. Create invoice: tax is added - Open POS, sell product, select payment. - When closing the POS session an error message is generated opw-2725106 Description of the issue/feature
Original PR description
Current behavior: When using a Tax that has no account linked to it, you were not able to close the PoS Steps to reproduce: - Create: tax computation: FIXED - Create product with this new tax, set price, set available in POS (invoice policy: ordered quantity) - Create sales order, add product: tax is added. Create invoice: tax is added - Open POS, sell product, select payment. - When closing the POS session an error message is generated opw-2725106 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#82948
Steps : - Upload logo of company - Attendance > Kiosk mode Issue : - Logo is distorded Cause : - width is set, but not height Fix : - height : auto to adjust height to width. opw-2739471 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#83196
Original PR description
Steps : - Upload logo of company - Attendance > Kiosk mode Issue : - Logo is distorded Cause : - width is set, but not height Fix : - height : auto to adjust height to width. opw-2739471 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#83196
In some undetermined circumstance in chrome, the selection rect is wrongly defined. Task-2728792 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82276
Original PR description
In some undetermined circumstance in chrome, the selection rect is wrongly defined. Task-2728792 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82276
The colorpicker failed in cases like: ```xml <font>a<span>b</span>c</font> ``` where we select the letter "b". This was because `applyColor` only considered direct children of the `font` element. This extends it to deal with further descendants of it. The editor toolbar button to trigger the colorpicker is supposed to show the color of the currently selected text. This was failing in iframes because the code was called on the wrong document. task-2623347 -- I confirm I have signed
Original PR description
The colorpicker failed in cases like: ```xml <font>a<span>b</span>c</font> ``` where we select the letter "b". This was because `applyColor` only considered direct children of the `font` element. This extends it to deal with further descendants of it. The editor toolbar button to trigger the colorpicker is supposed to show the color of the currently selected text. This was failing in iframes because the code was called on the wrong document. task-2623347 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82144
When the user-select is none in firefox, it is impossible to select the text even if the content is editable. Task-2716365 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82257
Original PR description
When the user-select is none in firefox, it is impossible to select the text even if the content is editable. Task-2716365 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82257
- The align-self and justify-content styles don't work on cells so when converting a Bootstrap column to a table cell, we should also apply a vertical alignment. The same applies to align-items on rows. - The conversion from rem to px was rounding the value to 1 decimal place but the browser handles up to 2 decimal places. As a result there were visible inconsistencies in the conversion (12.25px in the original becoming 12.3px in the converted email). - When converting from grid to tables, we
Original PR description
- The align-self and justify-content styles don't work on cells so when converting a Bootstrap column to a table cell, we should also apply a vertical alignment. The same applies to align-items on…
- The align-self and justify-content styles don't work on cells so when converting a Bootstrap column to a table cell, we should also apply a vertical alignment. The same applies to align-items on rows. - The conversion from rem to px was rounding the value to 1 decimal place but the browser handles up to 2 decimal places. As a result there were visible inconsistencies in the conversion (12.25px in the original becoming 12.3px in the converted email). - When converting from grid to tables, we need to convert values from x/12 to x/100. The rounding error was a little too big, making it too visible at times. With this commit we now round to 2 decimal places instead of rounding to the nearest integer. - When fonts with a round border were converted to images, the dimensions often ended up slightly off, and most visibly a little bit cropped by the border. Note that this also removes the "alpha" argument of the font_to_img route since it wasn't used anywhere and transparency is not supported in emails anyway. - The mail-safe font is applied to a style in <head> for emails. But the way it was applied, <div>s were forgotten. Since most of those are converted to tables when converting body_arch to body_html, it resulted in visible font differences between body_arch and body_html. - When converting, we ensure each table has a tbody but inadvertently were wrapping each <tr> in a separate tbody rather than wrapping all the contents of the table. - Cards need to be double wrapped in tables to be displayed properly because of a bizarre hack by bootstrap that uses background-color rather to give the effect of a border, and because we can have card-body be a sibling of a list-group. Incidentally this also prevents the introduction of a new row for each whitespace text node. - The conversion of padding from grids to their equivalent tables was sometimes faulty due to an error in the evaluation of the cell's position within the table. - Images sometimes shrunk on conversion because of a parenthesis error in a conditional chain, because dimensions set via element attributes should be preserved, and because the offset height should be used rather than the element height as returned by jQuery. - The conversion process of emails for mail clients involves retrieving the dimensions of images and icons in order set them as element attributes. This can however not possibly work if they are invisible at the time of conversion. This therefore makes sure they are visible by changing the visibility of whichever parent was invisible before conversion and restoring it when we're done. Enterprise PR: https://github.com/odoo/enterprise/pull/23249 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#83164 Forward-Port-Of: odoo/odoo#82233
Steps to reproduce the bug: - Create a SO with 1 day of the "Senior Architect" and confirm it - A project P and a task T are automatically created - Record multiple timesheets for T Bug: The remaining hours was wrong PS: qty_delivered was already computed in timesheet_encode_uom_id opw:2731384 Forward-Port-Of: odoo/odoo#83241
Original PR description
Steps to reproduce the bug: - Create a SO with 1 day of the "Senior Architect" and confirm it - A project P and a task T are automatically created - Record multiple timesheets for T Bug: The remaining hours was wrong PS: qty_delivered was already computed in timesheet_encode_uom_id opw:2731384 Forward-Port-Of: odoo/odoo#83241
- The media list snippet was recently adapted to not include padding around its images. The newsletter template however was not adapted to reflect that change. That commit remedies that. - Lazy loading of images makes it so that sometimes images are not yet loaded when their dimensions are computed. Community PR: https://github.com/odoo/odoo/pull/82233 Forward-Port-Of: odoo/enterprise#23645 Forward-Port-Of: odoo/enterprise#23249
Original PR description
- The media list snippet was recently adapted to not include padding around its images. The newsletter template however was not adapted to reflect that change. That commit remedies that. - Lazy loading of images makes it so that sometimes images are not yet loaded when their dimensions are computed. Community PR: https://github.com/odoo/odoo/pull/82233 Forward-Port-Of: odoo/enterprise#23645 Forward-Port-Of: odoo/enterprise#23249
1. On a Colombian Company, create a Bill, add a CteFte tax to it, register a payment. 2. Go to Reports, Certificado de Retención en Fuente 3. Expan one Partner and print a preview The original article or added information will not appear on the report. This information is necessary for legal purposes in Colombia because this is the legal basis on which the report is based. This occur only when creating the pdf. HTML report is correct. It seems wkhtmltopdf has issues with the row/div a
Original PR description
1. On a Colombian Company, create a Bill, add a CteFte tax to it, register a payment. 2. Go to Reports, Certificado de Retención en Fuente 3. Expan one Partner and print a preview The original article or added information will not appear on the report. This information is necessary for legal purposes in Colombia because this is the legal basis on which the report is based. This occur only when creating the pdf. HTML report is correct. It seems wkhtmltopdf has issues with the row/div arrangment in this report because the report will also look shrinked opw-2684048 Forward-Port-Of: odoo/enterprise#23650
Before this commit, the user was blocked if there was a network issue and he couldn't send his requests to Fiskaly. He couldn't proceed and get a non-compliant receipt. This commit adapts the code made by 26fd276c45bac192e7d814fb0055bd2eb1920f56 in order to properly handle the error when sending requests to Fiskaly. The user is no longer blocked if there's a connection issue. Forward-Port-Of: odoo/enterprise#23520
Original PR description
Before this commit, the user was blocked if there was a network issue and he couldn't send his requests to Fiskaly. He couldn't proceed and get a non-compliant receipt. This commit adapts the code made by 26fd276c45bac192e7d814fb0055bd2eb1920f56 in order to properly handle the error when sending requests to Fiskaly. The user is no longer blocked if there's a connection issue. Forward-Port-Of: odoo/enterprise#23520
If a linkedin account has several roles in the same organization, the same organization will be added several times on odoo (streams, accounts). This pr avoids this case and checks that the organizations are "APPROVED" before adding them opw-2696038 Forward-Port-Of: odoo/enterprise#23567 Forward-Port-Of: odoo/enterprise#23543
Original PR description
If a linkedin account has several roles in the same organization, the same organization will be added several times on odoo (streams, accounts). This pr avoids this case and checks that the organizations are "APPROVED" before adding them opw-2696038 Forward-Port-Of: odoo/enterprise#23567 Forward-Port-Of: odoo/enterprise#23543
**Steps to follow** - Use a database with account_accountant and demo data - Set the language as French (CH) - Go to Comtabilité > Bank (Lettrer) - Click on the first Azure interior invoice - Click on 'Opérations manuelles' -> Uncaught Error: `2'000.00` n'est pas un nombre décimal correct **Cause of the issue** Since https://github.com/odoo/odoo/commit/e89b626f5411b7836030c6daa940b41f65747843 , the formatMonetary return value is escaped. With the French (CH) l
Original PR description
**Steps to follow** - Use a database with account_accountant and demo data - Set the language as French (CH) - Go to Comtabilité > Bank (Lettrer) - Click on the first Azure interior invoice - Click on 'Opérations manuelles' -> Uncaught Error: `2'000.00` n'est pas un nombre décimal correct **Cause of the issue** Since https://github.com/odoo/odoo/commit/e89b626f5411b7836030c6daa940b41f65747843 , the formatMonetary return value is escaped. With the French (CH) language, a single quote is then transformed to `'` **Solution** Unescape the result of `formatMonetary` before passing it to `parseMonetary` opw-2729789 Forward-Port-Of: odoo/enterprise#23498