[18.0][MIG] stock_barcodes_gs1: Migration to 18.0#729
Conversation
|
/ocabot migration stock_barcodes_gs1 |
|
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. |
|
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. |
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/
If not, you got an error.
* 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
…ad of action_done
…readed as 3103 AI
…erial is included in barcode TT48256
…nded by other modules
…ackaging set in wizard TT49631
…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.
55bb98e to
adab49a
Compare
| and nomenclature.gs1_separator_fnc1 in barcode | ||
| or not self._ean_barcode_valid(barcode) | ||
| ): | ||
| gs1_list = nomenclature.parse_barcode(barcode) |
There was a problem hiding this comment.
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()?
@Tecnativa
Depends on:
cc @Christian-RB @florian-dacosta