Saturday, August 5, 2023
6 changes · master
Enhancements to existing features
Timesheet revenue reports now better reflect prepaid or fixed-price service sales by spreading the full sale amount across the delivered timesheet hours. This helps businesses see revenue allocation that matches the actual fixed-price contract value instead of underreporting based only on hourly unit prices.
Original PR description
...services In the reporting of Timesheets, "timesheet revenues" represent `sol.price_unit * sum(timesheets.unit_amount)`. While this calculation is correct for SOLs with a service invoiced on…
...services In the reporting of Timesheets, "timesheet revenues" represent `sol.price_unit * sum(timesheets.unit_amount)`. While this calculation is correct for SOLs with a service invoiced on delivered quantities, it doesn't reflect the truth when the product is prepaid/fixed price (ordered quantities). With this commit, the "timesheet revenues" related to the latter type of services will be equal to `sol.price_total / sol.qty_delivered * sum(timesheets.unit_amount)`. Where we determine the revenue per unit, and apply it to the total duration of timesheets. Example: Say a SOL with a service of type "prepaid/fixed price", an ordered quantity of 4, and a price per unit of 3.00€. The total price is 12.00€ no matter how much has been delivered. Say users A and B, having respectively timesheeted 2h and 1h, so the delivered quantity of the SOL is 3. We'll note "timesheet revenue of user X" "TR(X)". Before this commit: `TR(A) = 3.00€/h * 2h = 6.00€` `TR(B) = 3.00€/h * 1h = 3.00€` `TR(A) + TR(B) = 6.00€ + 3.00€ = 9.00€` The total timesheet revenues is 9.00€ where it should be 12.00€. Now: `TR(A) = 12.00€ / 3h * 2h = 8.00€` `TR(B) = 12.00€ / 3h * 1h = 4.00€` `TR(A) + TR(B) = 8.00€ + 4.00€ = 12.00€` The total timesheet revenues corresponds to the SOL's total price. task-3368808 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Before this commit: If the barcode nomenclature uses the or `|` symbol. The part after it would be used as a "contains" instead of a "start with". e.g: `123|456` would be transformed in the JS code to `^123|456` instead of `^123|^456` As such, you would have error "can't find product with barcode" if you set such a rule and a product barcode contains the second part. For e.g: the barcode `44445666` would match, but should not! After this commit: Force the second (and following
Original PR description
Before this commit: If the barcode nomenclature uses the or `|` symbol. The part after it would be used as a "contains" instead of a "start with". e.g: `123|456` would be transformed in the JS code…
Before this commit: If the barcode nomenclature uses the or `|` symbol. The part after it would be used as a "contains" instead of a "start with". e.g: `123|456` would be transformed in the JS code to `^123|456` instead of `^123|^456` As such, you would have error "can't find product with barcode" if you set such a rule and a product barcode contains the second part. For e.g: the barcode `44445666` would match, but should not! After this commit: Force the second (and following if any) part to start with. Note: in practice it is pretty rare to have `|` in the pattern, but it is the case for a default rule in version 16, see: https://github.com/odoo/odoo/blob/5ac58ebf983c1c02019253c0430fde3502e13e7c/addons/pos_loyalty/data/default_barcode_patterns.xml#L10 In this case, if a regular product have `044` in its product barcode, the PoS will tell that there is no corresponding coupon instead of adding the product. But the issue itself still apply in version 14 in case of custom rules opw-3356951 Forward-Port-Of: odoo/odoo#130796 Forward-Port-Of: odoo/odoo#125390
Before this commit, since we used to show custom label for project and assignees as 'private' and 'unassigned' section in pivot view, if we want to display show custom label for groupby with sub group type we might get confuse with passing 'groupby' attribute on _getEmptyGroupLabel pivot method. In this commit, fixes groupby issue by passing 'fieldname' instead of 'groupby' cause groupby contains 'groupname : subgroup' like 'deadline : year'. task: 3186578 Description of the issue/feat
Original PR description
Before this commit, since we used to show custom label for project and assignees as 'private' and 'unassigned' section in pivot view, if we want to display show custom label for groupby with sub group type we might get confuse with passing 'groupby' attribute on _getEmptyGroupLabel pivot method. In this commit, fixes groupby issue by passing 'fieldname' instead of 'groupby' cause groupby contains 'groupname : subgroup' like 'deadline : year'. task: 3186578 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#129971
Forward-Port-Of: odoo/enterprise#45147
Original PR description
Forward-Port-Of: odoo/enterprise#45147
Description of the issue/feature this PR addresses: On the website when the planning is open, a noticeable grey separator can be seen below it. Current behavior before PR: When any button is not visible on the footer then there is an empty grey separator visible Desired behavior after PR is merged: When the buttons are not visible then no separator should be displayed Fix: To ensure that the buttons are only visible when intended, the display property should be set to none when they
Original PR description
Description of the issue/feature this PR addresses: On the website when the planning is open, a noticeable grey separator can be seen below it. Current behavior before PR: When any button is not visible on the footer then there is an empty grey separator visible Desired behavior after PR is merged: When the buttons are not visible then no separator should be displayed Fix: To ensure that the buttons are only visible when intended, the display property should be set to none when they are not meant to be displayed and to block when they are meant to be displayed. task-3229105 Forward-Port-Of: odoo/enterprise#39099
Steps to reproduce: 1) install l10n_mx_edi_landing from mitchell admin, this will install two Mexican companies, you can use "ZAPATERIA...". 2) install sales, inventory 3) create another user 'TEST' with access to that Mexican company, they will have access right to Inventory / User only. 4) from the admin account, create a product 'P' with inventory valuation to AVCO + manual. have the product be more than 0 on hand quantity and storable. 5) create sale order, add any customer and produc
Original PR description
Steps to reproduce: 1) install l10n_mx_edi_landing from mitchell admin, this will install two Mexican companies, you can use "ZAPATERIA...". 2) install sales, inventory 3) create another user 'TEST' with access to that Mexican company, they will have access right to Inventory / User only. 4) from the admin account, create a product 'P' with inventory valuation to AVCO + manual. have the product be more than 0 on hand quantity and storable. 5) create sale order, add any customer and product P, confirm. 6) click on the delivery smart button and get the WH/ or ZAPAT/ number 7) log into db from incognito as "TEST" 8) go to inventory / delivery orders search for the WH/ or ZAPAT/ number and try to validate it. Bug: ACL error. Fix: ignore access right check opw-3264303 Forward-Port-Of: odoo/enterprise#44554