- Change
__openerp__.pyaddon name field - Change
README.rstfile
| def is_valid_barcode(value): | |
| if not isinstance(value, str): | |
| return False | |
| if len(value) not in [8, 12, 13, 14, 17, 18]: | |
| return False | |
| if len(value) != 18: | |
| number_zero_to_add = 18 - len(value) | |
| value = '0' * number_zero_to_add + value |
Create a scrapy exporter on the root of your scrapy project, we suppose the name of your project is my_project, we can name this exporter: my_project_csv_item_exporter.py
from scrapy.conf import settings
from scrapy.contrib.exporter import CsvItemExporter
class MyProjectCsvItemExporter(CsvItemExporter):
def __init__(self, *args, **kwargs):
delimiter = settings.get('CSV_DELIMITER', ',')