Saturday, June 17, 2023
7 changes · master
Enhancements to existing features
This update replaces an older template instruction with the current recommended one across many Odoo modules. It helps keep the platform aligned with current standards and reduces warning messages during operation, without changing expected user-facing behavior.
Original PR description
2023-06-17 08:41:21,068 8348 WARNING 17_1706 odoo.addons.base.models.ir_qweb: Found deprecated directive @t-esc="title or 'Odoo'" in template 183. Replace by @t-out 2023-06-17 08:41:21,069 8348 WARNING 17_1706 odoo.addons.base.models.ir_qweb: Found deprecated directive @t-esc='request.csrf_token(None)' in template 183. Replace by @t-out 2023-06-17 08:41:21,070 8348 WARNING 17_1706 odoo.addons.base.models.ir_qweb: Found deprecated directive @t-esc='debug' in template 183. Replace by @t-out --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update replaces an outdated template instruction with its current supported equivalent across several Odoo Enterprise views. It reduces technical warnings and helps keep accounting and reporting interfaces compatible with newer platform standards without changing business workflows.
Original PR description
2023-06-17 08:41:21,068 8348 WARNING 17_1706 odoo.addons.base.models.ir_qweb: Found deprecated directive @t-ESC="title or 'Odoo'" in template 183. Replace by @t-out 2023-06-17 08:41:21,069 8348 WARNING 17_1706 odoo.addons.base.models.ir_qweb: Found deprecated directive @t-ESC='request.csrf_token(None)' in template 183. Replace by @t-out 2023-06-17 08:41:21,070 8348 WARNING 17_1706 odoo.addons.base.models.ir_qweb: Found deprecated directive @t-ESC='debug' in template 183. Replace by @t-out CE: https://github.com/odoo/odoo/pull/125509
Miscellaneous changes
Before: when using the quick encoding feature on an invoice or bill with payment term containing an early payment discount and the company's epd computation is set to "Always (upon invoice)", the calculation was done incorrectly. Example: if you invoice a 100€ product with a 21% tax with a 2% cash discount, the total of the invoice will be 120.58 (the 21% is calculated on 98€ (100€*2%) which is 20.28€). In our case, if you tried to calculate suggestions from a quick encoding value of 120.58,
Original PR description
Before: when using the quick encoding feature on an invoice or bill with payment term containing an early payment discount and the company's epd computation is set to "Always (upon invoice)", the calculation was done incorrectly.
Example: if you invoice a 100€ product with a 21% tax with a 2% cash discount, the total of the invoice will be 120.58 (the 21% is calculated on 98€ (100€*2%) which is 20.28€). In our case, if you tried to calculate suggestions from a quick encoding value of 120.58, the calculation would calculate the untaxed amount from the 120.58 based on the 21% tax without applying the 2% discount.
After: when calculating the suggestions check if an early discount is set on the payment term and the company's epd computation is set to "mixed" ("Always (upon invoice)") and if so, apply the discount to the tax before calculating the untaxed amount from the total.
task-3339223
Forward-Port-Of: odoo/odoo#125326
Forward-Port-Of: odoo/odoo#123748With Jquery.data, you can set everything as value (array, object, string, etc) wich is confusing. This commit fix the function that check if the button is ready. It didn't work because the data declared in this.$submitButton is not a boolean but an object. Forward-Port-Of: odoo/odoo#124326
Original PR description
With Jquery.data, you can set everything as value (array, object, string, etc) wich is confusing. This commit fix the function that check if the button is ready. It didn't work because the data declared in this.$submitButton is not a boolean but an object. Forward-Port-Of: odoo/odoo#124326
The bills upload widget uses a custom attr "linkText". translate.py will only generate terms that are in the TRANSLATED_ATTRS constant, thereby not including these in the po template file. To fix this, the attribute is changed to a recognised attr "title". The JS widget will still recognize linkText, for databases that have not updated the module. Task-3335585 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged:
Original PR description
The bills upload widget uses a custom attr "linkText". translate.py will only generate terms that are in the TRANSLATED_ATTRS constant, thereby not including these in the po template file. To fix this, the attribute is changed to a recognised attr "title". The JS widget will still recognize linkText, for databases that have not updated the module. Task-3335585 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#125511 Forward-Port-Of: odoo/odoo#125276
The bills upload widget uses a custom attr "linkText". translate.py will only generate terms that are in the TRANSLATED_ATTRS constant, therefore excluding linkText attribute values from the generated PO template files. To fix this, the attribute is changed to a recognised attr "title" The JS widget will continue to recognize linkText, for databases that have not updated the module. Task-3335585 Forward-Port-Of: odoo/enterprise#42750 Forward-Port-Of: odoo/enterprise#42651
Original PR description
The bills upload widget uses a custom attr "linkText". translate.py will only generate terms that are in the TRANSLATED_ATTRS constant, therefore excluding linkText attribute values from the generated PO template files. To fix this, the attribute is changed to a recognised attr "title" The JS widget will continue to recognize linkText, for databases that have not updated the module. Task-3335585 Forward-Port-Of: odoo/enterprise#42750 Forward-Port-Of: odoo/enterprise#42651
Before this commit, form 281.50 doesn't handle credit notes in its computation. It was caused because the join on account_partial_reconcile didn't take into account credit notes. e.g.: Create a vendor bill(1000€) as fees and post it Pay the vendor bill (1000€) Create a credit note for this vendor bill (1000€) Receive the payement from this credit note (1000€) 281.50 will return 1000€ for fees accounts and 1000€ for paid amount. It's not what we want and this commit fixes this. e.g.:
Original PR description
Before this commit, form 281.50 doesn't handle credit notes in its computation. It was caused because the join on account_partial_reconcile didn't take into account credit notes. e.g.: Create a vendor bill(1000€) as fees and post it Pay the vendor bill (1000€) Create a credit note for this vendor bill (1000€) Receive the payement from this credit note (1000€) 281.50 will return 1000€ for fees accounts and 1000€ for paid amount. It's not what we want and this commit fixes this. e.g.: Create a vendor bill(1000€) as fees and post it Pay the vendor bill (1000€) Create a credit note for this vendor bill (1000€) Receive the payement from this credit note (1000€) 281.50 will return 0€ for fees accounts and 0€ for paid amount. task: none Forward-Port-Of: odoo/enterprise#42642 Forward-Port-Of: odoo/enterprise#42595