summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/stock_move.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/stock_move.py')
-rw-r--r--indoteknik_custom/models/stock_move.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_move.py b/indoteknik_custom/models/stock_move.py
index e1d4e74c..6b631713 100644
--- a/indoteknik_custom/models/stock_move.py
+++ b/indoteknik_custom/models/stock_move.py
@@ -12,9 +12,13 @@ class StockMove(models.Model):
default=lambda self: self.product_id.print_barcode,
)
qr_code_variant = fields.Binary("QR Code Variant", compute='_compute_qr_code_variant')
+ barcode = fields.Char(string='Barcode', related='product_id.barcode')
def _compute_qr_code_variant(self):
for rec in self:
+ if rec.picking_id.picking_type_code == 'outgoing' and rec.picking_id and rec.picking_id.origin and rec.picking_id.origin.startswith('SO/'):
+ rec.qr_code_variant = rec.product_id.qr_code_variant
+ rec.print_barcode = True
if rec.print_barcode and rec.print_barcode == True and rec.product_id and rec.product_id.qr_code_variant:
rec.qr_code_variant = rec.product_id.qr_code_variant
else: