summaryrefslogtreecommitdiff
path: root/addons/stock/models/barcode.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/stock/models/barcode.py')
-rw-r--r--addons/stock/models/barcode.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/addons/stock/models/barcode.py b/addons/stock/models/barcode.py
index 701ce3fc54d..99b88475e47 100644
--- a/addons/stock/models/barcode.py
+++ b/addons/stock/models/barcode.py
@@ -1,18 +1,15 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
-from odoo import models, _
+from odoo import models, fields, _
class BarcodeRule(models.Model):
_inherit = 'barcode.rule'
- def _get_type_selection(self):
- types = set(super(BarcodeRule, self)._get_type_selection())
- types.update([
+ type = fields.Selection(selection_add=[
('weight', _('Weighted Product')),
('location', _('Location')),
('lot', _('Lot')),
('package', _('Package'))
])
- return list(types)