res_company.py 409 B

1234567891011121314151617
  1. # -*- coding: utf-8 -*-
  2. from odoo import models, fields
  3. class ResCompany(models.Model):
  4. _inherit = 'res.company'
  5. def _get_default_nomenclature(self):
  6. return self.env.ref('barcodes.default_barcode_nomenclature', raise_if_not_found=False)
  7. nomenclature_id = fields.Many2one(
  8. 'barcode.nomenclature',
  9. string="Nomenclature",
  10. default=_get_default_nomenclature,
  11. )