mirror of
https://github.com/bringout/oca-ocb-technical.git
synced 2026-04-18 06:32:00 +02:00
Initial commit: Technical packages
This commit is contained in:
commit
3473fa71a0
873 changed files with 297766 additions and 0 deletions
17
odoo-bringout-oca-ocb-barcodes/barcodes/__init__.py
Normal file
17
odoo-bringout-oca-ocb-barcodes/barcodes/__init__.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# -*- 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,
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue