Thursday, October 15, 2020
63 changes · master
Enhancements to existing features
This update adds styling used by payslip reports so payroll documents display more consistently and professionally. It helps improve the readability and presentation of payslips generated from Odoo.
Original PR description
Task-2341886 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
This change removes a redundant database index for website visitor access tokens because the existing uniqueness rule already creates one automatically. It helps keep the visitor data table leaner and can slightly reduce database storage and maintenance overhead without changing user-facing behavior.
Original PR description
unique constraint create an btree unbique index:
```
# \d website_visitor
[...]
Indexes:
"website_visitor_pkey" PRIMARY KEY, btree (id)
"website_visitor_access_token_index" btree (access_token)
"website_visitor_access_token_unique" UNIQUE CONSTRAINT, btree (access_token)
"website_visitor_partner_uniq" UNIQUE CONSTRAINT, btree (partner_id)
```
removing index=True avoid this double indexing.The timesheet settings page now avoids showing the Chrome app icon on mobile devices. This keeps the mobile settings experience cleaner and prevents users from seeing an option that is not relevant on smaller screens.
Original PR description
The icon of the chrome app from the timesheet setting should not be displayed on mobile. Task-Id: 2323254
Users can now open the IAP service portal directly from service settings near the existing credit purchase option. This makes it easier to review and manage paid services without searching through general settings.
Original PR description
…tting Purpose of this task is the current link to the IAP portal is very well hidden in the general settings, so we are confident most users won't find it. So in this commit, we add 'View my Services' link below the 'Buy credits'. LINKS PR: #57063 Task_id: 2157984 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 salary package resume now includes an archive option and default search filters. This makes it easier for HR users to organize resume entries and quickly find records by view type or salary structure type.
Original PR description
currently, in master default search filter and archive option is not available in resume. so, in this commit added archive option and default search filter like view type, salary structure type in resume TaskId : 2338751
Worksheet reports now show boolean fields as checkboxes instead of True/False text, making them easier to read. Selection fields now display their user-friendly labels, so reports are clearer and more meaningful for field service users.
Original PR description
**Purpose** cleaner way to display information for the user **Specification** - display the checkbox for the boolean field (and NOT True/False) - display the label of the values for the selection field on the worksheet report
Resolved issues and error corrections
Hovering over grid view cells and totals now highlights the related row and column more consistently. This makes it easier for users to read totals and compare values across days in grid-style planning views.
Original PR description
Current behavior before PR: hovering on a cell from the grid view highlights the corresponding row and line are not working. Desired behavior after PR is merged: This commit fixes hovering on a cell from the grid view highlights the corresponding row and line. LINKS PR #13154 Task-2333969
Features or functions removed from Odoo
Old documentation files for inventory, manufacturing, and purchasing were removed because newer, more user-friendly documentation is available online. This reduces confusion by directing users to the current official guidance instead of maintaining outdated in-app files.
Original PR description
An updated and user friendly documentation is available at https://www.odoo.com/documentation/user/13.0/inventory.html
Miscellaneous changes
Description of the issue/feature this PR addresses: The problem here is before this changes, the fiscal position only take into account if them has "auto_apply" True, and for the cases that the partner has their property fiscal position configurate for a company this is not taking into account. Current behavior before PR: For argentinian localization, if the partner has a fiscal position configurate for a company, when you call for the method to retrieve the fiscal position for an invoi
Original PR description
Description of the issue/feature this PR addresses: The problem here is before this changes, the fiscal position only take into account if them has "auto_apply" True, and for the cases that the partner has their property fiscal position configurate for a company this is not taking into account. Current behavior before PR: For argentinian localization, if the partner has a fiscal position configurate for a company, when you call for the method to retrieve the fiscal position for an invoice for instance, the fiscal position it's not found if this has not "auto apply". Desired behavior after PR is merged: After this changes we evaluate for the property fiscal position for the partner and then if non result we seek a fiscal position with the auto apply and the responsability of AFIP. So this the same as the original method do. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#58914
The issue is well described in #58491. I just applied one of the suggested solutions: > ... > It should not change the result_package_id if it was already set. > ... Fixes #58491 opw-2346608 Below is complete quote --- Impacted versions: tested on 13.0, may happen earlier Steps to reproduce: (tested on runbot version 13.0) * In Inventory, activate multiple warehouses and storage locations, multi-step routes, Delivery packages * On the main warehouse, activate 3 steps de
Original PR description
The issue is well described in #58491. I just applied one of the suggested solutions: > ... > It should not change the result_package_id if it was already set. > ... Fixes #58491 opw-2346608 Below is…
The issue is well described in #58491. I just applied one of the suggested solutions: > ... > It should not change the result_package_id if it was already set. > ... Fixes #58491 opw-2346608 Below is complete quote --- Impacted versions: tested on 13.0, may happen earlier Steps to reproduce: (tested on runbot version 13.0) * In Inventory, activate multiple warehouses and storage locations, multi-step routes, Delivery packages * On the main warehouse, activate 3 steps delivery * Create a stockable product A * Update quantity on hand: 100 units in a package PACK1 in Stock/Shelf 1 * Create a new Pick transfer with one move: 120 product A * Set the transfer as todo and check availability: a move line for the 100 units from PACK1 is created * Edit the move line: set a destination location, **change the result package to PACK2** and set a qty_done * On product A, update the quantity on hand: add a *new* package PACK3 of 20 in Stock/Shelf 1 * On the transfer, click on check availability Current behavior: * A new move line is created for the 20 units from PACK3 to PACK3: ok * The move line edited before for the 100 units has its result package **reset to PACK1** Expected behavior: * A new move line is created for the 20 units from PACK3 to PACK3: ok * The move line edited before for the 100 units has its result package kept to **PACK2 as edited by the user** who decided to open the package already Short analysis: At the end of `StockMove._action_assign()`, the method `StockPicking._check_entire_pack()` is called. For each package moved by a move line, this method checks if the package is entirely moved (sum of quants == sum of move lines). The check is done by `StockPicking._check_move_lines_map_quant_package`. When the sums match, the package level of the move lines is created or updated. When it happens, it writes the package in the `result_package_id` of the related lines. It should not change the result_package_id if it was already set. Thinking further, maybe it should not consider lines with a `qty_done` in `_check_move_lines_map_quant_package`: users already picked these lines, if they decided to empty or change the `result_package_id`, a new check of availability for the remaining quantities should not change these lines. Video/Screenshot link (optional): https://youtu.be/K4WXXgkOCu4 Forward-Port-Of: odoo/odoo#59985 Forward-Port-Of: odoo/odoo#59514
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#59978
Original PR description
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#59978
Commit e10fd34682a0c55568cba66eb271b3aa5bed7c1d introduced batched reference fields name_gets across groups but was also buggy as follows: Have a grouped list view showing at least 2 groups Have a reference field with different values showed in the list for each record Before this commit, the name_get of those reference fiels were fetched only for the last group After this commit, the name_get are fetched in a batched fashion (by model) for each group and display correctly Descrip
Original PR description
Commit e10fd34682a0c55568cba66eb271b3aa5bed7c1d introduced batched reference fields name_gets across groups but was also buggy as follows: Have a grouped list view showing at least 2 groups Have a reference field with different values showed in the list for each record Before this commit, the name_get of those reference fiels were fetched only for the last group After this commit, the name_get are fetched in a batched fashion (by model) for each group and display correctly 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#59903 Forward-Port-Of: odoo/odoo#59830
Purpose of this commit is simply to add tests about alias defaults. Code protects it against being badly formatted. However having tests ensuring it is always a good idea to avoid regression. Task ID-2361179 Forward-Port-Of: odoo/odoo#60010
Original PR description
Purpose of this commit is simply to add tests about alias defaults. Code protects it against being badly formatted. However having tests ensuring it is always a good idea to avoid regression. Task ID-2361179 Forward-Port-Of: odoo/odoo#60010
Introduced in 5a031e6478b8922f74d373bc8b8e75db3600ea0b, issue got caught and fixed in the master version of the PR (odoo/odoo#59798) but because of an other issue the warning was non-deterministic, and the 14.0 PR (odoo/odoo#59794) was successfully merged without needing the change, and has been breaking stagings ever since. Also updated the warning stacklevel so that it reports the *caller* of AccountMove.post instead of reporting AccountMove.post itself, that's more useful. Forward-P
Original PR description
Introduced in 5a031e6478b8922f74d373bc8b8e75db3600ea0b, issue got caught and fixed in the master version of the PR (odoo/odoo#59798) but because of an other issue the warning was non-deterministic, and the 14.0 PR (odoo/odoo#59794) was successfully merged without needing the change, and has been breaking stagings ever since. Also updated the warning stacklevel so that it reports the *caller* of AccountMove.post instead of reporting AccountMove.post itself, that's more useful. Forward-Port-Of: odoo/odoo#59996
Otherwise computing unstored fields forces to compute all other already stored fields. When being in a high charge context this may have a big impact on DB use. Task ID-2351463 Forward-Port-Of: odoo/odoo#59750 Forward-Port-Of: odoo/odoo#59084
Original PR description
Otherwise computing unstored fields forces to compute all other already stored fields. When being in a high charge context this may have a big impact on DB use. Task ID-2351463 Forward-Port-Of: odoo/odoo#59750 Forward-Port-Of: odoo/odoo#59084
When Height option not forced (50% or 100% screen's height), the snippet simply disappear if there is no content inside (default). The 4e220bf commit makes parallax snippet empty by default and the main goal of a8f0cee was to make "DRAG BUILDING BLOCK HERE" placeholders appear only on drag, that's why we need to add a "min-height" for parallax to keep it visible when the "Height" selected is auto. task-2327025 Forward-Port-Of: odoo/odoo#57075
Original PR description
When Height option not forced (50% or 100% screen's height), the snippet simply disappear if there is no content inside (default). The 4e220bf commit makes parallax snippet empty by default and the main goal of a8f0cee was to make "DRAG BUILDING BLOCK HERE" placeholders appear only on drag, that's why we need to add a "min-height" for parallax to keep it visible when the "Height" selected is auto. task-2327025 Forward-Port-Of: odoo/odoo#57075
Forward-Port-Of: odoo/odoo#59842
Original PR description
Forward-Port-Of: odoo/odoo#59842
Steps to reproduce the bug: - In Projects, switch to the calendar view - Click a task Bug: Traceback here: https://github.com/odoo/odoo/blob/7ba47e7215df69b6556a848532e4f33ef4243e83/addons/web/static/src/js/fields/basic_fields.js#L2181 TypeError: Cannot use 'in' operator to search for 'invisible' in {} Explanation: We could change the inherited model of CalendarView from AbstractView to BasicView but it would be adding 400 lines of code to every calendar view. So, for now, and to ke
Original PR description
Steps to reproduce the bug:
- In Projects, switch to the calendar view
- Click a task
Bug:
Traceback here: https://github.com/odoo/odoo/blob/7ba47e7215df69b6556a848532e4f33ef4243e83/addons/web/static/src/js/fields/basic_fields.js#L2181
TypeError: Cannot use 'in' operator to search for 'invisible' in {}
Explanation:
We could change the inherited model of CalendarView from AbstractView to BasicView but it would be adding 400 lines of code to every calendar view. So, for now, and to keep it simple, we just parse the modifiers where it's needed to.
opw:2352436
opw:2352890
opw:2354039
Forward-Port-Of: odoo/odoo#59795
Forward-Port-Of: odoo/odoo#59717Moved in the post init hook of account_accountant Enterprise PR: https://github.com/odoo/enterprise/pull/14021 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#59849
Original PR description
Moved in the post init hook of account_accountant Enterprise PR: https://github.com/odoo/enterprise/pull/14021 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#59849
Current behavior before PR: The unit test in `test_base_document_layout` does not pass with version 7.0.0 of PIL, which is loaded by default on Ubuntu 20.04. The reason is that the color obtained from the image is slightly different. This fix slightly relaxes the test (in fact we don't care about the exact color obtained in this test, we just want to make sure that it doesn't crash) Desired behavior after PR is merged: The unit test passes opw-2342394 (original ticket) --
Original PR description
Current behavior before PR: The unit test in `test_base_document_layout` does not pass with version 7.0.0 of PIL, which is loaded by default on Ubuntu 20.04. The reason is that the color obtained from the image is slightly different. This fix slightly relaxes the test (in fact we don't care about the exact color obtained in this test, we just want to make sure that it doesn't crash) Desired behavior after PR is merged: The unit test passes opw-2342394 (original ticket) -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#59912 Forward-Port-Of: odoo/odoo#59856
Before this commit, optionnal_product_ids are defined on sale_product_configurator but used on website_sale tests. Taskid: 2340918 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#59201
Original PR description
Before this commit, optionnal_product_ids are defined on sale_product_configurator but used on website_sale tests. Taskid: 2340918 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#59201
Before, the `virtual_available_at_date` was used to describe the `free_qty_today` when the forecasted is calculated via the forecasted of stock move. This issue create a difference of color when SO become confirmed (if the `free_qty_today < 0`). To fix this, use the `free_qty_today` to compute the `will_be_fulfilled` (in the js widget) and fill `free_qty_today` instead of `virtual_available_at_date` when SO is confirmed. opw-2360024 Forward-Port-Of: odoo/odoo#60054
Original PR description
Before, the `virtual_available_at_date` was used to describe the `free_qty_today` when the forecasted is calculated via the forecasted of stock move. This issue create a difference of color when SO become confirmed (if the `free_qty_today < 0`). To fix this, use the `free_qty_today` to compute the `will_be_fulfilled` (in the js widget) and fill `free_qty_today` instead of `virtual_available_at_date` when SO is confirmed. opw-2360024 Forward-Port-Of: odoo/odoo#60054
Commit 0f80e69b8d260c0ed4bbbbad2d0c1e88ab054bf5 tracked all changes on qty_received on the purchase order. But did that wrongly by calling `write` inside a compute. Commit b7cc3b068f685d1339f9fe7e47d0c564de1708e7 fixed this `write` by an `=` to avoid error when the compute is called on virtual records. This fix result on forgetting to track the quantity delivered. This commit sends a message to post in `write` AND in the `compute_qty_received` to be sure it is posted. This way, we do no
Original PR description
Commit 0f80e69b8d260c0ed4bbbbad2d0c1e88ab054bf5 tracked all changes on qty_received on the purchase order. But did that wrongly by calling `write` inside a compute. Commit b7cc3b068f685d1339f9fe7e47d0c564de1708e7 fixed this `write` by an `=` to avoid error when the compute is called on virtual records. This fix result on forgetting to track the quantity delivered. This commit sends a message to post in `write` AND in the `compute_qty_received` to be sure it is posted. This way, we do not call write in compute anymore. 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#59482
Since odoo/odoo@c6397ab3b3654da336a4269a81d5d91016baf520, the `printer.js` file has been refactored, and if the connection to the IoTBox failed, the error popup could not be displayed because `Gui` was undefined. Steps to reproduce on the runbot: - Configure your POS session with an IoTBox with receipt printer and cashdrawer - Open your POS session - Skip the connection to the IoTBox - Proceed to payment - Open the cashbox - `Error: Gui is not defined` This commit fixes the behavior
Original PR description
Since odoo/odoo@c6397ab3b3654da336a4269a81d5d91016baf520, the `printer.js` file has been refactored, and if the connection to the IoTBox failed, the error popup could not be displayed because `Gui` was undefined. Steps to reproduce on the runbot: - Configure your POS session with an IoTBox with receipt printer and cashdrawer - Open your POS session - Skip the connection to the IoTBox - Proceed to payment - Open the cashbox - `Error: Gui is not defined` This commit fixes the behavior by displaying the error properly. Forward-Port-Of: odoo/odoo#60006
When I've first documented this attribute, I had asked people what it does. I should have tested and I should have known that the code is documentation... closes odoo/odoo#58090 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Description of the issue/feature this PR addresses: the active attribute of the manifest is documented wrong. Current behavior before PR: the active attribute of the manifest is documented wrong. Desired behavior af
Original PR description
When I've first documented this attribute, I had asked people what it does. I should have tested and I should have known that the code is documentation... closes odoo/odoo#58090 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Description of the issue/feature this PR addresses: the active attribute of the manifest is documented wrong. Current behavior before PR: the active attribute of the manifest is documented wrong. Desired behavior after PR is merged: the active attribute of the manifest is documented correctly. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#59850
When there is no expense, a messages is shown: "Did you try the mobile app?" When clicking on the "Download on the App Store" or on the "Get it on Google Play" buttons, generated QR codes have some invalid data before it: - 002 - 1 - <the url> This commit removes datas that are before the url so only the url is displayed. TaskID: 2326303 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm
Original PR description
When there is no expense, a messages is shown: "Did you try the mobile app?" When clicking on the "Download on the App Store" or on the "Get it on Google Play" buttons, generated QR codes have some invalid data before it: - 002 - 1 - <the url> This commit removes datas that are before the url so only the url is displayed. TaskID: 2326303 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#58097
purpose of this task to solve the design issue on hr expense banner when we add a new field in hr expense tree view It create horizontal scrolling and on use of horizontal scroll the bottom line of the hr expense banner disappear after this task it will solve the design bug of hr expense banner Taskid : 2336309 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#58289
Original PR description
purpose of this task to solve the design issue on hr expense banner when we add a new field in hr expense tree view It create horizontal scrolling and on use of horizontal scroll the bottom line of the hr expense banner disappear after this task it will solve the design bug of hr expense banner Taskid : 2336309 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#58289
This change ensures that when the user activates optional features of the project app, they are enabled in existing projects as well as newly created projects automatically, which is likely what the user expects. For most optional features, this behavior was already in place. It was not in place yet for the sub-tasks and timesheets features, which this change fixes. Two added tests check the behavior described above for features that are activated through a `group_*` field on `res.conf
Original PR description
This change ensures that when the user activates optional features of the project app, they are enabled in existing projects as well as newly created projects automatically, which is likely what the user expects. For most optional features, this behavior was already in place. It was not in place yet for the sub-tasks and timesheets features, which this change fixes. Two added tests check the behavior described above for features that are activated through a `group_*` field on `res.config.settings` (sub-tasks, recurring tasks and ratings). The tests do not cover features that are activated through a `module_*` field, as such fields require the installation of further modules and we cannot simulate this. Task 2297054 Co-authored-by: Kevin Baptiste <50135801+kba-odoo@users.noreply.github.com> Forward-Port-Of: odoo/odoo#58692
If we submit an expense to the manager, a next activity is created for him. If we reset to draft, it is not cancelled. So if we resubmit expense, a second next activity is created for the manager. This commit will cancel created activities when we put the expense in draft Task id: 2350168 Forward-Port-Of: odoo/odoo#58986
Original PR description
If we submit an expense to the manager, a next activity is created for him. If we reset to draft, it is not cancelled. So if we resubmit expense, a second next activity is created for the manager. This commit will cancel created activities when we put the expense in draft Task id: 2350168 Forward-Port-Of: odoo/odoo#58986
Suppose two price_included taxes: 10%, 20%, a product having a sale price of 110.0 and a fiscal position tax 10% => tax 20%: When onchange_product_id is called, the price_unit is computed as follow: 110 / 1.1 = 100 100 * 1.2 = 120 So price_unit = 120 and balance = 100.0 But in onchange_uom_id, we do the same thing and we call _get_fields_onchange_balance_model with balance=100.0. However, in this method, an empty dictionary is returned because price_subtotal == balance. Then, {}.get('
Original PR description
Suppose two price_included taxes: 10%, 20%, a product having a sale price of 110.0 and a fiscal position tax 10% => tax 20%:
When onchange_product_id is called, the price_unit is computed as follow:
110 / 1.1 = 100
100 * 1.2 = 120
So price_unit = 120 and balance = 100.0
But in onchange_uom_id, we do the same thing and we call _get_fields_onchange_balance_model with balance=100.0.
However, in this method, an empty dictionary is returned because price_subtotal == balance.
Then, {}.get('price_unit', price_unit) will return the original price_unit (110.0) instead of the new computed one (120.0).
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#59888
Forward-Port-Of: odoo/odoo#59771In 857c4851754 currency_rate precision was changed to keep more digits for the currency rate. This commit reflects that in the point of sale. Also this change fixes an update issue that could recreate sale.report uncomplete because: => point_of_sale and pos_sale had different definition of pos.order().currency_rate field => this caused the field to be recreated (to change from double precison to numeric) on a given module update (pos_hr) => this caused the sale.report vi
Original PR description
In 857c4851754 currency_rate precision was changed to keep more digits for the currency rate. This commit reflects that in the point of sale. Also this change fixes an update issue that could recreate sale.report uncomplete because: => point_of_sale and pos_sale had different definition of pos.order().currency_rate field => this caused the field to be recreated (to change from double precison to numeric) on a given module update (pos_hr) => this caused the sale.report view to be dropped => this caused the sale.report view to be recreated before modules (that added fields to sale.report) were fully loaded opw-2306523 Forward-Port-Of: odoo/odoo#59968 Forward-Port-Of: odoo/odoo#57443
Current behavior before PR: The date range widget opened by default when the 'create invoices' the wizard is opened. because the default focus is 'Timesheets Period' field. Desired behavior after PR is merged: Disable autofocus on 'create invoice' action, after this changes The date range widget is not opened by default when the 'create invoices' the wizard is opened. LINKS PR https://github.com/odoo/odoo/pull/58676 Task-2344289 Forward-Port-Of: odoo/odoo#58676
Original PR description
Current behavior before PR: The date range widget opened by default when the 'create invoices' the wizard is opened. because the default focus is 'Timesheets Period' field. Desired behavior after PR is merged: Disable autofocus on 'create invoice' action, after this changes The date range widget is not opened by default when the 'create invoices' the wizard is opened. LINKS PR https://github.com/odoo/odoo/pull/58676 Task-2344289 Forward-Port-Of: odoo/odoo#58676
Description of the issue/feature this PR addresses: Traceback when posting entries in batch Current behavior before PR: Traceback when posting multiple entries from expense.sheet list view. A self.ensure_one() raises an exception. Desired behavior after PR is merged: No traceback and entries correctly posted in batch. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Task ID: 2344300 Forward-Port-Of: odoo/odoo#58481
Original PR description
Description of the issue/feature this PR addresses: Traceback when posting entries in batch Current behavior before PR: Traceback when posting multiple entries from expense.sheet list view. A self.ensure_one() raises an exception. Desired behavior after PR is merged: No traceback and entries correctly posted in batch. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Task ID: 2344300 Forward-Port-Of: odoo/odoo#58481
Issue - Install "Project" module - Go to the chatter of any Task - Log the following message (by selecting the partner) then send: "test@test.com @Marc Demo " Message is not sent. Cause When parsing the content, due to wrong regex, the parsed mension (in this case) is "@test.con\n@Marc Demo " and therefore not possible to match with the partner. Solution Update the regex. In this case, it will match with 2 mentions instead: "@test.com" and "@Marc Demo " opw
Original PR description
Issue - Install "Project" module - Go to the chatter of any Task - Log the following message (by selecting the partner) then send: "test@test.com @Marc Demo " Message is not sent. Cause When parsing the content, due to wrong regex, the parsed mension (in this case) is "@test.con\n@Marc Demo " and therefore not possible to match with the partner. Solution Update the regex. In this case, it will match with 2 mentions instead: "@test.com" and "@Marc Demo " opw-2322577 Forward-Port-Of: odoo/odoo#59648
This commit updates the documentation surrounding compute and inverse methods for fields, explicitly warning API consumers that grouping multiple compute fields under a single inverse method is error-prone and could not work at all (it can still work under specific conditions but henceforth it shall be considered bad practice). This case was found at https://github.com/odoo/enterprise/pull/13815/commits/a651413df915f166697d26a83084582207405858 Forward-Port-Of: odoo/odoo#60061 Forward-Por
Original PR description
This commit updates the documentation surrounding compute and inverse methods for fields, explicitly warning API consumers that grouping multiple compute fields under a single inverse method is error-prone and could not work at all (it can still work under specific conditions but henceforth it shall be considered bad practice). This case was found at https://github.com/odoo/enterprise/pull/13815/commits/a651413df915f166697d26a83084582207405858 Forward-Port-Of: odoo/odoo#60061 Forward-Port-Of: odoo/odoo#59995
unique constraint create an btree unbique index: ``` # \d website_visitor [...] Indexes: "website_visitor_pkey" PRIMARY KEY, btree (id) "website_visitor_access_token_unique" UNIQUE CONSTRAINT, btree (access_token) "website_visitor_partner_uniq" UNIQUE CONSTRAINT, btree (partner_id) ``` removing index=True avoid this double indexing. Forward-Port-Of: odoo/odoo#60042
Original PR description
unique constraint create an btree unbique index:
```
# \d website_visitor
[...]
Indexes:
"website_visitor_pkey" PRIMARY KEY, btree (id)
"website_visitor_access_token_unique" UNIQUE CONSTRAINT, btree
(access_token)
"website_visitor_partner_uniq" UNIQUE CONSTRAINT, btree (partner_id)
```
removing index=True avoid this double indexing.
Forward-Port-Of: odoo/odoo#60042Performance issue arise when the recordset is very large due to the union operator which apply at worst `len(self)` times. By storing the ids then browse on them we avoid the union operation execution. PySpy: https://drive.google.com/file/d/1jnxuSWGf2WmqeRz7zQOpBpmeRE5YnTwS/view?usp=sharing filtered_domain (odoo/models.py:5398) take 65.6% of the graph (55.7% of the 85% of button_confirm) To confirm a RFQ with 10 000 of the same product: Before this commit: ~42s After this commit: ~10s
Original PR description
Performance issue arise when the recordset is very large due to the union operator which apply at worst `len(self)` times. By storing the ids then browse on them we avoid the union operation execution. PySpy: https://drive.google.com/file/d/1jnxuSWGf2WmqeRz7zQOpBpmeRE5YnTwS/view?usp=sharing filtered_domain (odoo/models.py:5398) take 65.6% of the graph (55.7% of the 85% of button_confirm) To confirm a RFQ with 10 000 of the same product: Before this commit: ~42s After this commit: ~10s OPW-2347525 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60095
**Current behavior before PR:** We have a new feature that if the course is private, and attendee make the request to access the course it will create an activity for 'course responsible'. Currently, after accepting the invitation request from the new user, it is still not considered the user as an attendee and not displaying like 'You're enrolled' to the respective users **Desired behavior after PR is merged:** The features of access invitation on courses will be workable. T
Original PR description
**Current behavior before PR:** We have a new feature that if the course is private, and attendee make the request to access the course it will create an activity for 'course responsible'. Currently, after accepting the invitation request from the new user, it is still not considered the user as an attendee and not displaying like 'You're enrolled' to the respective users **Desired behavior after PR is merged:** The features of access invitation on courses will be workable. Task-2328389 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#59504
Purpose ======= In Belgium, the job market is divided into "sectors": chemicals, metals, banks, department stores, pharmacies ... This breakdown is made on the basis of the activities of the company. In order to be able to ensure the functioning of the sectors, each sector has its own consultation body, called the "joint commission". A joint committee is a consultation body in which representatives of employers and unions set, after negotiation, the minimum wage conditions as well as
Original PR description
Purpose ======= In Belgium, the job market is divided into "sectors": chemicals, metals, banks, department stores, pharmacies ... This breakdown is made on the basis of the activities of the company.…
Purpose
=======
In Belgium, the job market is divided into "sectors": chemicals, metals, banks,
department stores, pharmacies ... This breakdown is made on the basis of the
activities of the company. In order to be able to ensure the functioning of the
sectors, each sector has its own consultation body, called the "joint commission".
A joint committee is a consultation body in which representatives of employers
and unions set, after negotiation, the minimum wage conditions as well as the
working conditions in legal texts, called “collective labor agreements”. These
are applicable to all employees in a specific sector.
These are agreements that employers and workers in a given sector must make and
respect. These agreements may be different from one sector to another. Each sector
has its label and number.
The CP 200 is the auxiliary joint committee of employees (CPAE). About a quarter
of private sector companies and employees in Belgium are found in CP 200. This
makes it the largest and most diverse CP in the country!
TaskID: 2352568
Specification
=============
Most of the different use cases that we can face in belgian payroll for CP200
have been tested and validated by a fiscal expert. Briefly, it covers the following
use cases:
- Unpaid time off
- Legal time off
- Credit time
- Classical
- With paid time off
- With unpaid time off
- With sick time off
- Starting in the middle of a month
- Full time (O hours / week)
- Half-days in working hours
- Classical
- With full-day time off
- With half-day time off
- Low salaries
- Back-to-work - Sick time off
- Relapse
- Guaranteed salary
- Long sick off (+1 month)
- Student contracts
- Posted Employess
- Without ONSS
- Wihtout withholding taxes
- Public Holiday
- Classical (during the working hours)
- Compensation (during the week end)
- After the end of the contract
- Note: Variable compensation is not handled yet, but it's planned
- Brief Holiday (In french: "Petit Chômage")
- 1 day
- 1 week
- Note: Variable compensation is not handled yet, but it's planned
- 1 day for unpredictable reason
- End of contract in the middle of the month
- Half-days time off
- New design of the payslip to improve readability
The detailed list of the fixes/improvements is the following:
- 1/ hr_work_entry_contract: Define 1 leave work entry per presence
Purpose:
Some sick time off have to be defined into different work entry types, according
to the type of sick leaves.
Example: after 30 calendar days of sick leaves, the employee is not paid by the
same organism and therefore, the time off should be reported into different work
entry types.
Specification:
Instead of creating a big work entry per time off, create as many work entries
as there should have been presence work entries.
- 2/ hr_work_entries: Prevent users deleting work entries
Prefer to archive them instead.
- 3/ hr_work_entry: Display work entry type on calendar views
- 4/ web: Add styling classes for report
Purpose:
Those classes are useful for the payslip printed pdf reports, but some
of them are useless for any kind of report, and thus the classes have
been defined in the web addons.
Task-2341886
- 5/ resources: Take company attendances/global leaves on creation
Purpose:
When creating a new calendar (38 hours/week) on a Belgian company,
the new calendar is prefilled on a 40 hours/week basis, even if the
company calendar is correctly defined.
Specification:
Copy the global time off + the attendances on the company calendar
on company modification
- 6/ hr_holidays: Allow to refuse overlapping time offs
Purpose:
It's normally not possible to create 2 time off that overlaps on the
same period.
But, if for a given reason it happens on a production database, it should
be possible to refuse those time off. Otherwise, the user is stuck with
this wrong configuration.
- 7/ hr_holidays: Prevent creating time off of 0 hours
Purpose:
It makes no sense + it could cause conflicts when generating the work
entries
- 8/ resource: Add method to retrieve the longest work day
Purpose:
Add a method on the calendar to retrieve the maximum number of hours
an employee is supposed to work.
Example:
Monday: 8-12, 13-17
Tuesday: 8-12, 13-17
Wednesday: 8-12
Thurday: Off
Friday: Off
The method will return 8
- 9/ hr_holidays: Adapt query counter due to changes on hr_payroll
See: https://github.com/odoo/enterprise/pull/13848/
- 10/ hr_payroll: Update translations
Lots of new terms have been added on the printed reports, etc...
- 11/ l10n_be_hr_payroll: Consider out of contract public holiday
Purpose:
If there is a public holiday less than 30 days after the end of the
contract, the employee should be paid for that day too
- 12/ l10n_be_hr_payroll_posted_employee: Add an easy way to create a public time off
Purpose:
Public time off should be created via the calendar (at least for belgian companies using payroll).
The reason behind this is that there should be a resource.calendar.leaves available even if the
employee ends its contract. If it's created using a hr.leave, there won't be any
resource.calendar.leave as the employee is not supposed to work anymore at that time.
When an employee leaves the company, it's possible that he's paid for public time off if it
occurs less than 30 days after the end of his contract.
- 13/ l10n_be_hr_payroll: Rename bank holiday into Public holiday
Purpose:
A bank holiday is a specific holiday name, not the generic one.
- 14/ hr_work_entry_contract: Add menuitem to access calendars
It shouldn't be required to enter debug mode to access this information.
- 15/ l10n_be_hr_payroll_posted_employee: Add support for posted employees
Purpose:
https://www.socialsecurity.be/citizen/fr/travailleur-salarie-occupe-en-belgique-detache-a-l-etranger
- 16/ l10n_be_hr_payroll: Implement guaranteed wage/relapse for sick leaves
Purpose:
Guaranteed salary for employees:
The employee who is incapacitated for work as a result of a work accident, an accident on
the way to work or an occupational disease retains, at the employer's expense, the right to
his remuneration for the first 30 days of incapacity for work. The daily allowances relating
to this period are paid to the employer by the body responsible for industrial accidents or
by the Fund for Occupational Diseases.
Successive disabilities - relapse:
It is possible that a worker will be unable to work during different successive periods.
When two incapacities follow one another without interruption (for example, accident followed by
illness; successive illnesses of a different nature), there is only one period of incapacity and
the guaranteed remuneration is not due again. time.
On the other hand, we talk about relapse when a new disability occurs after the worker has returned
to work normally.
In this case, the guaranteed remuneration is not due again when the new incapacity for work occurs
within the first 14 days following the end of a period of incapacity for work giving rise to the
payment of the guaranteed remuneration.
However, there is still a right to the guaranteed salary for the part remaining to run, if the first
period of incapacity has not exhausted the entire right to the guaranteed salary during the first
period of incapacity. A new guaranteed wage is also due again when the worker establishes by a
medical certificate that this new incapacity for work is due to another illness or to another
accident.
- 17/ hr_work_entry_contract: Define 1 leave work entry per presence
Purpose:
Some sick time off have to be defined into different work entry types, according
to the type of sick leaves.
Example: after 30 calendar days of sick leaves, the employee is not paid by the
same organism and therefore, the time off should be reported into different work
entry types.
Specification:
Instead of creating a big work entry per time off, create as many work entries
as there should have been presence work entries.
- 18/ test_l10n_be_hr_payroll: Add test for full time credit time
- 19/ test_l10n_be_hr_payroll: Add test for out of contract credit time
- 20/ test_l10n_be_hr_payroll: Avoid undeterministic bug on generated tests
- 21/ hr_payroll: Don't display out of contract line on pdf
- 22/ test_l10n_be_hr_payroll: Fix undeterministic test crashes
- 23/ payroll : Improve the printed payslip report
Improves the design of the payslip report
Generates the report in the employee's language (add a message if the lang is not official)
Adds some data to Laurie Poiret
Task-2341886
- 24/ test_l10n_be_hr_payroll_account: Add test for unjustified reasons
- 25/ test_l10n_be_hr_payroll_account: Add tests for small unemployment
- 26/ test_l10n_be_hr_payroll_account: Add tests for half days time off
- 27/ test_l10n_be_hr_payroll_account: Fix false positive
- 28/ hr_holidays: Prevent creating time off of 0 hours
Purpose:
It makes no sense + it could cause conflicts when generating the work
entries
- 29/ test_l10n_be_hr_payroll_account: Add test for end of contract
- 30/ test_l10n_be_hr_payroll_account: Add tests for public holidays
- 31/ hr_payroll: Display amount if hourly wage
- 32/ hr_work_entry_contract: Allow creating record on gantt view
- 33/ l10n_be_hr_payroll: Add new structure for student employees
Purpose:
Also bring some fixes on fields display + hours/days counts
TaskID: 2347843
- 34/ test_l10n_be_hr_payroll_account: Add test for low salaries
Ensure the correct computation of the employment bonus.
- 35/ l10n_be_hr_payroll: Make separate lines for half/full worked days
Purpose:
Worked days should be separated between the complete full days and the
half days.
Example:
I work on Monday, Tuesday, Wednesday (half day)
The calculation is OK, but the number of days is, in principle, 14 in the month of
September 2020 (9 full and 5 in half-days). This number of days should be the subject
of 2 separate lines:
9 days - 68.4 hours - € 1,100.77
5 days (in the form of half-days) - 19 hours - 224.33 €.
In this case, we cannot use the hourly formula since the monthly salary must always be
the same, without having an identical number of working days.
The worker benefits from 14 meal vouchers. The number of days must however correspond
to the number of meal vouchers so that the worker can check.
- 36/ test_l10n_be_hr_payroll: Test credit time with sick leaves
- 37/ test_l10n_be_hr_payroll_account: Test credit time with unpaid leaves
- 38/ l10n_be_hr_payroll: Don't consider time off as credit times
Purpose:
When generating the work entries, we compare the standard attendances
(i.e. the full time contract) and the credit time attendances to
deduct the intervals on which the employee is on credit time.
But if the employee is on a time off during a period, those intervals
will be removed from the supposed attendances, and then those periods
are considered as credit time.
- 39/ l10n_be_hr_payroll: Fix credit time amount on payslip computation
Purpose:
The time credit days must not include a corresponding amount.
In fact, no remuneration is linked to the taking of time credits. The necessary modifications
are:
Code LEAVE300 -> no amount
- 40/ hr_payroll: Export standard calendar if needed on payslip export
- 41/ l10n_be_hr_payroll: Fix worked days lines amount computation
Purpose:
The amount was computed as a simple ratio based on the number of days.
To be correct and compliant with the law, we should consider the hourly
equivalent wage, and compute the amount based on the worked hours.
- 42/ l10n_be_hr_payroll: Fix unpaid worked days amount computation
Purpose:
Don't use the normal wage which is an integer btw.
Compute the worked days amount using the classic hourly computation formula
- 43/ l10n_be_hr_payroll: Fix unpaid leaves retenues formula
Purpose:
Unpaid leave must be deducted from the usual gross monthly salary
up to the number of working hours concerned.
The formula is in principle the following:
gross monthly salary * 3/12/38 -> “usual” hourly salary.
So, in the case of 2 days of unpaid leave, corresponding to 15.2 hours,
the formula is as follows: 2650 * 3/13/38 * 15.2 = 244.61 €.
The gross for the days actually worked is € 2,650 - € 244.61, or € 2,405.39
- 44/ hr_payroll: Generate python test from arbitrary payslip
When the payroll is incorrect, the feedback that we receive is
generally: "this doesn't work".
This commit add a route in the controller of hr_payroll, to export
in a python file, all data useful to reproduce the exact employee
situation about the incorrect payslip.
Before testing and fixing the incorrect payslip, we need to anonymize all
sensitive data about the employee. This commit converts all sensitive
data into demo data.
This commit add a button in payslip form view to use the new route to
export all data about the incorrect payroll.
This button is only displayed when we are in debug mode and the current
user is a payroll manager.
task-2337786
Forward-Port-Of: odoo/odoo#60084
Forward-Port-Of: odoo/odoo#59367[IMP] account: add compute_fiscalyear_dates method on res.company The following commits https://github.com/odoo/odoo/commit/576a69e29e98532aa5de78eb3fcbff0b94cea32d https://github.com/odoo-dev/enterprise/commit/ed383522791276b17ba68a4f0d08f9e3ed4e783c move the compute_fiscalyear_dates method from the community account module to the enterprise one account_accounting. This commit ensures that the method can be used when account_accounting is not installed. As the fiscal year is ir
Original PR description
[IMP] account: add compute_fiscalyear_dates method on res.company The following commits https://github.com/odoo/odoo/commit/576a69e29e98532aa5de78eb3fcbff0b94cea32d https://github.com/odoo-dev/enterprise/commit/ed383522791276b17ba68a4f0d08f9e3ed4e783c move the compute_fiscalyear_dates method from the community account module to the enterprise one account_accounting. This commit ensures that the method can be used when account_accounting is not installed. As the fiscal year is irrelevant when account_accounting is not installed, this commit displays the calendar year. taskid: 2329108 See also: taskid 220194 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#60101
The 'Bills To pay' filter show fully paid bills Cause The condition 'payment_state != paid' does not exist Solution Add the condition to the 'bills_to_pay' domain opw-2361666 Forward-Port-Of: odoo/enterprise#14111
Original PR description
The 'Bills To pay' filter show fully paid bills
Cause
The condition 'payment_state != paid' does not exist
Solution
Add the condition to the 'bills_to_pay' domain
opw-2361666
Forward-Port-Of: odoo/enterprise#14111Purpose ======= In Belgium, the job market is divided into "sectors": chemicals, metals, banks, department stores, pharmacies ... This breakdown is made on the basis of the activities of the company. In order to be able to ensure the functioning of the sectors, each sector has its own consultation body, called the "joint commission". A joint committee is a consultation body in which representatives of employers and unions set, after negotiation, the minimum wage conditions as well as
Original PR description
Purpose ======= In Belgium, the job market is divided into "sectors": chemicals, metals, banks, department stores, pharmacies ... This breakdown is made on the basis of the activities of the company.…
Purpose
=======
In Belgium, the job market is divided into "sectors": chemicals, metals, banks,
department stores, pharmacies ... This breakdown is made on the basis of the
activities of the company. In order to be able to ensure the functioning of the
sectors, each sector has its own consultation body, called the "joint commission".
A joint committee is a consultation body in which representatives of employers
and unions set, after negotiation, the minimum wage conditions as well as the
working conditions in legal texts, called “collective labor agreements”. These
are applicable to all employees in a specific sector.
These are agreements that employers and workers in a given sector must make and
respect. These agreements may be different from one sector to another. Each sector
has its label and number.
The CP 200 is the auxiliary joint committee of employees (CPAE). About a quarter
of private sector companies and employees in Belgium are found in CP 200. This
makes it the largest and most diverse CP in the country!
TaskID: 2352568
Specification
=============
Most of the different use cases that we can face in belgian payroll for CP200
have been tested and validated by a fiscal expert. Briefly, it covers the following
use cases:
- Unpaid time off
- Legal time off
- Credit time
- Classical
- With paid time off
- With unpaid time off
- With sick time off
- Starting in the middle of a month
- Full time (O hours / week)
- Half-days in working hours
- Classical
- With full-day time off
- With half-day time off
- Low salaries
- Back-to-work - Sick time off
- Relapse
- Guaranteed salary
- Long sick off (+1 month)
- Student contracts
- Posted Employess
- Without ONSS
- Wihtout withholding taxes
- Public Holiday
- Classical (during the working hours)
- Compensation (during the week end)
- After the end of the contract
- Note: Variable compensation is not handled yet, but it's planned
- Brief Holiday (In french: "Petit Chômage")
- 1 day
- 1 week
- Note: Variable compensation is not handled yet, but it's planned
- 1 day for unpredictable reason
- End of contract in the middle of the month
- Half-days time off
- New design of the payslip to improve readability
The detailed list of the fixes/improvements is the following:
- 1/ hr_work_entry_contract: Define 1 leave work entry per presence
Purpose:
Some sick time off have to be defined into different work entry types, according
to the type of sick leaves.
Example: after 30 calendar days of sick leaves, the employee is not paid by the
same organism and therefore, the time off should be reported into different work
entry types.
Specification:
Instead of creating a big work entry per time off, create as many work entries
as there should have been presence work entries.
- 2/ hr_work_entries: Prevent users deleting work entries
Prefer to archive them instead.
- 3/ hr_work_entry: Display work entry type on calendar views
- 4/ web: Add styling classes for report
Purpose:
Those classes are useful for the payslip printed pdf reports, but some
of them are useless for any kind of report, and thus the classes have
been defined in the web addons.
Task-2341886
- 5/ resources: Take company attendances/global leaves on creation
Purpose:
When creating a new calendar (38 hours/week) on a Belgian company,
the new calendar is prefilled on a 40 hours/week basis, even if the
company calendar is correctly defined.
Specification:
Copy the global time off + the attendances on the company calendar
on company modification
- 6/ hr_holidays: Allow to refuse overlapping time offs
Purpose:
It's normally not possible to create 2 time off that overlaps on the
same period.
But, if for a given reason it happens on a production database, it should
be possible to refuse those time off. Otherwise, the user is stuck with
this wrong configuration.
- 7/ hr_holidays: Prevent creating time off of 0 hours
Purpose:
It makes no sense + it could cause conflicts when generating the work
entries
- 8/ resource: Add method to retrieve the longest work day
Purpose:
Add a method on the calendar to retrieve the maximum number of hours
an employee is supposed to work.
Example:
Monday: 8-12, 13-17
Tuesday: 8-12, 13-17
Wednesday: 8-12
Thurday: Off
Friday: Off
The method will return 8
- 9/ hr_holidays: Adapt query counter due to changes on hr_payroll
See: https://github.com/odoo/enterprise/pull/13848/
- 10/ hr_payroll: Update translations
Lots of new terms have been added on the printed reports, etc...
- 11/ l10n_be_hr_payroll: Consider out of contract public holiday
Purpose:
If there is a public holiday less than 30 days after the end of the
contract, the employee should be paid for that day too
- 12/ l10n_be_hr_payroll_posted_employee: Add an easy way to create a public time off
Purpose:
Public time off should be created via the calendar (at least for belgian companies using payroll).
The reason behind this is that there should be a resource.calendar.leaves available even if the
employee ends its contract. If it's created using a hr.leave, there won't be any
resource.calendar.leave as the employee is not supposed to work anymore at that time.
When an employee leaves the company, it's possible that he's paid for public time off if it
occurs less than 30 days after the end of his contract.
- 13/ l10n_be_hr_payroll: Rename bank holiday into Public holiday
Purpose:
A bank holiday is a specific holiday name, not the generic one.
- 14/ hr_work_entry_contract: Add menuitem to access calendars
It shouldn't be required to enter debug mode to access this information.
- 15/ l10n_be_hr_payroll_posted_employee: Add support for posted employees
Purpose:
https://www.socialsecurity.be/citizen/fr/travailleur-salarie-occupe-en-belgique-detache-a-l-etranger
- 16/ l10n_be_hr_payroll: Implement guaranteed wage/relapse for sick leaves
Purpose:
Guaranteed salary for employees:
The employee who is incapacitated for work as a result of a work accident, an accident on
the way to work or an occupational disease retains, at the employer's expense, the right to
his remuneration for the first 30 days of incapacity for work. The daily allowances relating
to this period are paid to the employer by the body responsible for industrial accidents or
by the Fund for Occupational Diseases.
Successive disabilities - relapse:
It is possible that a worker will be unable to work during different successive periods.
When two incapacities follow one another without interruption (for example, accident followed by
illness; successive illnesses of a different nature), there is only one period of incapacity and
the guaranteed remuneration is not due again. time.
On the other hand, we talk about relapse when a new disability occurs after the worker has returned
to work normally.
In this case, the guaranteed remuneration is not due again when the new incapacity for work occurs
within the first 14 days following the end of a period of incapacity for work giving rise to the
payment of the guaranteed remuneration.
However, there is still a right to the guaranteed salary for the part remaining to run, if the first
period of incapacity has not exhausted the entire right to the guaranteed salary during the first
period of incapacity. A new guaranteed wage is also due again when the worker establishes by a
medical certificate that this new incapacity for work is due to another illness or to another
accident.
- 17/ hr_work_entry_contract: Define 1 leave work entry per presence
Purpose:
Some sick time off have to be defined into different work entry types, according
to the type of sick leaves.
Example: after 30 calendar days of sick leaves, the employee is not paid by the
same organism and therefore, the time off should be reported into different work
entry types.
Specification:
Instead of creating a big work entry per time off, create as many work entries
as there should have been presence work entries.
- 18/ test_l10n_be_hr_payroll: Add test for full time credit time
- 19/ test_l10n_be_hr_payroll: Add test for out of contract credit time
- 20/ test_l10n_be_hr_payroll: Avoid undeterministic bug on generated tests
- 21/ hr_payroll: Don't display out of contract line on pdf
- 22/ test_l10n_be_hr_payroll: Fix undeterministic test crashes
- 23/ payroll : Improve the printed payslip report
Improves the design of the payslip report
Generates the report in the employee's language (add a message if the lang is not official)
Adds some data to Laurie Poiret
Task-2341886
- 24/ test_l10n_be_hr_payroll_account: Add test for unjustified reasons
- 25/ test_l10n_be_hr_payroll_account: Add tests for small unemployment
- 26/ test_l10n_be_hr_payroll_account: Add tests for half days time off
- 27/ test_l10n_be_hr_payroll_account: Fix false positive
- 28/ hr_holidays: Prevent creating time off of 0 hours
Purpose:
It makes no sense + it could cause conflicts when generating the work
entries
- 29/ test_l10n_be_hr_payroll_account: Add test for end of contract
- 30/ test_l10n_be_hr_payroll_account: Add tests for public holidays
- 31/ hr_payroll: Display amount if hourly wage
- 32/ hr_work_entry_contract: Allow creating record on gantt view
- 33/ l10n_be_hr_payroll: Add new structure for student employees
Purpose:
Also bring some fixes on fields display + hours/days counts
TaskID: 2347843
- 34/ test_l10n_be_hr_payroll_account: Add test for low salaries
Ensure the correct computation of the employment bonus.
- 35/ l10n_be_hr_payroll: Make separate lines for half/full worked days
Purpose:
Worked days should be separated between the complete full days and the
half days.
Example:
I work on Monday, Tuesday, Wednesday (half day)
The calculation is OK, but the number of days is, in principle, 14 in the month of
September 2020 (9 full and 5 in half-days). This number of days should be the subject
of 2 separate lines:
9 days - 68.4 hours - € 1,100.77
5 days (in the form of half-days) - 19 hours - 224.33 €.
In this case, we cannot use the hourly formula since the monthly salary must always be
the same, without having an identical number of working days.
The worker benefits from 14 meal vouchers. The number of days must however correspond
to the number of meal vouchers so that the worker can check.
- 36/ test_l10n_be_hr_payroll: Test credit time with sick leaves
- 37/ test_l10n_be_hr_payroll_account: Test credit time with unpaid leaves
- 38/ l10n_be_hr_payroll: Don't consider time off as credit times
Purpose:
When generating the work entries, we compare the standard attendances
(i.e. the full time contract) and the credit time attendances to
deduct the intervals on which the employee is on credit time.
But if the employee is on a time off during a period, those intervals
will be removed from the supposed attendances, and then those periods
are considered as credit time.
- 39/ l10n_be_hr_payroll: Fix credit time amount on payslip computation
Purpose:
The time credit days must not include a corresponding amount.
In fact, no remuneration is linked to the taking of time credits. The necessary modifications
are:
Code LEAVE300 -> no amount
- 40/ hr_payroll: Export standard calendar if needed on payslip export
- 41/ l10n_be_hr_payroll: Fix worked days lines amount computation
Purpose:
The amount was computed as a simple ratio based on the number of days.
To be correct and compliant with the law, we should consider the hourly
equivalent wage, and compute the amount based on the worked hours.
- 42/ l10n_be_hr_payroll: Fix unpaid worked days amount computation
Purpose:
Don't use the normal wage which is an integer btw.
Compute the worked days amount using the classic hourly computation formula
- 43/ l10n_be_hr_payroll: Fix unpaid leaves retenues formula
Purpose:
Unpaid leave must be deducted from the usual gross monthly salary
up to the number of working hours concerned.
The formula is in principle the following:
gross monthly salary * 3/12/38 -> “usual” hourly salary.
So, in the case of 2 days of unpaid leave, corresponding to 15.2 hours,
the formula is as follows: 2650 * 3/13/38 * 15.2 = 244.61 €.
The gross for the days actually worked is € 2,650 - € 244.61, or € 2,405.39
- 44/ hr_payroll: Generate python test from arbitrary payslip
When the payroll is incorrect, the feedback that we receive is
generally: "this doesn't work".
This commit add a route in the controller of hr_payroll, to export
in a python file, all data useful to reproduce the exact employee
situation about the incorrect payslip.
Before testing and fixing the incorrect payslip, we need to anonymize all
sensitive data about the employee. This commit converts all sensitive
data into demo data.
This commit add a button in payslip form view to use the new route to
export all data about the incorrect payroll.
This button is only displayed when we are in debug mode and the current
user is a payroll manager.
task-2337786
Forward-Port-Of: odoo/enterprise#14108
Forward-Port-Of: odoo/enterprise#13848Forward-Port-Of: odoo/enterprise#14104
Original PR description
Forward-Port-Of: odoo/enterprise#14104
In the hr.expense form view, the extract_remote_id field (showing as "Id of the request to IAP-OCR") was positioned at the end of the form. It will now appear directly after company_id (if visible) and before the notes, giving a more compact view. Task 2350182 Forward-Port-Of: odoo/enterprise#13802
Original PR description
In the hr.expense form view, the extract_remote_id field (showing as "Id of the request to IAP-OCR") was positioned at the end of the form. It will now appear directly after company_id (if visible) and before the notes, giving a more compact view. Task 2350182 Forward-Port-Of: odoo/enterprise#13802
when we create the Ticket with empty team in helpdesk module and we try to assign it produces singleton error Purpose of this task to solve singleton error TaskID: 2346056 Forward-Port-Of: odoo/enterprise#13567
Original PR description
when we create the Ticket with empty team in helpdesk module and we try to assign it produces singleton error Purpose of this task to solve singleton error TaskID: 2346056 Forward-Port-Of: odoo/enterprise#13567
in employee app when we create Contract Templates there are two structure_type_id purpose of this task to remove duplicate structure_type_id field in form view TaskID: 2345800 Forward-Port-Of: odoo/enterprise#13487
Original PR description
in employee app when we create Contract Templates there are two structure_type_id purpose of this task to remove duplicate structure_type_id field in form view TaskID: 2345800 Forward-Port-Of: odoo/enterprise#13487
Issue - Install Accounting - Enable Analytic Accounting and Budget Management - Go to Configuration/Analytic Accounts - Try to create new analytic account and add a line Cause The 'date_to' and 'date_from' are not initialized yet. Solution Skip the '_compute' when the variables are 'False' and add depends to 'date_to' and 'date_from' opw-2358697 Forward-Port-Of: odoo/enterprise#14096
Original PR description
Issue
- Install Accounting
- Enable Analytic Accounting and Budget Management
- Go to Configuration/Analytic Accounts
- Try to create new analytic account and add a line
Cause
The 'date_to' and 'date_from' are not initialized yet.
Solution
Skip the '_compute' when the variables are 'False' and add depends to 'date_to' and 'date_from'
opw-2358697
Forward-Port-Of: odoo/enterprise#14096task-2337827 Forward-Port-Of: odoo/enterprise#14073
Original PR description
task-2337827 Forward-Port-Of: odoo/enterprise#14073
Issue - Install "Website" and "Studio" module - Create with 'Mitchel Admin' a company X2 ( Ensure that Marc Demo does not have access to it ) - Switch to X2 company - On main menu page, open studio - On left upper corner, click on "Change Background", select an image then close studio - Log off and log in with Marc Demo Access error message; can't access `/web` url: "Only employee can access this database. Please contact the administrator'. Cause Trying to get ba
Original PR description
Issue - Install "Website" and "Studio" module - Create with 'Mitchel Admin' a company X2 ( Ensure that Marc Demo does not have access to it ) - Switch to X2 company - On main menu page, open studio - On left upper corner, click on "Change Background", select an image then close studio - Log off and log in with Marc Demo Access error message; can't access `/web` url: "Only employee can access this database. Please contact the administrator'. Cause Trying to get background with wrong rights since the context 'allowed_company_ids' is set with `cids` from cookies who are related to the first user (Mitchel Admin). Solution If current user has no access to company in cids (request cookies), then fetch background with user.company_id as allowed_company_ids instead. opw-2336865 Forward-Port-Of: odoo/enterprise#14069
Currently, In Resume when we change the company it doesn't filter the resume company wise. So, in this commit added record rule with domain to filter the salary structure type company wise in resume. TaskId: 2341468 Forward-Port-Of: odoo/enterprise#13652
Original PR description
Currently, In Resume when we change the company it doesn't filter the resume company wise. So, in this commit added record rule with domain to filter the salary structure type company wise in resume. TaskId: 2341468 Forward-Port-Of: odoo/enterprise#13652
The _convert function will round the result using the rounding field on the resulting currency. In this case the resulting currency will always be COP, since this module is meant for Colombian companies. COP has no cents, all amounts are integers. As a result currency_rate always ends up being "x.00". This solves that by manually calculating the value without the _convert method. Note that the "%.2f" format specifier doesn't truncate the value. It correctly rounds, similar to using roun
Original PR description
The _convert function will round the result using the rounding field on the resulting currency. In this case the resulting currency will always be COP, since this module is meant for Colombian companies. COP has no cents, all amounts are integers. As a result currency_rate always ends up being "x.00". This solves that by manually calculating the value without the _convert method. Note that the "%.2f" format specifier doesn't truncate the value. It correctly rounds, similar to using round(x, 2). opw-2350026 Forward-Port-Of: odoo/enterprise#14046 Forward-Port-Of: odoo/enterprise#13934
Currently, In documents when we share the file the odoo logo in the template is cropped. So, in this commit resize the odoo logo width now its properly display in a sharable link. Task Id: 2346746 Forward-Port-Of: odoo/enterprise#13614
Original PR description
Currently, In documents when we share the file the odoo logo in the template is cropped. So, in this commit resize the odoo logo width now its properly display in a sharable link. Task Id: 2346746 Forward-Port-Of: odoo/enterprise#13614
Before, In the 'Expense' setting we don't have the "Buy Credits" widget and 'View My Service' button. The purpose of this task is to add those and are only visible when the feature is ticked and should redirect to the same pages as for the 'Bill Digitalization' feature By this commit, it will be improved. task:- 2341801 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#13563
Original PR description
Before, In the 'Expense' setting we don't have the "Buy Credits" widget and 'View My Service' button. The purpose of this task is to add those and are only visible when the feature is ticked and should redirect to the same pages as for the 'Bill Digitalization' feature By this commit, it will be improved. task:- 2341801 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#13563
Task [2326251](https://www.odoo.com/web#id=2326251&action=333&active_id=967&model=project.task&view_type=form&cids=1&menu_id=4720) A recompute of the original value of the asset made the values wrong. This fix removes the specificities related to the UoM because we can't know inside the recompute which asset is which part of the invoice line. Forward-Port-Of: odoo/enterprise#13370
Original PR description
Task [2326251](https://www.odoo.com/web#id=2326251&action=333&active_id=967&model=project.task&view_type=form&cids=1&menu_id=4720) A recompute of the original value of the asset made the values wrong. This fix removes the specificities related to the UoM because we can't know inside the recompute which asset is which part of the invoice line. Forward-Port-Of: odoo/enterprise#13370
This PR replaces #13514. Task 2297054, additional specification from review Forward-Port-Of: odoo/enterprise#13641
Original PR description
This PR replaces #13514. Task 2297054, additional specification from review Forward-Port-Of: odoo/enterprise#13641
Before this commit, the following warning was obtained upon assets building: ``` 2020-10-06 13:34:39,957 80410 WARNING demo_140_1601990640 odoo.addons.base.models.assetsbundle: Error: Top-level selectors may not contain the parent selector "&". on line 27144 of /stdin >> &.o_planning_progress_gantt_#{$index - 1} { ----^ ``` Taskid: 2352697 Forward-Port-Of: odoo/enterprise#13852
Original PR description
Before this commit, the following warning was obtained upon assets building:
```
2020-10-06 13:34:39,957 80410 WARNING demo_140_1601990640 odoo.addons.base.models.assetsbundle: Error: Top-level selectors may not contain the parent selector "&".
on line 27144 of /stdin
>> &.o_planning_progress_gantt_#{$index - 1} {
----^
```
Taskid: 2352697
Forward-Port-Of: odoo/enterprise#13852With l10n_be installed and the sample bill posted, there is a traceback happening when opening the unrealized currency gain/loss report. How to reproduce locally: - Install l10n_be, switch on the belgian company and follow the first steps of the onboarding until the sample bill is posted - Activate multi-currency - Create and post a new bill in a foreign currency - Open the report => Traceback because Odoo try to compare a bool and a string when it doesn't have
Original PR description
With l10n_be installed and the sample bill posted, there is a traceback
happening when opening the unrealized currency gain/loss report.
How to reproduce locally:
- Install l10n_be, switch on the belgian company and follow the
first steps of the onboarding until the sample bill is posted
- Activate multi-currency
- Create and post a new bill in a foreign currency
- Open the report => Traceback because Odoo try to compare a bool
and a string when it doesn't have a value
Task id #2337228
Forward-Port-Of: odoo/enterprise#13130It was put in the post init hook of `account`, but it installed account_accountant instead of only invoicing. Also add US and CA as those countries use cash basis as well. Community PR: https://github.com/odoo/odoo/pull/59849 Forward-Port-Of: odoo/enterprise#14021
Original PR description
It was put in the post init hook of `account`, but it installed account_accountant instead of only invoicing. Also add US and CA as those countries use cash basis as well. Community PR: https://github.com/odoo/odoo/pull/59849 Forward-Port-Of: odoo/enterprise#14021
when try to add line in resume, user can not add the line because user can not add description for that line. so that it show warning. LINKS PR - #12739 TaskID - 2326538 Forward-Port-Of: odoo/enterprise#12739
Original PR description
when try to add line in resume, user can not add the line because user can not add description for that line. so that it show warning. LINKS PR - #12739 TaskID - 2326538 Forward-Port-Of: odoo/enterprise#12739
Before this commit, when a partner receives a link to sign a document, the sign language will depend on the browser language, and the modal for signing will always be in English. Now, the language will be the one selected for the customer. opw-2347884 Co-authored-by: Nicolas Lempereur <nle@odoo.com> Forward-Port-Of: odoo/enterprise#13924
Original PR description
Before this commit, when a partner receives a link to sign a document, the sign language will depend on the browser language, and the modal for signing will always be in English. Now, the language will be the one selected for the customer. opw-2347884 Co-authored-by: Nicolas Lempereur <nle@odoo.com> Forward-Port-Of: odoo/enterprise#13924
…chers Purpose ======= On some tests, it could lead to false positive if the work entries creation and the meal vouchers computation are done during the same transaction. TASKID: 2357771 Forward-Port-Of: odoo/enterprise#13956 Forward-Port-Of: odoo/enterprise#13941
Original PR description
…chers Purpose ======= On some tests, it could lead to false positive if the work entries creation and the meal vouchers computation are done during the same transaction. TASKID: 2357771 Forward-Port-Of: odoo/enterprise#13956 Forward-Port-Of: odoo/enterprise#13941
This PR fixes a permission error with helpdesk_timesheet & helpdesk Before this commit, a user with "User" group for Helpdesk and no group for Timesheet was able to start timer if option "Timesheet Timer" was enable When he want to stop the timer, he got a permission error saying that he doesn't have permission to create an entry in Timesheet. This PR hides buttons to start a timer. More precisely, this commit check if the user is in groups helpdesk.group_helpdesk_user and hr_timesheet.g
Original PR description
This PR fixes a permission error with helpdesk_timesheet & helpdesk Before this commit, a user with "User" group for Helpdesk and no group for Timesheet was able to start timer if option "Timesheet Timer" was enable When he want to stop the timer, he got a permission error saying that he doesn't have permission to create an entry in Timesheet. This PR hides buttons to start a timer. More precisely, this commit check if the user is in groups helpdesk.group_helpdesk_user and hr_timesheet.group_hr_timesheet_user. I haven't found a way to check if user is in both groups with xml so I've created a new field called "display_timer" This PR also fixes a permission error with helpdesk (See commit description) Task id: 2326300 Forward-Port-Of: odoo/enterprise#13598 Forward-Port-Of: odoo/enterprise#13149
- Install Accounting, Subscriptions and Documents - Go to Documents > Configuration > Settings and activate Accounting: * Workspace: Finance * Journals: Customer Invoices - Finance - Go to Subscriptions > Configuration > Subscription Templates - Create or edit a Template (i.e. Mon - Monthly Subscription) with "Send" for "Create Invoice" - Create a Subscription: * Subscription Template: Mon - Monthly Subscription * Subscription Lines: [Any a product] - Switch Subscription state f
Original PR description
- Install Accounting, Subscriptions and Documents - Go to Documents > Configuration > Settings and activate Accounting: * Workspace: Finance * Journals: Customer Invoices - Finance - Go to…
- Install Accounting, Subscriptions and Documents - Go to Documents > Configuration > Settings and activate Accounting: * Workspace: Finance * Journals: Customer Invoices - Finance - Go to Subscriptions > Configuration > Subscription Templates - Create or edit a Template (i.e. Mon - Monthly Subscription) with "Send" for "Create Invoice" - Create a Subscription: * Subscription Template: Mon - Monthly Subscription * Subscription Lines: [Any a product] - Switch Subscription state from "Draft" to "In Progress" - Click on "Generate Invoice" button If it is the first generated invoice, it will be opened automatically and there will be no issue. If that is the case, generate another invoice and do not open it. - Go to Documents > Documents and select "Finance" Workspace The generated invoice from Subscription will not appear as long as it will not be opened. The Document is created from "message_main_attachment_id" field of invoice, but this field is not set when invoice is created and sent in Subscriptions. opw-2345618 closes odoo/enterprise#14003 Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com> This is the 14.0 forward-port of https://github.com/odoo/enterprise/pull/14003 Forward-Port-Of: odoo/enterprise#14064