|
@@ -20,7 +20,7 @@ class Search_Barcode_Purchase(models.TransientModel):
|
|
|
products = self.env['product.product'].search([('factory_barcode', '=ilike', self.product_code)])
|
|
|
|
|
|
if len(products) == 1:
|
|
|
- self.products_ids = products[0]
|
|
|
+ self.products_ids += products[0]
|
|
|
self.product_code =None
|
|
|
|
|
|
elif len(products) > 1:
|
|
@@ -59,7 +59,8 @@ class Search_Barcode_Purchase(models.TransientModel):
|
|
|
product_id.id,
|
|
|
qty=self.quantity,
|
|
|
uom_id=product_id.uom_po_id.id,
|
|
|
- partner_id=purchase.partner_id.id)
|
|
|
+ partner_id=purchase.partner_id.id,
|
|
|
+ )
|
|
|
|
|
|
if orde_line_datos:
|
|
|
orde_line_datos.write({ 'product_qty' : (orde_line_datos.product_qty + 1)})
|