summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/models/barcode_rule.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/point_of_sale/models/barcode_rule.py')
-rw-r--r--addons/point_of_sale/models/barcode_rule.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/addons/point_of_sale/models/barcode_rule.py b/addons/point_of_sale/models/barcode_rule.py
new file mode 100644
index 00000000..e9b67a51
--- /dev/null
+++ b/addons/point_of_sale/models/barcode_rule.py
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import models, fields
+from odoo.tools.translate import _
+
+
+class BarcodeRule(models.Model):
+ _inherit = 'barcode.rule'
+
+ type = fields.Selection(selection_add=[
+ ('weight', 'Weighted Product'),
+ ('price', 'Priced Product'),
+ ('discount', 'Discounted Product'),
+ ('client', 'Client'),
+ ('cashier', 'Cashier')
+ ], ondelete={
+ 'weight': 'set default',
+ 'price': 'set default',
+ 'discount': 'set default',
+ 'client': 'set default',
+ 'cashier': 'set default',
+ })