Daily updates from Odoo
Navigate
Branch
Thursday, May 6, 2021
11 changes
Enhancements to existing features
The contract list can now optionally show whether an employee has a company car and the related fuel type. This helps payroll and HR teams review fleet-related contract information more quickly without opening each contract.
Original PR description
Adds company_car and fuel type as optional fields on the contract tree view.
Code cleanup and technical improvements
Manufacturing planning screens that use Gantt timelines are now handled as an Enterprise feature, aligning them with the Enterprise Gantt capability. The update also fixes a quality control workflow issue so related manufacturing tests and actions behave consistently even when optional quality modules are installed.
Original PR description
Enterprise counterpart of https://github.com/odoo/odoo/pull/48707
Miscellaneous changes
To reproduce: 1) Create a tax for 42% with no account on tax repartition lines 2) Make an invoice with two lines at 100$, each using this tax, each on a different base account 3) Post the invoice ===> In the tax report 42 is shown as tax amount instead of 84. This is because the tax lines are made on the base account of the line in this case (since nothing is specified on repartition lines) ; the SQL query run by the tax report groups by account, and we hence get two lines for
Original PR description
To reproduce:
1) Create a tax for 42% with no account on tax repartition lines
2) Make an invoice with two lines at 100$, each using this tax, each on a different base account
3) Post the invoice
===> In the tax report 42 is shown as tax amount instead of 84. This is because the tax lines are made on the base account of the line in this case (since nothing is specified on repartition lines) ; the SQL query run by the tax report groups by account, and we hence get two lines for the same tax here. The second one overwrites the first instead of adding itself to it.
[IMP] account_reports: add test for this case, as well as for https://github.com/odoo/odoo/pull/70034
Forward-Port-Of: odoo/enterprise#18052
Forward-Port-Of: odoo/enterprise#18019Forward-Port-Of: odoo/enterprise#16217
Original PR description
Forward-Port-Of: odoo/enterprise#16217
The export of custom modules does not contain the default values. This leads to a second problem: if a model can be archived, since the default value of `active` is not defined, the new records will be considered as archived. To reproduce the error: 1. Enable Studio mode 2. New App, New Model M - Enable the "Archiving" feature 3. On M's form, add a default value to "Name" field 4. Back on Odoo menu, still in Studio mode: - Customizations > Export > Save on your device 5. Ope
Original PR description
The export of custom modules does not contain the default values. This leads to a second problem: if a model can be archived, since the default value of `active` is not defined, the new records will…
The export of custom modules does not contain the default values. This
leads to a second problem: if a model can be archived, since the default
value of `active` is not defined, the new records will be considered as
archived.
To reproduce the error:
1. Enable Studio mode
2. New App, New Model M
- Enable the "Archiving" feature
3. On M's form, add a default value to "Name" field
4. Back on Odoo menu, still in Studio mode:
- Customizations > Export > Save on your device
5. Open a new DB
6. In Studio mode:
- Customizations > Import > Select .zip
7. Close Studio mode
8. Create a new M
Error: The default value of "Name" field is not present. Worst, the
"Archived" label is displayed on the form: the new record will be
archived.
The data export does not include the default values (`ir.default`). To
retrieve the data, the export is based on the `ir.model.data` table.
This is the reason why this fix suggests that `ir.model.data` should
include `ir.default` records that are created for fields used in custom
modules.
OPW-2476907
Forward-Port-Of: odoo/enterprise#18112This commit reverts the one of this PR https://github.com/odoo/enterprise/pull/15399 (92fe0bae317299ad10f65f7fce2afe99fa8801f1) which introduced a bug where the instruction steps no longer automatically changed the worksheet_page. opw-2505804 Forward-Port-Of: odoo/enterprise#18157
Original PR description
This commit reverts the one of this PR https://github.com/odoo/enterprise/pull/15399 (92fe0bae317299ad10f65f7fce2afe99fa8801f1) which introduced a bug where the instruction steps no longer automatically changed the worksheet_page. opw-2505804 Forward-Port-Of: odoo/enterprise#18157
Steps to reproduce: - Create an SO for a prepaid service in company A and confirm it - Create a project and a ticket in company B and select the customer linked to the SO you previously created - Unselect company A from the multi-company widget; only display the records from company B - Timesheet on the ticket you previously created Observed behavior: - The SOL set by default belongs to company A, thus generating an access right error when trying to timesheet on the ticket Ex
Original PR description
Steps to reproduce: - Create an SO for a prepaid service in company A and confirm it - Create a project and a ticket in company B and select the customer linked to the SO you previously created - Unselect company A from the multi-company widget; only display the records from company B - Timesheet on the ticket you previously created Observed behavior: - The SOL set by default belongs to company A, thus generating an access right error when trying to timesheet on the ticket Expected behavior: - The SOL set by default should belong to the same company as the ticket Related PR: odoo/odoo#69783 task-2515259 Forward-Port-Of: odoo/enterprise#18146 Forward-Port-Of: odoo/enterprise#17921
Adapt the holiday pay recovery according to the new law announced on the 23/03/2021, and adopted during April 2021. See: https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/intermediates#intermediate_row_196b32c7-9d98-4233-805d-ca9bf123ff48 When an employee changes employer, he receives the termination pay and a vacation certificate stating his vacation rights. When he subsequently takes vacation with his new employer, the latter must, when paying the simple vacation pay,
Original PR description
Adapt the holiday pay recovery according to the new law announced on the 23/03/2021, and adopted during April 2021. See:…
Adapt the holiday pay recovery according to the new law announced on the 23/03/2021, and
adopted during April 2021.
See: https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/intermediates#intermediate_row_196b32c7-9d98-4233-805d-ca9bf123ff48
When an employee changes employer, he receives the termination pay and a vacation certificate
stating his vacation rights. When he subsequently takes vacation with his new employer, the latter
must, when paying the simple vacation pay, take into account the termination pay that the former
employer has already paid.
From an exchange of letters with the SPF ETCS and the Inspectorate responsible for the control of
social laws, it turned out that when calculating the simple vacation pay, the new employer must
deduct the exit pay based on the number of vacation days taken. The rule in the ONSS instructions
according to which the new employer must take into account the exit vacation pay only once when the
employee takes his main vacation is abolished.
When the salary of an employee with his new employer is higher than the salary he had with his
previous employer, his new employer will have, each time he takes vacation days, to make a
calculation to supplement the nest egg. exit from these days up to the amount of the simple vacation
pay to which the worker is entitled.
Concretely:
- 2020 vacation certificate (full year):
- simple allowance 1,917.50 EUR
- this amounts to 1917.50 / 20 EUR = 95.875 EUR per day of vacation
- holidays 2021, for example when taking 5 days in April 2021
- monthly salary with the new employer: 3000.00 EUR / month
- simple nest egg:
- remuneration code 12: 5/20 x 1917.50 = 479.38 EUR
- remuneration code 1: (5/22 x 3000.00) - 479.38 = 202.44 EUR
- ordinary days for the month of April:
- remuneration code 1: 17/22 x 3000.00 = 2318.18 EUR
The examples included in the ONSS instructions will be adapted in the next publication.
TaskID: 2508612
Forward-Port-Of: odoo/enterprise#18148
Forward-Port-Of: odoo/enterprise#17982Residual/Salvage increases float precision causes float precision inaccuracy with all the calculations going on. The issue results in a bug when trying to resume depreciation on an asset with specific float precisions in the `salvage_value`/`original_value` then try to resume the depreciation. opw-2467940 Forward-Port-Of: odoo/enterprise#18147
Original PR description
Residual/Salvage increases float precision causes float precision inaccuracy with all the calculations going on. The issue results in a bug when trying to resume depreciation on an asset with specific float precisions in the `salvage_value`/`original_value` then try to resume the depreciation. opw-2467940 Forward-Port-Of: odoo/enterprise#18147
On the website, if an online appointment form contains a required checkbox, the user can book an appointment even if he didn't check any box. To reproduce the error: (Use demo data) 1. In Online Appointments, edit "Schedule a Demo" 2. Add a question Q: - Question Type: Checkboxes - Required Answer: True - Go to Website - Book a slot with selecting any checkbox Error: The appointment is booked. However, Q is required and no boxes have been checked. OPW-247
Original PR description
On the website, if an online appointment form contains a required
checkbox, the user can book an appointment even if he didn't check any
box.
To reproduce the error:
(Use demo data)
1. In Online Appointments, edit "Schedule a Demo"
2. Add a question Q:
- Question Type: Checkboxes
- Required Answer: True
- Go to Website
- Book a slot with selecting any checkbox
Error: The appointment is booked. However, Q is required and no boxes
have been checked.
OPW-2473001
closes odoo/enterprise#18004
closes odoo/odoo#70005
Forward-Port-Of: odoo/enterprise#18117
Forward-Port-Of: odoo/enterprise#18058Before 1c4b50be5, documents.share with empty domain did not cause an issue. With it they cause an error when we try to access them. Since this may cause an issue in some customers (eg. from data migrated to 13.0) this commit allows to have empty domain again. opw-2516856 Forward-Port-Of: odoo/enterprise#18123
Original PR description
Before 1c4b50be5, documents.share with empty domain did not cause an issue. With it they cause an error when we try to access them. Since this may cause an issue in some customers (eg. from data migrated to 13.0) this commit allows to have empty domain again. opw-2516856 Forward-Port-Of: odoo/enterprise#18123