[16.0][ADD] account_edi_ubl_move_line_uom_and_packaging_unece#1311
Open
sbejaoui wants to merge 2 commits into
Open
[16.0][ADD] account_edi_ubl_move_line_uom_and_packaging_unece#1311sbejaoui wants to merge 2 commits into
sbejaoui wants to merge 2 commits into
Conversation
6de7871 to
7ce6cb5
Compare
jbaudoux
requested changes
Mar 20, 2026
Contributor
jbaudoux
left a comment
There was a problem hiding this comment.
There are plenty of unece codes for a pallet. You need m2m between packaging level and unece codes to be able to match a level based on the given unece code in the bill.
7ce6cb5 to
2725147
Compare
jbaudoux
requested changes
Mar 24, 2026
Contributor
jbaudoux
left a comment
There was a problem hiding this comment.
As discussed. When packaging codes are used as unit code, they are prefixed by "X"
2725147 to
a931476
Compare
lmignon
suggested changes
Mar 24, 2026
Contributor
|
OCA/community-data-files#268 is merged |
a931476 to
6781bfb
Compare
lmignon
reviewed
Mar 24, 2026
lmignon
reviewed
Mar 24, 2026
d7afbe2 to
fd9cd34
Compare
lmignon
suggested changes
Mar 25, 2026
f7f604d to
473b366
Compare
lmignon
suggested changes
Mar 25, 2026
jbaudoux
reviewed
Mar 25, 2026
Comment on lines
+37
to
+39
| packaging_level_ids = pl_model._get_packaging_level_ids_by_unece_code( | ||
| unit_code | ||
| ) + pl_model._get_packaging_level_ids_by_unece_code(unit_code.lstrip("X")) |
Contributor
There was a problem hiding this comment.
Suggested change
| packaging_level_ids = pl_model._get_packaging_level_ids_by_unece_code( | |
| unit_code | |
| ) + pl_model._get_packaging_level_ids_by_unece_code(unit_code.lstrip("X")) | |
| packaging_level_ids = pl_model._get_packaging_level_ids_by_unece_code( | |
| unit_code | |
| ) if not unit_code.startswith("X") else pl_model._get_packaging_level_ids_by_unece_code(unit_code.lstrip("X")) |
Contributor
There was a problem hiding this comment.
or simply :)
Suggested change
| packaging_level_ids = pl_model._get_packaging_level_ids_by_unece_code( | |
| unit_code | |
| ) + pl_model._get_packaging_level_ids_by_unece_code(unit_code.lstrip("X")) | |
| packaging_level_ids = pl_model._get_packaging_level_ids_by_unece_code(unit_code.lstrip("X")) |
Author
Contributor
There was a problem hiding this comment.
Yes but the unit code never starts with X. So it should work, like you did with this final version
473b366 to
b010f6e
Compare
lmignon
approved these changes
Mar 25, 2026
jbaudoux
approved these changes
Mar 25, 2026
b010f6e to
4066a8d
Compare
6049461 to
19891ea
Compare
19891ea to
2778aeb
Compare
Adds support for UNECE unit codes during UBL invoice import to automatically detect and assign the appropriate unit of measure or product packaging on invoice lines. When a UNECE code matches a product packaging, the packaging is set with priority. Otherwise, the corresponding unit of measure is applied based on the UNECE code.
2778aeb to
7eacd65
Compare
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.

Adds support for UNECE unit codes during UBL invoice import to automatically detect and assign the appropriate unit of measure or product packaging on invoice lines.
When a UNECE code matches a product packaging, the packaging is set with priority. Otherwise, the corresponding unit of measure is applied based on the UNECE code.
needs: