Wednesday, June 30, 2021
4 changes · master
Enhancements to existing features
Calendar year view popovers now display the event duration before the event name. This makes the time information easier to see when event names are long and would otherwise hide or cut off the duration.
Original PR description
In calendar year mode, the duration will appear before the event name because if the event name is too long, the duration does not appear. Like: crop the shift name if it becomes too long to display on one line. then the duration is cropped. TaskID:- 2502245
Resolved issues and error corrections
Fixed an issue in Planning where the “Open Shifts” row was unavailable when sample data was shown. Users can now create a new shift from that row even before real planning data exists, making setup smoother.
Original PR description
BUG Since odoo/enterprise@44f6134, the "Open Shifts" empty line is disabled when sample data is displayed. This prevents people from creating a new shift from this empty line. IMPLEMENTED FIX The sampla data target selector for the planning gantt renderer has been adapted to ensure the "Open Shifts" empty line does not get disabled in sample data mode.
Miscellaneous changes
When selling several times a product in a POS, if the volume and weight of this product are defined, the sales report will be incorrect To reproduce the error: 1. Create a product P: - Product Type: Consumable - Available in POS: True - Weight: 1 - Volume: 1 2. Start a POS session 3. Sell 3 x P 4. Sell 1 x P 5. In Sales > Reporting > Sales, select the pivot view 6. Remove all filters and add this one: - Product Variant: P 7. In Measures, select "Gross Weight"
Original PR description
When selling several times a product in a POS, if the volume and weight of this product are defined, the sales report will be incorrect To reproduce the error: 1. Create a product P: - Product Type:…
When selling several times a product in a POS, if the volume and weight
of this product are defined, the sales report will be incorrect
To reproduce the error:
1. Create a product P:
- Product Type: Consumable
- Available in POS: True
- Weight: 1
- Volume: 1
2. Start a POS session
3. Sell 3 x P
4. Sell 1 x P
5. In Sales > Reporting > Sales, select the pivot view
6. Remove all filters and add this one:
- Product Variant: P
7. In Measures, select "Gross Weight" and "Volume"
Error: Total weight and volume are incorrect, they are equal to 8
instead of 4
For each POS order line, an SQL request computes several fields to
generate the associated sale report. Among them, here is how the volume
is computed:
https://github.com/odoo/odoo/blob/056246665f02c331ba0589618cf030482709f1da/addons/pos_sale/report/sale_report.py#L60-L63
So, let's say we are generating the sale report associated with the POS
order line of step 3. Since there are not enough constraints in the
volume calculation, the SQL request will select all POS order lines with
product P (even those associated with other orders than the one in step
3) and add up all the volumes. Therefore, the volume of the sale report
associated with the POS order line from step 3 will be `3 + 1 = 4` which
is incorrect (it should be 3). Same thing will happen with the sale
report associated with the POS order line of step 4 (its volume will be
4 instead of 1). As a result, on pivot view, the volume displayed will
be the sum of these values, i.e. `4 + 4 = 8`, which is incorrect
The nested SQL request is actually useless and the volume can be
directly computed.
The problem is the same with the weight.
OPW-2527163
Forward-Port-Of: odoo/odoo#72845When a custom module is in 'to upgrade' state, and the new version has a new dependency that is not yet installed, Odoo refuses to upgrade it, and says the new dependency is unmet. This commit fixes this by calling button_upgrade() in this situation too, so as to recursively mark all dependencies for upgrade/installation. This situation arises in a version migration scenarios. Custom modules are in 'to upgrade' state when the database comes back from the Odoo migration service. If one of t
Original PR description
When a custom module is in 'to upgrade' state, and the new version has a new dependency that is not yet installed, Odoo refuses to upgrade it, and says the new dependency is unmet. This commit fixes this by calling button_upgrade() in this situation too, so as to recursively mark all dependencies for upgrade/installation. This situation arises in a version migration scenarios. Custom modules are in 'to upgrade' state when the database comes back from the Odoo migration service. If one of these custom modules has a new dependency after migration, it refuses to upgrade. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#72661