Browse Source

pos_price_to_weight module : migration to version 11.0

pull/128/head
Manuel Claeys Bouuaert 5 years ago
committed by Rémy Taymans
parent
commit
b6c5075872
  1. 1
      pos_price_to_weight/__init__.py
  2. 3
      pos_price_to_weight/__manifest__.py
  3. 4
      pos_price_to_weight/demo/product_product.xml
  4. 1
      pos_price_to_weight/models/__init__.py
  5. 13
      pos_price_to_weight/models/barcode_rule.py

1
pos_price_to_weight/__init__.py

@ -1,2 +1 @@
# -*- coding: utf-8 -*-
from . import models

3
pos_price_to_weight/__manifest__.py

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2017-Today: La Louve (<http://www.lalouve.net/>)
# @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)',

4
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).
<field name="name">Apples (with Price To Weight Barcode)</field>
<field name="barcode">0212345000007</field>
<field name="list_price">1.50</field>
<field name="uom_id" ref="product.product_uom_kgm"/>
<field name="uom_po_id" ref="product.product_uom_kgm"/>
<field name="uom_id" ref="uom.product_uom_kgm"/>
<field name="uom_po_id" ref="uom.product_uom_kgm"/>
</record>
</odoo>

1
pos_price_to_weight/models/__init__.py

@ -1,2 +1 @@
# -*- coding: utf-8 -*-
from . import barcode_rule

13
pos_price_to_weight/models/barcode_rule.py

@ -1,17 +1,14 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2017-Today: La Louve (<http://www.lalouve.net/>)
# @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