You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

12 lines
365 B

# -*- coding: utf-8 -*-
from . import models
from . import report
from odoo import api, SUPERUSER_ID
def _set_qr(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
for record in env['product.product'].search([]):
name = record.name.replace(" ", "")
record.sequence = 'DEF' + name.upper()+str(record.id)
record.generate_qr()