Skip to content

[IMP] l10n_uy_ux: strip internal reference prefix from NomItem - #440

Closed
jue-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-h-125178-jue
Closed

[IMP] l10n_uy_ux: strip internal reference prefix from NomItem#440
jue-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-h-125178-jue

Conversation

@jue-adhoc

Copy link
Copy Markdown
Contributor

Since https://github.com/odoo/enterprise/pull/128600, l10n_uy_edi reports the product internal reference in its own <CodItem> node (TpoCod INT1) of the CFE XML, and no longer embeds it in NomItem.

l10n_uy_ux overrides _l10n_uy_edi_get_line_nom_and_desc() to build NomItem from the line description (line.name), which by default starts with the [default_code] prefix. This change strips that prefix when it matches the product internal reference, so the code is not duplicated in the item name: it travels in <CodItem>. Only the standard prefix is stripped — any other user-written text (including a reference mentioned elsewhere in the description) is preserved as is.

⚠️ Merge sequence: this PR must not be merged before the l10n_uy_edi change above is available in the OBA image; otherwise the internal reference would disappear from NomItem without a <CodItem> replacing it.

Test plan: new test test_130_nom_item_strips_internal_reference (prefix stripped, non-prefix mentions preserved); existing test_110/test_120 unaffected.

Internal reference: https://www.adhoc.inc/odoo/helpdesk/125178

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

The internal reference is now reported in its own <CodItem> node
(TpoCod INT1) by l10n_uy_edi, so it should no longer be embedded in
the item name. Since we build NomItem from the line description
(line.name), which by default starts with the "[default_code]"
prefix, we strip that prefix when it matches the product internal
reference. Any other user-written text is preserved as is.

@zaoral zaoral left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roboadhoc override=ci/runbot-oba
We force this merge because is needed to be able to update odoo image. After both are in the image then the ci/runbot problem will be resolved

@roboadhoc nobump r+

roboadhoc pushed a commit that referenced this pull request Aug 24, 2026
The internal reference is now reported in its own <CodItem> node
(TpoCod INT1) by l10n_uy_edi, so it should no longer be embedded in
the item name. Since we build NomItem from the line description
(line.name), which by default starts with the "[default_code]"
prefix, we strip that prefix when it matches the product internal
reference. Any other user-written text is preserved as is.

closes #440

Signed-off-by: Katherine Zaoral - kz (#l10n) <kz@adhoc.com.ar>
@roboadhoc

Copy link
Copy Markdown
Contributor

@jue-adhoc @zaoral staging failed: ci/runbot-oba on 82f4b867b0585a01949e2e415f07e77d68aac092 (view more at https://runbot.dev-adhoc.com//runbot/batch/104381/build/105619)

@vib-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc retry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants