[18.0][MIG] edi_purchase_edifact_oca: Migration to 18.0#4
[18.0][MIG] edi_purchase_edifact_oca: Migration to 18.0#4
Conversation
9c7787b to
803b1f4
Compare
|
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? |
|
FYI, you can |
5a3b422 to
5582c36
Compare
|
Focus on the testcase result. And don’t use |
2a5cae9 to
6a9c25b
Compare
| 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:
|
af7d036 to
3417feb
Compare
3417feb to
6d2c9da
Compare
[FIX] edi_purchase_edifact_oca: Use company directly from purchase.order
…default_code from product.supplierinfo
d98aa3a to
d2585b1
Compare
22edfd0 to
01dcefa
Compare
e4ec0de to
d7b1b4a
Compare
| from odoo.tests.common import TransactionCase, tagged | ||
|
|
||
|
|
||
| @tagged("-at_install", "post_install") |
There was a problem hiding this comment.
No, 1 module 1 PR. create another one for edi_core_oca.
There was a problem hiding this comment.
I’ve created a new PR for cleanup: https://github.com/P-H-Phuc/edi-framework/pull/10.
Additionally, we have another PR for discussion https://github.com/P-H-Phuc/edi-framework/pull/3, you can check it . This one is an older version (edi_oca was renamed to edi_core_oca).
d7b1b4a to
6ee67dc
Compare

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 EDI CORE OCA
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.Discuss here:
https://github.com/P-H-Phuc/edi-framework/pull/3