Debian Codegraph @

addons/point_of_sale/models/barcode_rule.py

raw
1 # -*- coding: utf-8 -*-
2 # Part of Odoo. See LICENSE file for full copyright and licensing details.
3
4 from odoo import models, fields
5 from odoo.tools.translate import _
6
7
8 class BarcodeRule(models.Model):
9 _inherit = 'barcode.rule'
10
11 type = fields.Selection(selection_add=[
12 ('weight', 'Weighted Product'),
13 ('price', 'Priced Product'),
14 ('discount', 'Discounted Product'),
15 ('client', 'Client'),
16 ('cashier', 'Cashier')
17 ], ondelete={
18 'weight': 'set default',
19 'price': 'set default',
20 'discount': 'set default',
21 'client': 'set default',
22 'cashier': 'set default',
23 })