Browse Source

[FIX] in v10, we can add value to selection fieldw

pull/465/head
Invitu 7 years ago
committed by Iván Todorovich
parent
commit
b734908ea4
  1. 11
      pos_price_to_weight/models/barcode_rule.py

11
pos_price_to_weight/models/barcode_rule.py

@ -3,15 +3,12 @@
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, models
from odoo import _, fields, models
class BarcodeRule(models.Model):
_inherit = 'barcode.rule'
@api.model
def _get_type_selection(self):
res = super(BarcodeRule, self)._get_type_selection()
res.append(
('price_to_weight', _('Priced Product (Computed Weight)')))
return res
type = fields.Selection(selection_add=[
('price_to_weight', _('Priced Product (Computed Weight)'))
])
Loading…
Cancel
Save