[18.0][MIG] edi_purchase_edifact_oca: Migration to 18.0#4
Open
[18.0][MIG] edi_purchase_edifact_oca: Migration to 18.0#4
Conversation
[FIX] edi_purchase_edifact_oca: Use company directly from purchase.order
…default_code from product.supplierinfo
9c7787b to
803b1f4
Compare
Owner
Author
|
Hi @thienvh332, I’ve just opened a PR. Could you please take a look and share your feedback when you have time? |
|
I’m wondering, why did you create a new PR instead of continuing with the old one? |
thienvh332
suggested changes
Aug 20, 2025
|
FYI, you can |
803b1f4 to
570741c
Compare
5a3b422 to
5582c36
Compare
|
Focus on the testcase result. And don’t use |
2a5cae9 to
6a9c25b
Compare
thienvh332
suggested changes
Aug 25, 2025
Comment on lines
699
to
726
| message = ( | ||
| "<p>This order has been updated automatically via the import of file " | ||
| "<strong>{}</strong><br/>" | ||
| "Done quantities were updated on {} lines out of the {} Reception lines</p>" | ||
| ).format( | ||
| html_escape(self.order_filename), | ||
| action.get("number_line_updated", 0), | ||
| action.get("reception_lines", 0), | ||
| ) | ||
|
|
||
| unknown_products = action.get("unknown_products", False) | ||
| if unknown_products: | ||
| message += "<p><strong>Unknown Product:</strong><br/>" | ||
| message += "<br/>".join( | ||
| f" * {html_escape(json.dumps(rec, ensure_ascii=False))}" | ||
| for rec in unknown_products | ||
| ) | ||
| message += "</p>" | ||
|
|
||
| qty_diff = action.get("qty_diff", False) | ||
| if qty_diff: | ||
| message += "<p><strong>Difference of Qty:</strong><br/>" | ||
| message += "<br/>".join( | ||
| f" * {html_escape(json.dumps(rec, ensure_ascii=False))}" | ||
| for rec in qty_diff | ||
| ) | ||
| message += "</p>" | ||
| return message |
d203914 to
af7d036
Compare
|
The last two issues are:
|
…between the Despatch Advice file and the order data
…ave been installed
af7d036 to
3417feb
Compare
thienvh332
approved these changes
Aug 25, 2025
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
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.

Changes
Rationale
The failure occurs because
edi_purchase_edifact_ocaindirectly depends onaccount, which introduces the required fieldautopost_billsonres.partner.During
TestEDIExchangeRecordSecurity, when a new user is created, the linked partner record is also created. At that moment, the default value forautopost_billsis not yet initialized, leaving it NULL and causing the test to fail.Fix
Apply
@tagged("-at_install")to the base mixin.This prevents a race condition where the parent
class setUpmight run before all module models are fully loaded. With this change:Tests are executed only after the environment is fully initialized.
Required defaults (like
autopost_bills) are properly loaded.