Debian Codegraph @

addons/barcodes_gs1_nomenclature/models/ir_http.py

raw
1 # -*- coding: utf-8 -*-
2 # Part of Odoo. See LICENSE file for full copyright and licensing details.
3
4 from odoo import models
5
6
7 class IrHttp(models.AbstractModel):
8 _inherit = 'ir.http'
9
10 def session_info(self):
11 res = super().session_info()
12 nomenclature = self.env.company.sudo().nomenclature_id
13 if not nomenclature.is_gs1_nomenclature:
14 return res
15 res['gs1_group_separator_encodings'] = nomenclature.gs1_separator_fnc1
16 return res