OCA / stock-logistics-barcode

https://odoo-community.org/psc-teams/logistics-18
GNU Affero General Public License v3.0
158 stars 324 forks source link

barcodes_generator_abstract: 'barcode_rule_id' value not respected in create() of 'barcode.generate.mixin' #539

Closed carmenbianca closed 2 months ago

carmenbianca commented 10 months ago

Module

barcodes_generator_abstract (in combination with barcodes_generator_product).

Describe the bug

When creating a product and manually selecting the barcode rule during creation, that rule is not applied if another barcode rule is set as automated.

To Reproduce

Affected versions: 12, probably later.

Steps to reproduce the behavior:

  1. Install barcodes_generator_product
  2. Enable automation (with sequence) on the product module's barcode.rule.
  3. Create a new barcode.rule for products. Enable generation for it (optional, but makes testing easier).
  4. Create a new product. During product creation, select the newly created barcode.rule.
  5. The module's barcode.rule generation is applied, but the new barcode.rule is saved to the product. If you click on 'generate barcode', the new barcode.rule's generation is applied.

Expected behavior The automated barcode.rule generation is not applied to products that specify a different barcode.rule generation. Optionally, if the specified barcode.rule allows generation, apply it automatically. Not optionally, if the specified barcode.rule is the one with automation, then apply the generation.

Additional context I'm working on seeing if the module is compatible with pos_price_to_weight.

Related to #538

github-actions[bot] commented 4 months ago

There hasn't been any activity on this issue in the past 6 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 issue to never become stale, please ask a PSC member to apply the "no stale" label.