Skip to content

[18.0][MIG] stock_barcodes_gs1: Migration to 18.0#729

Draft
sergio-teruel wants to merge 47 commits into
OCA:18.0from
Tecnativa:18.0-mig-stock_barcodes_gs1
Draft

[18.0][MIG] stock_barcodes_gs1: Migration to 18.0#729
sergio-teruel wants to merge 47 commits into
OCA:18.0from
Tecnativa:18.0-mig-stock_barcodes_gs1

Conversation

@sergio-teruel

@sergio-teruel sergio-teruel commented Oct 13, 2025

Copy link
Copy Markdown
Contributor

@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration stock_barcodes_gs1

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Oct 14, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 14, 2025
13 tasks
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 15, 2026
@pedrobaeza pedrobaeza removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 15, 2026
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 21, 2026
@pedrobaeza pedrobaeza removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 23, 2026
oca-travis and others added 19 commits July 9, 2026 12:45
try the AI 240 'Additional product identification assigned
by the manufacturer'
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-barcode-11.0/stock-logistics-barcode-11.0-stock_barcodes_gs1
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-barcode-11-0/stock-logistics-barcode-11-0-stock_barcodes_gs1/
* Do not replace the quantity if a package is readed, we should multiply it
* Use the product barcode as a packaging barcode if no packaging barcode has been read and no product has been found
* Auto create lot controlled from barcode options.
* Check required options before processing.
* Reduce complexity of `process_barcode` and enhance extensibility
  of package barcode processing.
* More extensibility on product_qty handling.
* Align new lot wizard with barcodes read one by adding support to
  AI 240
oca-ci and others added 26 commits July 9, 2026 12:46
…ct_qty only if product_uom_categ_kgm

TT49953
Since the 18.0 migration of stock_barcodes, display_notification()
messages are sent to the current user's partner channel under the
'stock_barcodes_scan' notification type with a 'stock_barcodes_notify'
inner type; the tests still asserted a literal 'stock_barcodes-<id>'
bus channel, so every _assert_barcode_notification call failed. The
partner channel also carries sounds and other payloads, so look for the
expected message instead of asserting the whole channel content with
assertBusNotifications.

Depends on Tecnativa:18.0-mig-stock_barcodes (OCA PR OCA#725), which
restores the display_notification() envelope handled by the web client.
- Extract _set_gs1_product_qty() shared by the quantity AIs (30/37) and
  _process_gs1_weight() shared by the weight AIs (310/330), which were
  duplicated implementations; the weight handler no longer crashes when
  the parsed rule lacks the use_weight_as_unit key.
- Interpolate translated warnings through _() placeholders instead of
  str.format() on the translated string, so a malformed translation can
  not break the scan.
- Resolve the AI handler with a single getattr() call.
- Add missing copyright headers to the barcode models.
@carlosdauden
carlosdauden force-pushed the 18.0-mig-stock_barcodes_gs1 branch from 55bb98e to adab49a Compare July 9, 2026 10:51
@OCA-git-bot OCA-git-bot added series:18.0 mod:stock_barcodes_gs1 Module stock_barcodes_gs1 labels Jul 9, 2026
and nomenclature.gs1_separator_fnc1 in barcode
or not self._ean_barcode_valid(barcode)
):
gs1_list = nomenclature.parse_barcode(barcode)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

parse_barcode() can also raise (ValidationError/ValueError) when a non-GS1 code happens to match a date rule (e.g. 1799999912), so the user gets an error dialog instead of falling back to super(). Shouldn't we wrap it like core does in _preprocess_gs1_search_args()?

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

Labels

mod:stock_barcodes_gs1 Module stock_barcodes_gs1 series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.