Add barcode to product

#!/bin/bash
for i in $(cat codigosyreferencia.csv)
do
        referencia=$(echo $i | awk -F, '{print $1}')
        codigobarras=$(echo $i | awk -F, '{print $2}')
        echo "update public.product_product SET barcode='$codigobarras' where default_code='$referencia';"
done

As postgres:

psql alejandrogomez < product_barcode.sql

Change product type:

update product_template SET type = 'product';

Enable available in POS:

update product_template SET available_in_pos = true;
odoo_psql_product.txt · Last modified: 2020/02/26 21:21
Public Domain Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain