-
-
Notifications
You must be signed in to change notification settings - Fork 392
[16.0][MIG] stock_barcodes_gs1: Migration to version 16.0 #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 16.0
Are you sure you want to change the base?
Conversation
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
… GS1 barcodes. Better process of AI's
…readed as 3103 AI
|
Done |
|
I don't see the temporary commit: Please also squash administrative commits: https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests |
8c82a66 to
621be5b
Compare
| result = super().parse_gs1_rule_pattern(match, rule) | ||
| result["use_weight_as_unit"] = True if rule.use_weight_as_unit else False | ||
| if result: | ||
| result["use_weight_as_unit"] = True if rule.use_weight_as_unit else False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result["use_weight_as_unit"] = bool(rule.use_weight_as_unit)
| "barcodes_gs1_nomenclature.default_gs1_nomenclature" | ||
| ) | ||
| # Odoo creash with default separator (Alt029|#|\x1D) so remove it from settings | ||
| gs1_nomenclature.gs1_separator_fnc1 = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can't initialize the gs1_separator_fnc1 field as False because it's a Char field. I think initializing it with an empty string ("") should work.
|
I just found a bug in stock_barcodes / stock_barcodes_gs1 which is fully reproductible: when you receive a product tracked by serial number with a GS1 barcode such as (02)product_code(21)serialnumber in multiple quantities:
When you analyse the code: the error is located here: https://github.com/OCA/stock-logistics-barcode/blob/16.0/stock_barcodes/wizard/stock_barcodes_read_picking.py#L533 I feel that the code of stock_barcodes considers that, when entering the method _process_stock_move_line(), self.lot_id should be set to the scanned badcode, whereas the code of stock_barcode_gs1 considers that it just has to set self.lot_name. Or there is a problem linked to the fact that self.lot_id is set later in the execution order. I'm not an expert of the code of stock_barcodes, so my analysis may not be the right one. |
|
To fix the bug on products tracked by serial when receiving multiple quantities of the same product, I changed the code in stock_barcodes AND stock_barcodes_gs1:
The idea behind the change in stock_barcodes_gs1 is to reset self.lot_id when reading the GS1 barcode and setting self.lot_name, so that self.lot_id doesn't point to the previously scanned barcode any more.
As I am not familiar with the codebase of stock_barcodes, my changes may not be the rights ones and it may break other scenarios. That's why I just put out those diffs and I didn't propose a PR. |
|
Hi @sergio-teruel , could you please correct @kluna1998 suggestion? And check why the runboat is failing? Otherwise, it seems fine to me. Thanks for your contribution. |
|
Hi... I will review this week sorry!!! |
|
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. |
|
Hi @sergio-teruel thank you for your contribution! any chances to fix the tests? |
|
Hi @ivs-cetmix Not Yet!!! Sorry |
cc @Tecnativa TT47630
ping @carlosdauden @CarlosRoca13
Depends on: