diff options
| author | Tanguy Charlier <tac@odoo.com> | 2016-06-06 13:21:38 +0200 |
|---|---|---|
| committer | Tanguy Charlier <tac@odoo.com> | 2016-06-07 17:43:35 +0200 |
| commit | a1a8d6d44f2d16700d8a92675b9f2e5f4668c2e2 (patch) | |
| tree | de99286272ac5af47a21650c754eee711fd2d813 /addons/stock/models | |
| parent | 93fc3130659dc706e70546cf61f34cb906d6499b (diff) | |
[MIG] barcodes: Simplify selection fields overrides
Diffstat (limited to 'addons/stock/models')
| -rw-r--r-- | addons/stock/models/barcode.py | 7 |
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) |
