barcodes => oca-ocb-warehouse

This commit is contained in:
Ernad Husremovic 2025-10-25 09:09:43 +02:00
parent 2526f41c76
commit 88b19d74eb
178 changed files with 0 additions and 48002 deletions

View file

@ -1,17 +0,0 @@
# -*- coding: utf-8 -*-
from . import models
from odoo import api, SUPERUSER_ID
def _assign_default_nomeclature_id(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
company_ids_without_default_nomenclature_id = env['res.company'].search([
('nomenclature_id', '=', False)
])
default_nomenclature_id = env.ref('barcodes.default_barcode_nomenclature', raise_if_not_found=False)
if default_nomenclature_id:
company_ids_without_default_nomenclature_id.write({
'nomenclature_id': default_nomenclature_id.id,
})