-
Notifications
You must be signed in to change notification settings - Fork 10
Syncing from upstream odoo/odoo (saas-18.2) #34202
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
The current validation uses stdnum.vn.mst.validate(), which only accepts 10- or 13-digit MST with legacy checksum logic. It does not support the 12-digit CCCD format now required for individuals from 01/07/2025 (per Circular 86/2024/TT-BTC). * This patch introduces a separate format-level validator for: • 10-digit enterprise VAT • 13-digit branch VAT (10-digit + suffix) • 12-digit CCCD (from 01/07/2025) * References: • Circular 86/2024/TT-BTC (tax registration & CCCD admin): https://thuvienphapluat.vn/van-ban/Thue-Phi-Le-Phi/Thong-tu-86-2024-TT-BTC-dang-ky-thue-565309.aspx • CCCD replacing tax ID from 01 Jul 2025: https://thuvienphapluat.vn/ma-so-thue/bai-viet/cach-doi-ma-so-thue-sang-ma-so-dinh-danh-ca-nhan-tu-0172025-200926.html • VAT ID structure 10/13 digits (Law, TT 105/2020): https://thuvienphapluat.vn/phap-luat/cau-truc-ma-so-thue-la-10-chu-so-hay-13-chu-so-phan-loai-cau-truc-ma-so-thue-nhu-the-nao-theo-quy-d-796465-178397.html closes #217899 X-original-commit: b87c896 Signed-off-by: Nicolas Viseur (vin) <[email protected]>
Steps to reproduce: - Install l10n_it_edi - Switch to an Italian company (e.g. IT Company) - In Accounting settings, activate "Fattura Elettronica (FatturaPA)" - When saving the settings, the system tries to create an EDI proxy user if there is no existing EDI proxy user in "test" or "prod" mode - Neutralize the database with the following command: odoo-bin neutralize -d [db_name] - Go the settings and save Issue: Upon save, the system will try to create an EDI proxy user in "prod" mode (or "test" mode if "l10n_it_edi.proxy_user_edi_mode" system parameter is set to "test"). The database is neutralized. It should not create an EDI proxy user in "prod" mode by default. Cause: An EDI proxy user is created in "prod" mode automatically when there is no existing proxy user in that mode and "FatturaPA" is activated. During the neutralization of the database, all proxy users are switched to "demo" mode, but "FatturaPA" is not deactivated. Therefore, the configuration is set to create a "prod" EDI proxy user. Solution: As we want to create an EDI proxy user in "prod" mode by default on a non-neutralized database, we can deactivate "FatturaPA" option during the neutralization to prevent the creation of an EDI proxy user on a neutralized database when saving the settings. opw-4795396 closes #217936 X-original-commit: c337710 Signed-off-by: Paolo Gatti (pgi) <[email protected]> Signed-off-by: Anh Thao Pham (pta) <[email protected]>
Otherwise, it causes it fails to assign value to certain records, which is unadvised. closes #217818 X-original-commit: ce487c4 Signed-off-by: Nicolas Viseur (vin) <[email protected]>
Since [1], #207974 websocket timeout has been increased during test. Fetching notification only returns the notifications of the last 50 seconds initially. When runbot is under high load, this can lead to non deterministic failures. This commit patches the cursor date to bypass this issue. [1]: #207974 fixes rubot-223126,223758 closes #217953 Signed-off-by: Matthieu Stockbauer (tsm) <[email protected]>
Step to reproduce; - install documents - upload a parasolid file, it has extension `x_t` - download it Observation: if a file is uploaded with file named as `file.x_t`, it will be downloaded as `file.x_t.txt` Issue: currently, the `get_extension` method only allow alphanumeric values for extension, which do not consider extensions having '_', when such file is downloaded, `_get_stream_from` appends extra extension to the filename, depending upon its mimetype. Fix: instead of `isalnum()`, use a regex that allows alphanumeric and underscore in extension. opw-4801263 closes #214634 X-original-commit: 5d5eb1f Signed-off-by: Chong Wang (cwg) <[email protected]> Signed-off-by: Ajit Kumar Krishnanand Singh (aksi) <[email protected]>
- Create an invoice with price 1000 in a non-company currency (e.g., CHF). - Modify the currency rate after the invoice date, then generate the payment for this invoice. - This will generate three journal entries (invoice, payment, and currency exchange difference). - Export those journal entries and include in the export the `matching_number`, `currency`, and `amount_currency` fields. - Import those three entries with the matching number and post them. - In the Journal Items, the line corresponding to the currency exchange difference is not matched with the lines from the invoice and the payment, leading to an unbalanced credit and debit. In `_prepare_reconciliation_single_partial` within `account_move_line`, the reconciliation is stopped by checking whether the debit/credit is fully matched. However, this check only considers `amount_residual_currency` and not `amount_residual`, which, in the case of an exchange difference, are different. opw-4776188 closes #217565 X-original-commit: 6a683a0 Signed-off-by: Thomas Becquevort (thbe) <[email protected]> Signed-off-by: Guillaume Teboul-Tornezy (gute) <[email protected]>
closes #218039 Task: 4930419 X-original-commit: 22debd3 Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
…table in po Steps to Reproduce: 1. Navigate to Purchase → Create a new Purchase Order. 2. Add a Vendor → Add a Product with description or enter one using the ☰ widget. 3. Save and Confirm the order, Try to edit the description. Issue: - The product description becomes non-editable after confirming the PO. - Previously, the description was separated in view. Cause: - Since product_id is readonly, the name (description) field also does not allow to edit. - e.g. In SO, the description is editable if the product_id is hidden and only name (description) field is visible. Since product_id is readonly in states ('purchase','to approve','done','cancel') the description field also becomes read-only, as they are combined. By hiding the product_id, we can edit the description, as it is not. Solution: - Added optional="show" to product_id in the XML view to allow toggling discription editability. When product_id is hidden, name field becomes editable. Steps to Verify: 1. Open same confirmed PO and hide the product_id column. 2. Make sure name (description) field is visible and now it is editable. opw-4892063 closes #217299 X-original-commit: b48e1e2 Signed-off-by: William Henrotin (whe) <[email protected]> Signed-off-by: Khushi Srivastava (khsr) <[email protected]>
Problem: When a user rotates an image, certain image sizes can cause the editable area to become scrollable. This triggers `resetHandlers` from `usePositionHook`, resulting in loss of focus on the rotate controller. Solution: Add a flag to detect when the user is actively transforming (`mousedown`). Delay the reset until interaction ends (`mouseup`), preventing premature handler reset. Steps to reproduce: - Add a long image - Transform > Rotate until a scrollbar appears - You lose focus on the rotate controller opw-4890029 closes #218023 X-original-commit: 1b5b239 Signed-off-by: David Monjoie (dmo) <[email protected]> Signed-off-by: Walid Sahli (wasa) <[email protected]>
Since [1], a crash occurs when the Custom Amount option for the `s_donation` snippet is `None` and you use it. Steps to reproduce: - Drop `s_donation` snippet - Set Custom Amount option as `None` - Save and exit edit mode - Click on `Donate Now` button - A traceback occurs instead of showing an error to select an amount [1]: 22e777c closes #217991 Signed-off-by: Benoit Socias (bso) <[email protected]>
**PROBLEM** When changing the vat label associated to the country of the user's company, it should change the label of the `vat` field. The cached partners views are not invalidated as they should and the old views with the old label are presented to the user instead of the new ones. This can be confusing to the user, because while their change had an effect on the database, it doesn't reflect on the views showed to them. **STEP TO REPRODUCE** 1. On a fresh database, install the contact app. 2. From the contact app, Configuration->Countries, select United States which should be the country of the demo company. 3. Change the Vat Label field value. 4. Go on any contact form view, and notice the label of the `vat` field wasn't updated. 5. You can refresh the pages, and sometimes the new value will be there, sometimes not. **CAUSE** https://github.com/odoo/odoo/blob/ac106704f3c2d3e3fa94415134b9d5522b325378/odoo/addons/base/models/res_partner.py#L41C1-L55C1 In the mixin `FormatVATLabelMixin` we modify the form view, changing the label of the vat field accordingly. However, the `_get_view_cache_key` override that would add the field used to make the change (`self.env.company.country_id.vat_label`) to the cache key is missing. Which means the cache isn't invalidated when it should. **FIX** Invalidating cache when writing on `vat_label` opw-4825749 closes #218042 X-original-commit: 7c21830 Signed-off-by: Rémy Voet (ryv) <[email protected]> Signed-off-by: Léo Gizard (legi) <[email protected]>
Before this commit in some snippets background overlay wouldn't have proper height and/or width because of the snippets `h-{}, w-{}` classes. This commit overrides it with `!important`. To reproduce the issue: - open website and start editing - drop columns snippet, add background image to one of the cards, click on it - Click on the background position option to change it(the one with a crosshair icon) - the overlay isn't shown properly, which also breaks the tooltip position task-4930050 closes #218035 X-original-commit: 85dde1d Signed-off-by: Colin Louis (loco) <[email protected]> Signed-off-by: Serhii Rubanskyi (seru) <[email protected]>
- Make `invoice_currency_rate` editable. - Add a date picker widget that let the user apply the rate of a certain date. - Add a refresh button when the rate is not the expected one. To that end, the computed field `expected_currency_rate` is added. task-4378994 closes #218020 X-original-commit: 2d486fb Signed-off-by: William André (wan) <[email protected]>
This commit adjusts setting `product_uom_id` field on the generated purchase order line in the 3 main scenarios: manual purchase order, procurement from MTO, and procurement from replenishment wizard. The intended behavior is as follows: * Manual PO: The selected pricelist must respect the uom of the PO line. Even if the quantity of the line matches a pricelist with a cheaper price (but different uom), it should not be selected. If there is no pricelist with the unit of the line, the pricelist with the product base unit is chosen. If it doesn't exist too, no pricelist is chosen, and the price is left to the user (default value of 0). * Procurement from MTO: The selected pricelist must be the cheapest pricelist that respects the requested quantity, even if that cheaper pricelist has a different uom than the source of procurement (SO, MO, etc.). However, the generated PO line uses the uom of the pricelist not the source. * Replenishment Wizard: The behavior is similar to manual PO. The selected unit in the wizard must be respected, even if there is a cheaper pricelist that matches the requested quantity (with different uom). Also now, the selected vendor in the wizard doesn't affect the chosen priclist. It's only used to look for pricelists with the same partner. Task-4471379 closes #218018 Signed-off-by: Arnold Moyaux (arm) <[email protected]> Signed-off-by: Mohammad Abdulmoneim (abdu) <[email protected]>
Before this commit: If a tax detail of an invoice line has the None tax grouping key, there is a traceback when generating the UBL InvoiceLine/ClassifiedTaxCategory After this commit: We exclude tax details that have the None grouping key when generating the InvoiceLine/ClassifiedTaxCategory. task-none closes #217916 X-original-commit: 2c2e86d Signed-off-by: Laurent Smet (las) <[email protected]> Signed-off-by: Antoine Dupuis (andu) <[email protected]>
Before this commit, tour "test_mail_composer_autosave_tour" could fail at end with the following error: ``` Tour finished with a dirty form view being open. Dirty form views are automatically saved when the page is closed, which leads to stray network requests and inconsistencies. ``` This happens because test creates a new record and posts a message in full composer. It checks that message is present in chatter and then leave the form view. When posting the message, the form view is saved, but this can happen with a small delay after message is visible on chatter like after tour has ended. This commit fixes the issue by awaiting form view is saved, so that tour doesn't panic at end there's a form view with unsaved changes, as the form view is properly saved with sending a message. Fixes runbot error 198583 Fixes runbot error 222676 closes #218145 Signed-off-by: Sébastien Theys (seb) <[email protected]>
Before this commit, tour "test_discuss_channel_public_page_as_guest" would crash in test after posting a message in which we attempt to add a reaction. This happens because the step is a `hover && click 'Add a reaction'`, so it hovers on selector `o-mail-Message:contains(cheese)` then clicks on the 'Add a reaction' action. In discuss channels, when sending a message, the message is immediately shown on UI before there's a genuine message that is created in DB. This optimistic behavior gives impression the app is fast, but some actions require a genuine message like 'Add a reaction'. The problem of test is that selector `.o-mail-Message:contains(cheese)` passes with temporary / transient message of optimistic behavior, so the `hover` step would be triggered on the temporary / transient message and 'Add a reaction' action is awaited for click. Problem is that when genuine message data is received, implementation detail deletes the temporary / transient message and then shows the genuine message. Because the genuine message is different, component identity is different (it uses message.localId in `t-key`), thus it awaits `Add a reaction` on UI but it's not visible because we need to hover again, this time on genuine message. This commit fixes the issue by awaiting message is shown on UI is the persistent, i.e. non-temporary and non-transient, so that hover and click on the 'Add a reaction' action works without issue. fixes runbot errors 181660 fixes runbot errors 222093 fixes runbot errors 227756 closes #218053 X-original-commit: daacae5 Signed-off-by: Alexandre Kühn (aku) <[email protected]>
When modifying or deleting an Analytic Account on an Analytic Item, it is not reflected on the Analytic Distribution of the Journal Item. The user can be mislead, given on the business objects (invoice lines), he sees the initial Analytic Distribution but there is no guarantee that the related Analytic Item remains consistent. task-4378407 closes #218037 X-original-commit: f1deebe Signed-off-by: William André (wan) <[email protected]>
Versions -------- - 17.0+ Steps ----- 1. Configure website to display prices tax-included; 2. disable selling out-of-stock products; 3. go to an out-of-stock product page; 4. request a reminder email; 5. replenish product stock; 6. run the `_send_availability_email` action; 7. check email that was sent. Issue ----- The price display in the email does not include taxes. Cause ----- The email only checks the `list_price` defined on the product. Solution -------- Don't include the price in the email: - On stable: hide the element to avoid breaking xpaths - On master: remove the element from the template opw-4712613 closes #217998 X-original-commit: 22c333d Signed-off-by: Levi Siuzdak <[email protected]>
…move to sale_order Step to reproduce: - Enable Analytic accounting in Accounting settings - Create a sale order - Show Analytic Distribution - Create an expense and put this sale order in the "Customer to Reinvoice" field. - Add an Analytic Distribution - Create Report - Submit to Manager - Approve - Post Journal Entries Curent behavior: - No analytic_distribution on the sale_order Expected behavior: - analytic_distribution form the expense should be copied to the sale_order Cause: analytic_distribution wasn't set at the creation of the sale order from the account_move closes #217725 X-original-commit: 1a7bd8e Signed-off-by: Xavier Bol (xbo) <[email protected]> Signed-off-by: Corentin Lombard (clom) <[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