-
Notifications
You must be signed in to change notification settings - Fork 10
Syncing from upstream odoo/odoo (saas-18.1) #34240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before this commit, tour "discuss_channel_public_tour" was failing non-deterministically at the following step: ``` .o-mail-Message:not(:has(.o-mail-MessageReaction)) ``` This happens because prio steps added a new reaction and asserted it was shown. It clicks on reaction to remove it and then page reload to see the reaction is gone. Problem is that it can reload page too fast and the RPC to remove the reaction did not have time to occurs. This commit fixes the issue by awaiting message no longer has reaction before page reload. Fixes runbot-error-227769 closes #218217 X-original-commit: ba94227 Signed-off-by: Alexandre Kühn (aku) <[email protected]>
This commit will add the amount residual in text in the note of the xml we sent to nilvera. The text need to be in uppercase. If the invoice is in another currency than Turkish Lira, we have to add two notes one for the amount in turkish lira and one in the other currency Also when the integer part or fractional part is zero it should be zero in turkish. task-4518269 closes #218493 X-original-commit: 0f733e1 Signed-off-by: Maximilien La Barre (malb) <[email protected]> Signed-off-by: Florian Gilbert (flg) <[email protected]>
Versions -------- - 18.0+ Steps ----- 1. Enable debugging mode; 2. go to Settings / Technical / Database Structure / Attachments; 3. search for a PDF attachement; 4. open developer tools; 5. click on Record / Data. Issue ----- > Connection lost. Trying to reconnect... Traceback in logger: > `UnicodeDecodeError: 'utf-8' codec can't decode byte ...` Cause ----- Commit 5ef4c07 moved the `json_default` function from `date_utils` to `json`, with the purpose of letting it serialize objects besides `date` & `datetime`. When used for raw data of binary files like PDF, it encounters values that cannot be represented in UTF-8, and because `decode` defaults to strict error handling, an exception is thrown. Solution -------- When sending the `read` request to the ORM, only request fields of that aren't of type `binary` to ensure they're serializable. opw-4717657 closes #218401 X-original-commit: a3785c0 Signed-off-by: Aaron Bohy (aab) <[email protected]>
Currently these problems can appear when an invoice is cash rounded. 1. In case we use the "Modify tax amount" (`biggest_tax`) cash rounding strategy: The rounding amount is added to the taxes in Odoo but not in the UBL XML - This affects everything that uses `_prepare_invoice_aggregated_taxes` (and not just UBL XML) 2. The generated UBL XML is invalid (for any rounding strategy). See below for details. 3. The import of the exported UBL XML does not yield back the same invoice (even after fixing the export / the previous 2 problems). Also there are some problems with the correction of tax values of imported UBL XML (`correct_invoice_tax_amount`). (They probably do not cause issues in practice but would after this fix. We adapt the correction as part of the fix for (3).) #### Runbot: How to generate problematic XML 1. Select BE Company CoA 2. Enable Cash Rounding in the settings 3. Create a cash rounding method (in the settings where cash rounding can be enabled): - precision `1.00` - strategy: any - profit / loss account: any 4. Create an invoice - Set a Belgian partner (e.g. "BE Company CoA" is okay) - Set the the cash rounding method from step 2 - Single Line with price=70.00€ and a 21% tax 5. The total should be 85.00 € (84.70 € w/o the rounding) In the journal items there should be the following non payment term items: - 70.00€ base - 14.70€ tax - 0.30€ rounding (depending on the cash rounding strategy the tax is set or not) 6. Confirm & Send (with BIS Billing 3.0) 7. Look at the UBL BIS 3 XML in the `Invoice` element - `TaxTotal/TaxAmount`: 14.70€ - `TaxTotal/TaxSubtotal/TaxableAmount`: 70.00€ - `TaxTotal/TaxSubtotal/TaxAmount`: 14.70€ - `LegalMonetaryTotal/TaxExclusiveAmount`: 70.00€ - `LegalMonetaryTotal/TaxInclusiveAmount`: 85.00€ - `LegalMonetaryTotal/PayableAmount`: 85.00€ 8. This fails validation `BR-CO-15`: ``` Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). ``` (`LegalMonetaryTotal/TaxInclusiveAmount` = `LegalMonetaryTotal/TaxExclusiveAmount` + `TaxTotal/TaxAmount`) Since the cash rounding is included in `LegalMonetaryTotal/TaxInclusiveAmount` but not in `TaxTotal/TaxAmount` (or `LegalMonetaryTotal/TaxExclusiveAmount`) #### Tax value correction details (with examples) Currently we try to fix the tax amounts after importing an invoice. The function we use for that (`_correct_invoice_tax_amount`) has the following issues: - We look for `TaxTotal/TaxSubtotal` elements anywhere. But i.e. such elements can also exist inside `InvoiceLine` elements. Example: - module `l10n_dk_oioubl` file `test_xml_oioubl_dk.py` - function `test_oioubl_import_exemple_file_4` / XML file 'external/BASPRO_01_01_00_Invoice_v2p1.xml' - The tax total parsed from the document may need to be inverted. E.g. credit notes can be given as an invoice with negative amounts. See function `_get_import_document_amount_sign`. Example: - module `l10n_account_edi_ubl_cii` file `test_xml_ubl_be.py` - function `test_import_invoice_xml_open_peppol_examples` / XML file 'bis3_invoice_negative_amounts.xml' - We compare the tax total from the document only with a single line of that tax. But there can be multiple lines for a single tax. We have to use the sum of all those lines for the comparison. Example: - module `l10n_account_edi_ubl_cii` file `test_xml_ubl_au.py` - function `test_export_import_invoice` / XML file 'from_odoo/a_nz_out_invoice.xml' #### The fix This commit does the following to fix that 1. We include cash rounding lines belonging to a tax in the tax computation for the UBL XML export (or rather everything any tax computation done with `_prepare_invoice_aggregated_taxes`). 2. After fixing (1) we only have to fix the "Add a rounding line" (`add_invoice_line`) strategy. This is as follows - Subtract the cash rounding from the `LegalMonetaryTotal/TaxInclusiveAmount` - Add node `LegalMonetaryTotal/PayableRoundingAmount` with the value of the cash rounding 3. Cases - `add_invoice_line`: We create a dedicated invoice line with the amount found in node `LegalMonetaryTotal/PayableRoundingAmount` (if it is present). - `biggest_tax`: We update the amount on the tax line to match the value found in the XML. (Currently we only do this if the difference is not greater than '0.05') The fixes for the tax value correction on import are also needed for 3./`biggest_tax`. #### Runbot: example XML after the fix The export in the example then looks like this for the different cash rounding strategies - `add_invoice_line` - `TaxTotal/TaxAmount`: 14.70€ - `TaxTotal/TaxSubtotal/TaxableAmount`: 70.00€ - `TaxTotal/TaxSubtotal/TaxAmount`: 14.70€ - `LegalMonetaryTotal/TaxExclusiveAmount`: 70.00€ - `LegalMonetaryTotal/TaxInclusiveAmount`: 84.70€ - `LegalMonetaryTotal/PayableRoundingAmount`: 0.30€ - `LegalMonetaryTotal/PayableAmount`: 85.00€ The validation for the `LegalMonetaryTotal/PayableAmount` is still okay since (in the example) it is just `LegalMonetaryTotal/TaxInclusiveAmount` + `LegalMonetaryTotal/PayableRoundingAmount`. - `biggest_tax` - `TaxTotal/TaxAmount`: 15.00€ - `TaxTotal/TaxSubtotal/TaxableAmount`: 70.00€ - `TaxTotal/TaxSubtotal/TaxAmount`: 15.00€ - `LegalMonetaryTotal/TaxExclusiveAmount`: 70.00€ - `LegalMonetaryTotal/TaxInclusiveAmount`: 85.00€ - `LegalMonetaryTotal/PayableRoundingAmount`: (not exported) - `LegalMonetaryTotal/PayableAmount`: 85.00€ #### References Also see - https://docs.peppol.eu/poacc/billing/3.0/bis/#_rounding - https://docs.peppol.eu/poacc/billing/3.0/bis/#_calculation_of_totals task-4854592 X-original-commit: b033a87 Part-of: #218439 Related: odoo/enterprise#89997 Signed-off-by: Antoine Dupuis (andu) <[email protected]> Signed-off-by: Sven Führ (svfu) <[email protected]>
Currently rounding lines (with taxes) are not included in the tax lines in multiple places. This is fixed in this commit. See the previous commit for motivation. part of task-4854592 closes #218439 X-original-commit: 6fd5b89 Related: odoo/enterprise#89997 Signed-off-by: Antoine Dupuis (andu) <[email protected]> Signed-off-by: Sven Führ (svfu) <[email protected]>
Steps to reproduce: 1. Install l10n_in_hr_holidays and l10n_in 2. Switch to IN company 3. Create an employee related to Marc Demo in IN Company 4. Log in with Marc Demo and create a timeoff 5. Approve the timeoff by Mitchel admin 6. Open the form view of approved timeoff by Marc Demo Issue: The _get_durations method in l10n_in_hr_holidays attempts to update the l10n_in_contains_sandwich_leaves field whenever it runs, including when opening the form view of an approved time off. This causes an access error, as updates are not allowed for Marc demo in the approved state. Solution: Added a state check in the _get_durations method to prevent updating the field for approved records. opw-4741162 closes #218508 X-original-commit: 9e22e3d Signed-off-by: Bertrand Dossogne (bedo) <[email protected]> Signed-off-by: Piyush Sharma (pish) <[email protected]>
We now ensure that the certificate data returned by odoo.com is not empty, to avoid nginx not restarting. closes #218400 Task: 4926102 X-original-commit: cfd47c4 Signed-off-by: Max Whale (mawh) <[email protected]> Signed-off-by: Louis Travaux (lotr) <[email protected]>
Before the commit, when a 'pick up in store' was published, the out-of-stock message was hidden to avoid confusion. However, customers want to benefit from it, and now we reintroduce it. opw-4791969 closes #218399 X-original-commit: 1d06520 Signed-off-by: Valeriya Chuprina (vchu) <[email protected]>
PR#135607 breaks support of image types other than `png` for menu icons. This puts back the support for previously supported image types. closes #218337 X-original-commit: 9facf18 Signed-off-by: Martin Trigaux (mat) <[email protected]>
Before this commit, the toggle-star action was visible on chatbot messages in a non-persisted livechat thread. Clicking these actions caused errors. This commit hides this action when the message is in non-persisted state, preventing such errors. task-4743758 closes #218367 X-original-commit: 4682773 Signed-off-by: Alexandre Kühn (aku) <[email protected]>
Before this commit, if multiple documents were sent to print at exactly the same time, some of them could end up erroring because the Windows printing API requires us to send one document at a time. After this commit, we use a lock similar to the Linux driver, to ensure that only one document is sent to the printer at once. opw-4829908 closes #218491 X-original-commit: 78c1c47 Related: odoo/enterprise#90011 Signed-off-by: Max Whale (mawh) <[email protected]>
Before this commit: - Visually empty <div> elements could be inserted during paste. - These empty blocks created invisible spacing in the editor. - External styles inside pasted <div> elements were not removed. - The placeholder (`Type '/' for commands`) could not render correctly in those areas. This regression was introduced in commit `#196481`, which stopped replacing blacklisted tags like <div> with <p>. As a result, cleanForPaste no longer stripped inline styles from <div> elements. After this commit: - Non-empty <div> elements are now replaced with a valid baseContainer element. - Empty <div> elements are automatically removed from pasted content. - This restores the expected cleaning behavior and removes unwanted styles. task-4805536 closes #217969 X-original-commit: 0c66222 Signed-off-by: David Monjoie (dmo) <[email protected]>
Currently, an error ocuurs when the user installs the modules after deleting the 'Service' product category. Steps to reproduce: - Install the Inventory app. - Inventory > Configuration > Categories > Delete 'Service'. - Install the `l10n_es` module. Traceback: ValueError: External ID not found in the system: product.product_category_services ParseError while parsing /home/odoo/src/odoo/saas-18.3/addons/l10n_es/data/product_data.xml:3, somewhere inside <record id="product_dua_valuation_21" model="product. Product"> <field name="name">DUA VAT Valuation 21%</field> <field name="default_code">DUA21</field> <field name="categ_id" ref="product.product_category_services"/> <field name="type">service</field> <field name="sale_ok" eval="False"/> <field name="purchase_ok" eval="True"/> </record> The error occurs because the user deleted the category and then installed the modules, that reference the missing product category. This commit resolves the error by providing a False value for the field if the product category is missing. Sentry - 6710886848 closes #216296 Signed-off-by: Antoine Boonen (aboo) <[email protected]>
In order to ease development/debugging lonpolling=>websocket fallback we added the possibility to disable longpolling calls in order to force the communication via websocket. closes #218433 Task: 4929877 Signed-off-by: Louis Travaux (lotr) <[email protected]>
This commit makes a small change to move the code that calls the weighing dialog into its own function. This is so it can more easily be overridden. task-4910716 closes #218249 X-original-commit: e705690 Related: odoo/enterprise#89921 Signed-off-by: Yaroslav Soroko (yaso) <[email protected]> Signed-off-by: Max Whale (mawh) <[email protected]>
Bug introduced in:dbd9ae1 Steps to reproduce the bug: - Create a kit product: - BoM: - Components: - 1 unit of C1 - 1 unit of C1 (same product) - Create a SO with one unit of kit - Confirm the SO - The delivery is created - Cancel the SO → the delivery is canceled. - Set the SO back to quotation and confirm again Problem: A traceback is triggered: raise ValueError("Expected singleton: %s" % record) ValueError: Expected singleton: mrp.bom.line(24, 25) When a kit's BoM contains the same product multiple times, multiple bom_line_ids match a given move. Assigning them causes an error. Additionally, cancelled moves were incorrectly considered. Solution: Filter out cancelled stock moves before accessing the bom_line_id to ensure only active moves are considered. And in the case where we have the same component multiple times, we have no choice but to link all the moves to the first bom_line, because the moves are processed separately, so we can't loop over them. opw-4919875 closes #218441 X-original-commit: a756bfe Signed-off-by: William Henrotin (whe) <[email protected]> Signed-off-by: Djamel Touati (otd) <[email protected]>
…uidelines Steps to reproduce: 1. Install the `Contacts` module. 2. Go to Contacts > Create a new contact. 3. Select country "India", then open the State dropdown. 4. Observe that "Orissa" appears instead of the updated name "Odisha". Issue: As per Government of India guidelines, the state name was officially changed from "Orissa" to "Odisha" in 2011. However, Odoo still uses the outdated name in the state selection. Solution: Update the name of the state from "Orissa" to "Odisha" in state records. opw-4935633 closes #218501 X-original-commit: 4767737 Related: odoo/enterprise#90013 Signed-off-by: Nicolas Lempereur (nle) <[email protected]> Signed-off-by: Khushi Srivastava (khsr) <[email protected]>
**Issue** The auto check out cron was using the check in time in UTC to determine the excepted working hours and the previous attendances. For example: - have an employee with a working schedule using a UTC+8 timezone. - check-in on a monday before 8am (0:00 UTC) in the employee's tz. - the auto check-out cron closes the attendance immediately because there are no working hours for the attendance's check in day in UTC (Sunday). **Change** Use the date of the check-in localized in the tz of the calendar used by the attendance's employee to determine the previous worked hours for that day and the expected worked hours. opw-4654847 closes #218442 X-original-commit: f140c73 Signed-off-by: Bertrand Dossogne (bedo) <[email protected]> Signed-off-by: Tanguy Quéguineur (taqu) <[email protected]>
### Contains the following commits: odoo/o-spreadsheet@3456a93e8 [REL] 18.1.29 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) odoo/o-spreadsheet@a01097480 [PERF] pivot: don't invalidate cache needlessly [Task: 4933971](https://www.odoo.com/odoo/2328/tasks/4933971) odoo/o-spreadsheet@33431cca5 [FIX] pivot: don't aggregate calculated missing value [Task: 4933818](https://www.odoo.com/odoo/2328/tasks/4933818) odoo/o-spreadsheet@90f051bdf [FIX] Cells: newline is not a valid date separator [Task: 4910327](https://www.odoo.com/odoo/2328/tasks/4910327) odoo/o-spreadsheet@7767e1a4c [PERF] import xlsx: avoid reading all cells multiple times during table_conversion [Task: 4699860](https://www.odoo.com/odoo/2328/tasks/4699860) odoo/o-spreadsheet@3470767a7 [FIX] Config: remove eslint [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) odoo/o-spreadsheet@ba9911767 [IMP] config: ignore .DS_Store file from mac os [](https://www.odoo.com/odoo/2328/tasks/) odoo/o-spreadsheet@9fde8d70e [FIX] header_size: resize row based on link label instead of full link [Task: 4886598](https://www.odoo.com/odoo/2328/tasks/4886598) odoo/o-spreadsheet@1c3f6435f [FIX] pivot: allow to group by error [Task: 4886041](https://www.odoo.com/odoo/2328/tasks/4886041) odoo/o-spreadsheet@73297562f [FIX] demo: fix `clear` action again [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) odoo/o-spreadsheet@a8368d244 [FIX] demo: Fix new `clear` action [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) closes #218593 Signed-off-by: Vincent Schippefilt (vsc) <[email protected]> Co-authored-by: Anthony Hendrickx (anhe) <[email protected]> Co-authored-by: Alexis Lacroix (laa) <[email protected]> Co-authored-by: Lucas Lefèvre (lul) <[email protected]> Co-authored-by: Dhrutik Patel (dhrp) <[email protected]> Co-authored-by: Adrien Minne (adrm) <[email protected]> Co-authored-by: Mehdi Rachico (mera) <[email protected]> Co-authored-by: Florian Damhaut (flda) <[email protected]> Co-authored-by: Rémi Rahir (rar) <[email protected]> Co-authored-by: Pierre Rousseau (pro) <[email protected]> Co-authored-by: Vincent Schippefilt (vsc) <[email protected]>
`is_storable` is defined in `stock`. This test is located in `purchase`, that do not depend on `stock`. We use type='consu' instead. This change ensures that the product is created with the correct type. build_error-229762 closes #218403 Signed-off-by: William Henrotin (whe) <[email protected]>
Just warn models are invalid, but do not reset for stable. Data is not enforced hence no real issue with wrong models. Followup of #156731 closes #218614 X-original-commit: e39bc81 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bt_gitbot