diff --git a/pos_price_to_weight/__init__.py b/pos_price_to_weight/__init__.py index a0fdc10..0650744 100644 --- a/pos_price_to_weight/__init__.py +++ b/pos_price_to_weight/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- from . import models diff --git a/pos_price_to_weight/__manifest__.py b/pos_price_to_weight/__manifest__.py index 9a20874..87868e7 100644 --- a/pos_price_to_weight/__manifest__.py +++ b/pos_price_to_weight/__manifest__.py @@ -1,11 +1,10 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2017-Today: La Louve () # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Point of Sale - Price to Weight', - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'category': 'Point Of Sale', 'summary': 'Compute weight based on barcodes with prices', 'author': 'La Louve, GRAP, Odoo Community Association (OCA)', diff --git a/pos_price_to_weight/demo/product_product.xml b/pos_price_to_weight/demo/product_product.xml index e1d6204..14d5671 100644 --- a/pos_price_to_weight/demo/product_product.xml +++ b/pos_price_to_weight/demo/product_product.xml @@ -11,8 +11,8 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). Apples (with Price To Weight Barcode) 0212345000007 1.50 - - + + diff --git a/pos_price_to_weight/models/__init__.py b/pos_price_to_weight/models/__init__.py index 7173a15..ba6651a 100644 --- a/pos_price_to_weight/models/__init__.py +++ b/pos_price_to_weight/models/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- from . import barcode_rule diff --git a/pos_price_to_weight/models/barcode_rule.py b/pos_price_to_weight/models/barcode_rule.py index d268390..11b24fa 100644 --- a/pos_price_to_weight/models/barcode_rule.py +++ b/pos_price_to_weight/models/barcode_rule.py @@ -1,17 +1,14 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2017-Today: La Louve () # @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)')) + ]) + \ No newline at end of file