Tuesday, January 24, 2023
29 changes · master
New functionality added to Odoo
Adds payroll localization for Poland, including payroll structures, salary rules, payslip reporting, demo data, and accounting setup. This helps Polish companies calculate and report payroll in Odoo using country-specific rules, while also avoiding duplicate report labels across localizations.
Enhancements to existing features
The Helpdesk dashboard action now shows both successful and failed tickets when the SLA success filter is removed. This gives teams a clearer view of ticket outcomes and opens the relevant ticket list instead of a report view.
Original PR description
Before this PR success rate action only show success ticket even after we removes SLA success filter. This PR update success rate action domain to show failed ticket also when SLA success filter is not applied.
Resolved issues and error corrections
This fix ensures Helpdesk website form editing components load in the correct website editor bundle. It prevents missing dependency errors when editing website forms, improving reliability for teams managing Helpdesk forms online.
Original PR description
See community commit for additional changes. Prior to this commit, modules that add elements (fields, references, etc.) to the website_form registry, would do so inside the `website.assets_editor`…
See community commit for additional changes. Prior to this commit, modules that add elements (fields, references, etc.) to the website_form registry, would do so inside the `website.assets_editor` bundle. It creates a module dependency error since [1] + [2]: The form options (`s_website_form/options.js`) defined in `website.assets_wysiwyg` requires the registry defined in `website.assets_editor`. But since [1] and [2], the `website.assets_wysiwyg` bundle is loaded inside the iframe without `website.assets_editor`, as only `website.assets_wysiwyg` is needed to properly display and interact with the editor. (Most of the bundle is not necessary and a later IMP will either only load the CSS needed or split the bundle). This commit moves the modules that creates the registry as well as modules that extend it to the `website.assets_wysiwyg` bundle, fixing the dependency error. Though they are not required inside the iframe, the bundle can now be loaded without the need of assets_editor, removing the missing dependencies. [1]: https://github.com/odoo/odoo/commit/03c552690b15cbf2e7d6b7812386ac64042219af [2]: https://github.com/odoo/odoo/commit/a154ee7ad6fd3ebdd38943e1439badae11c3151d See also PR Community: https://github.com/odoo/odoo/pull/110811
Code cleanup and technical improvements
Several Enterprise planning screens have been modernized to use Odoo’s newer interface framework. This should make Gantt-based scheduling views in events, appraisals, time off, and payroll easier to maintain and more consistent for users over time.
Miscellaneous changes
The previous year earnings were not well computed in the balance sheet. Adapt domain and special date changer for lines FIBS_LIA_AXXIII_1 and FIBS_LIA_AXXIII_8. opw-2702912 Forward-Port-Of: odoo/enterprise#34921 Forward-Port-Of: odoo/enterprise#33885
Original PR description
The previous year earnings were not well computed in the balance sheet. Adapt domain and special date changer for lines FIBS_LIA_AXXIII_1 and FIBS_LIA_AXXIII_8. opw-2702912 Forward-Port-Of: odoo/enterprise#34921 Forward-Port-Of: odoo/enterprise#33885
Salary advantages can now keep clear internal names while choosing whether those names appear in the employee salary configurator. This improves day-to-day administration and makes the configurator cleaner for users, alongside other payroll and contract salary usability updates.
Original PR description
Purpose: 'hr.contract.salary.advantage' has the field 'name' that we also show on salary configurator. Sometimes, we don't want to show 'name' for some advantages on the configurator, and to do this, prior we left the field empty. Which is not convenient when for example we check the list of advantages. To solve this issue, we add 'show_name' field in this commit. That allows to populate the field, while keeping salary configurator they way we want. Beyond that, the commit includes UX changes. task - 2902100
This update strengthens testing around recurring shifts in Planning, including how repeated dates are calculated and how recurring shifts are changed or deleted. It helps reduce the risk of scheduling issues for businesses using recurring workforce or resource planning.
Original PR description
Purpose of the PR is to test the flow of shift recurrence So in this commit did the below changes: - creating material resources, assigning them roles. - recurrence calculation of the dates based on the different options of recurrency. - modification/deletion of recurring shifts. task-3010428
The project settings area is now hidden when it has no relevant content to show. It only appears when related apps such as Timesheets or Planning are installed, reducing empty or confusing sections for users.
Original PR description
Before this PR settings div in project simplified was visible even though there is no content to display only when project application is install. So, In this PR hide div from project and display it when timesheet/planning app is install. task-3102445
Users can now quickly select or unselect all documents in the Documents app using a keyboard shortcut. This makes bulk actions faster and reduces repetitive clicking when managing many records.
odoo/odoo#96195 introduced variables for styling in kanban views, which added padding to all kanban records, however this is not wanted in documents as we mostly have full thumbnails now. TaskId-3147527 Forward-Port-Of: odoo/enterprise#36212
Original PR description
odoo/odoo#96195 introduced variables for styling in kanban views, which added padding to all kanban records, however this is not wanted in documents as we mostly have full thumbnails now. TaskId-3147527 Forward-Port-Of: odoo/enterprise#36212
Enable some Knowledge tests that were actually not running (because the method did not start with `test_`), and fix them. Fixing those tests highlighted some small errors in the code: - do not call `scrollIntoView` on text nodes in the /template use as description macro - paste template content in the last blank line (instead of after it) when using the /template use as description macro - properly switch form tab to paste template content when there are multiple instances of the
Original PR description
Enable some Knowledge tests that were actually not running (because the method did not start with `test_`), and fix them. Fixing those tests highlighted some small errors in the code: - do not call…
Enable some Knowledge tests that were actually not running (because the method did not start with `test_`), and fix them. Fixing those tests highlighted some small errors in the code: - do not call `scrollIntoView` on text nodes in the /template use as description macro - paste template content in the last blank line (instead of after it) when using the /template use as description macro - properly switch form tab to paste template content when there are multiple instances of the target field in the XML document of the view - properly destroy Behavior Apps when the html_field is destroyed (The Apps were not properly registered before, so they were not destroyed manually at the right life cycle step) - handle idSet and the editor observer in AbstractBehavior so it does not need to be handled in child classes Rework the way `Markup` is used for Behaviors in Knowledge. It should only be allowed on nodes that are stored directly in the html_field values (i.e. on nodes with a data-prop-name attribute), and not on props coming from the `data-behavior-props` attribute. The html_field Component will now be responsible for the Markup call, and Behavior Components will directly receive Markup objects as props. A custom template for the /file command is created to allow storing all necessary props in the DOM when the command is executed, instead of using the `notifyNewBehavior` method to transmit them. This will be required when the collaborative mode is enabled since Behaviors are rendered independantly for each collaborator from the DOM content only, which was missing those props in this case. Store the encoded data-behavior-props JSON object so that it won't be necessary to do it before using DOMPurify.sanitize each time it is used. Store the act_window.help field for embedded views directly as a DOM element with a data-prop-name so that it is properly sanitized and use the same mechanism as mentionned above for the Markup usage Task-3101553 Forward-Port-Of: odoo/enterprise#36182 Forward-Port-Of: odoo/enterprise#34977
Caused by some forgotten use cases in: 43a9310ef47d44cfe5d566aff5fa07e66b3ed0b5 Steps to reproduce the unwanted behavior: - Company currency is USD - Payable account in USD 1. Create vendor bill in SGD with aforementioned payable account 2. Create bank statement with vendor bill amount in USD 3. Reconcile these together 4. The journal entry with the reconciled items still appears in unrealized currency gains/losses OPW-3092298 Forward-Port-Of: odoo/enterprise#36110 Forward
Original PR description
Caused by some forgotten use cases in: 43a9310ef47d44cfe5d566aff5fa07e66b3ed0b5 Steps to reproduce the unwanted behavior: - Company currency is USD - Payable account in USD 1. Create vendor bill in SGD with aforementioned payable account 2. Create bank statement with vendor bill amount in USD 3. Reconcile these together 4. The journal entry with the reconciled items still appears in unrealized currency gains/losses OPW-3092298 Forward-Port-Of: odoo/enterprise#36110 Forward-Port-Of: odoo/enterprise#36021
steps: - install helpdesk and website_helpdesk_livechat - go to the live chat channel - create live chat channel same name as one of the team name - go to the helpdesk team - checked live chat check box issue: - value error cause try to assigning multi channel on team fix: - set the limit 1 on the search of channels task-3067151 Forward-Port-Of: odoo/enterprise#34388
Original PR description
steps: - install helpdesk and website_helpdesk_livechat - go to the live chat channel - create live chat channel same name as one of the team name - go to the helpdesk team - checked live chat check box issue: - value error cause try to assigning multi channel on team fix: - set the limit 1 on the search of channels task-3067151 Forward-Port-Of: odoo/enterprise#34388
Some fields were removed in https://github.com/odoo/odoo/pull/71878/commits/1a82c91524ae7050e8ef9497d4917c6ea6cc7ec2 but are still in the studio hard-coded list of fields to export, which leads to a traceback when trying to export a studio module with mail templates. Also add a test that simply checks that models and fields still exist. opw-3087213 Forward-Port-Of: odoo/enterprise#35281
Original PR description
Some fields were removed in https://github.com/odoo/odoo/pull/71878/commits/1a82c91524ae7050e8ef9497d4917c6ea6cc7ec2 but are still in the studio hard-coded list of fields to export, which leads to a traceback when trying to export a studio module with mail templates. Also add a test that simply checks that models and fields still exist. opw-3087213 Forward-Port-Of: odoo/enterprise#35281
before this commit, in consolidation.company_period model for the field period_id an invisible condition is added based on context key from_analysis_period, but such a key is not set in context from any where, so removing the unused invisible condition after this commit, the invisible condition is removed. Forward-Port-Of: odoo/enterprise#36154
Original PR description
before this commit, in consolidation.company_period model for the field period_id an invisible condition is added based on context key from_analysis_period, but such a key is not set in context from any where, so removing the unused invisible condition after this commit, the invisible condition is removed. Forward-Port-Of: odoo/enterprise#36154
- Added tax grids 109, 150, 152, 153, 155, 156, 158 - Adapted names and/or formulas for tax grids 17, 27, 70, 71 - Adapted BOE export of model 303 - Added module `l10n_es_reports_2023` to add the field for tax grid 109 in the Modelo 303 wizard Reference: https://sede.agenciatributaria.gob.es/static_files/Sede/Disenyo_registro/DR_300_399/archivos_23/DR303e23.xlsx [task-2993087](https://www.odoo.com/web#id=2993087&cids=1&menu_id=4720&action=333&active_id=967&model=project.task&view_type=f
Original PR description
- Added tax grids 109, 150, 152, 153, 155, 156, 158 - Adapted names and/or formulas for tax grids 17, 27, 70, 71 - Adapted BOE export of model 303 - Added module `l10n_es_reports_2023` to add the field for tax grid 109 in the Modelo 303 wizard Reference: https://sede.agenciatributaria.gob.es/static_files/Sede/Disenyo_registro/DR_300_399/archivos_23/DR303e23.xlsx [task-2993087](https://www.odoo.com/web#id=2993087&cids=1&menu_id=4720&action=333&active_id=967&model=project.task&view_type=form) Related to: https://github.com/odoo/odoo/pull/103361 Forward-Port-Of: odoo/enterprise#36146 Forward-Port-Of: odoo/enterprise#32866
The narration field is filled by online sync with json data like: """ { "a": "b", "c": "d", } """ The problem is this data contains \n characters that are not matched by "." in a regex. So: re.match(".*coincoin.*", "\ncoincoin\n") is not matching re.match(".*coincoin.*", "coincoin") is matching Issue: 3105940 X-original-commit: https://github.com/odoo/odoo/commit/8ca3d584a07a1db66681872507ca35095a90125f Forward-Port-Of: odoo/enterprise#36106
Original PR description
The narration field is filled by online sync with json data like: """
{
"a": "b",
"c": "d",
}
"""
The problem is this data contains \n characters that are not matched by "." in a regex. So:
re.match(".*coincoin.*", "\ncoincoin\n") is not matching re.match(".*coincoin.*", "coincoin") is matching
Issue: 3105940
X-original-commit: https://github.com/odoo/odoo/commit/8ca3d584a07a1db66681872507ca35095a90125f
Forward-Port-Of: odoo/enterprise#36106Before this fix, the SvcLvl node was always added if the file was not detected as generic SEPA. This happened when all the accounts involved were IBAN, and the amounts were all in EUR. When using the Swiss variant, this was a problem, as this value is not supported for the (optional) SvcLvl node. We hence solve the issue by not adding the node for this variant anymore. OPW 3006565 Forward-Port-Of: odoo/enterprise#36159 Forward-Port-Of: odoo/enterprise#36151
Original PR description
Before this fix, the SvcLvl node was always added if the file was not detected as generic SEPA. This happened when all the accounts involved were IBAN, and the amounts were all in EUR. When using the Swiss variant, this was a problem, as this value is not supported for the (optional) SvcLvl node. We hence solve the issue by not adding the node for this variant anymore. OPW 3006565 Forward-Port-Of: odoo/enterprise#36159 Forward-Port-Of: odoo/enterprise#36151
Prior to this commit, buttons in Gantt view dialog and form view in my planning are not similar. In this commit, we made the similar conditions for buttons visibility in Gantt view dialog and form view. task-3000243 Forward-Port-Of: odoo/enterprise#36158 Forward-Port-Of: odoo/enterprise#32154
Original PR description
Prior to this commit, buttons in Gantt view dialog and form view in my planning are not similar. In this commit, we made the similar conditions for buttons visibility in Gantt view dialog and form view. task-3000243 Forward-Port-Of: odoo/enterprise#36158 Forward-Port-Of: odoo/enterprise#32154
The account journal report was using a load limit on print mode. We don't want to do that because we need all the data of unfolded lines to show when printing (not "load more"). opw-3125834 Forward-Port-Of: odoo/enterprise#36045
Original PR description
The account journal report was using a load limit on print mode. We don't want to do that because we need all the data of unfolded lines to show when printing (not "load more"). opw-3125834 Forward-Port-Of: odoo/enterprise#36045
Currently, the account filter present in the reports works well with small size report but on big ones (e.g. big partner ledger reports) the filtering can take a very long time due to too many jquery selector calls. So for every key stroke, the report takes an important amount of time to finish to function, which also makes for a poor user experience (e.g. when someone type multiple strokes, the filter bar doesn't show the characters). The function was changed to reduce these calls. By doing
Original PR description
Currently, the account filter present in the reports works well with small size report but on big ones (e.g. big partner ledger reports) the filtering can take a very long time due to too many jquery selector calls. So for every key stroke, the report takes an important amount of time to finish to function, which also makes for a poor user experience (e.g. when someone type multiple strokes, the filter bar doesn't show the characters). The function was changed to reduce these calls. By doing so we went from ~4.3 seconds to 243 milliseconds for partner ledger with nearly 5.500 lines when filtering with one character. This PR is related to a ticket in 15.0, but the problems is also present in 14.0. Forward-Port-Of: odoo/enterprise#35111 Forward-Port-Of: odoo/enterprise#34898
before this commit, two onchange functions are written with same name _onchange_extra_day and thus only the last function is getting executed and the other one is not getting executed. after this commit, both onchange functions will get executed and will save value in system parameters.  Forward-Port-Of: odoo/enterprise#36133
Original PR description
before this commit, two onchange functions are written with same name _onchange_extra_day and thus only the last function is getting executed and the other one is not getting executed. after this commit, both onchange functions will get executed and will save value in system parameters.  Forward-Port-Of: odoo/enterprise#36133
It already was implicitly; we're just making sure the view tells the user when creating a homemade report. Forward-Port-Of: odoo/enterprise#35928
Original PR description
It already was implicitly; we're just making sure the view tells the user when creating a homemade report. Forward-Port-Of: odoo/enterprise#35928
Purpose: - Currently, the sidebar resizer is not compatible with rtl languages. When a rtl language is used, the sidebar is placed on the right (while it is placed on the left with ltr languages). However, the width of the sidebar is set as the horizontal position of the cursor when the resizer is moved (which is independent of the language direction). This commit changes the computation of the width of the sidebar when the resizer is moved and when a rtl language is used. Task-3131218
Original PR description
Purpose: - Currently, the sidebar resizer is not compatible with rtl languages. When a rtl language is used, the sidebar is placed on the right (while it is placed on the left with ltr languages). However, the width of the sidebar is set as the horizontal position of the cursor when the resizer is moved (which is independent of the language direction). This commit changes the computation of the width of the sidebar when the resizer is moved and when a rtl language is used. Task-3131218 Forward-Port-Of: odoo/enterprise#35725
Enterprise part of odoo/odoo#110099 Forward-Port-Of: odoo/enterprise#35888
Original PR description
Enterprise part of odoo/odoo#110099 Forward-Port-Of: odoo/enterprise#35888
Current behavior: When you scan a product in the Barcode app, that is tracked by lots, it will match quants that does not have lot_id. But when you scan the lot barcode, it will count as the same product as the previous one, and it will try to change the lot_id of the quant, which is not possible. Steps to reproduce: 1. Install Barcode and Inventory app 2. Enable tracking by lot in the settings 3. Create a new product, give it a barcode and track it by lot 4. Add quantity on han
Original PR description
Current behavior: When you scan a product in the Barcode app, that is tracked by lots, it will match quants that does not have lot_id. But when you scan the lot barcode, it will count as the same product as the previous one, and it will try to change the lot_id of the quant, which is not possible. Steps to reproduce: 1. Install Barcode and Inventory app 2. Enable tracking by lot in the settings 3. Create a new product, give it a barcode and track it by lot 4. Add quantity on hands without any lot id 5. Create a new lot id 6. Go to the barcode app and do an inventory adjustment 7. Scan the product barcode 8. Scan the lot barcode 9. Confirm the inventory adjustment (JS error) After this commit: When scanning the lot id, it will prevent matching lines having the same product but no lot id. This way, the line won't end up editing the lot of an existing quant. opw-3023190 Forward-Port-Of: odoo/enterprise#36024 Forward-Port-Of: odoo/enterprise#33866
_Linked to https://github.com/odoo/odoo/pull/109229_ The employee cost is currently not included in the valuation process To reproduce the issue: 1. Create an employee E: - Hourly Cost: 100 2. Edit P_finished's category: - Costing Method: FIFO 3. Create two storable products P_compo, P_finished 4. Create a work center WC: - Cost per hour per workcenter: 10 - Requires Log In: True - Allowed Employees: E 5. Create a BoM: - Product: P_finished - Components: 1
Original PR description
_Linked to https://github.com/odoo/odoo/pull/109229_ The employee cost is currently not included in the valuation process To reproduce the issue: 1. Create an employee E: - Hourly Cost: 100 2. Edit…
_Linked to https://github.com/odoo/odoo/pull/109229_
The employee cost is currently not included in the valuation process
To reproduce the issue:
1. Create an employee E:
- Hourly Cost: 100
2. Edit P_finished's category:
- Costing Method: FIFO
3. Create two storable products P_compo, P_finished
4. Create a work center WC:
- Cost per hour per workcenter: 10
- Requires Log In: True
- Allowed Employees: E
5. Create a BoM:
- Product: P_finished
- Components: 1 x P_compo
- Operations:
- add a new operation OP that uses WC
6. Create and confirm a MO with 1 x P_finished
7. Open the tablet view of OP:
8. Log in as E and set the done qty
- (Wait few seconds)
9. Mark it as done and close the MO
10. Open MO > Cost Analysis - Keep the total cost in mind
11. Open MO > Valuation
Error: The value is not the same, the employee cost is not included
When computing the price unit of the finished move, nothing in the code includes the costs of the employees
OPW-3116944
Forward-Port-Of: odoo/enterprise#35480Before this commit, when suggesting a operation step (worksheet) improvement by either Update Instructions or Set a New Picture then the following would happen within the corresponding plm ECO BoM: Update Instructions: - the updated step's note would be completely replaced by the proposed instruction, including any images in the note. Set a New Picture: - the updated step's note would be completely replaced by the new picture, including any text in the note This is non-intuitive since
Original PR description
Before this commit, when suggesting a operation step (worksheet) improvement by either Update Instructions or Set a New Picture then the following would happen within the corresponding plm ECO BoM:…
Before this commit, when suggesting a operation step (worksheet) improvement by either Update Instructions or Set a New Picture then the following would happen within the corresponding plm ECO BoM: Update Instructions: - the updated step's note would be completely replaced by the proposed instruction, including any images in the note. Set a New Picture: - the updated step's note would be completely replaced by the new picture, including any text in the note This is non-intuitive since you wouldn't expect updating one to delete the other. Therefore we add extra logic so that when: Update Instructions: - if only a text update is provided (including blank text), then keep the existing images and only replace the existing text - if only an image update is provided, then replace the entire note since we expect them all to be out of date Set a New Picture: - any existing text in note will remain untouched, but all images + uploaded pdfs will be removed and: - ECO Step update: the new picture will be placed at the bottom of the note - In the WO step: the picture replaces the worksheet_document, which is what we would ideally have in the ECO as well, but due to some limitations we do not do this. See https://github.com/odoo/enterprise/pull/33597/commits/b9af297619fd3d70908a4910051d7e8d27380775 for more background info - In the WO step, if original control point uses the operation worksheet, then also append the image to the bottom of the note to ensure that it will show in the tablet view. !!!LIMITATION!!! In this case there is nothing we can do to prevent the operation worksheet from showing in the step Additionally we handle a couple of use cases that were resulting in lost data: - If a ECO's BoM step cannot be found (e.g. the step was suggested to be deleted or one of the matching criterias was manually changed in the ECO), then we post the suggested info in the ECO's chatter so that it is not lost - Some info related to suggestions are now posted in the corresponding step's chatter (when the step is found). This allows for tracking of multiple suggestions for the same step + keeping of some data that was being lost (e.g. comment for why update is suggested when applicable + new title suggestions) Also: - Ensure that title=False is not shown when a blank title is suggested by Update Instruction + unify the chatter message bodies for the both the plm and non-plm use cases since it's currently duplicated - Don't default to showing the operation worksheet when custom step_document is selected, but none has been uploaded Task: 2667138 Forward-Port-Of: odoo/enterprise#36128 Forward-Port-Of: odoo/enterprise#35702
Purpose of this FIX: Improve testing workflows for customers, demo, and training purposes Customers want to test with their data and duplicated DB but real certificates are sensible to be used when no validation for the SII is needed Why not use demo certificates?: there are no demo certificates. All are real certificates with sensitive personal data Also in the Chilean localization, there is an extra complication since CAFs for each type of document are needed in testing and usually
Original PR description
Purpose of this FIX: Improve testing workflows for customers, demo, and training purposes Customers want to test with their data and duplicated DB but real certificates are sensible to be used when no validation for the SII is needed Why not use demo certificates?: there are no demo certificates. All are real certificates with sensitive personal data Also in the Chilean localization, there is an extra complication since CAFs for each type of document are needed in testing and usually, they are limited by the government Proposed solution: We have an extra environment called demo, where no restrictions regarding certificates or CAFs are present to be able to test and create demos of every workflow with the creation of the XML. This environment will not return any SII errors. It is only for local testing and demo/training purposes. Forward-Port-Of: odoo/enterprise#36081 Forward-Port-Of: odoo/enterprise#34434