'barcode_nomenclature_id': fields.many2one('barcode.nomenclature','Barcode Nomenclature'),
'priority': fields.float('Priority', help='Rules with a higher priority match first'),
#'encoding': fields.selection([('any','Any'),('ean13','EAN-13'),('ean8','EAN-8'),('codabar','Codabar'),('upca','UPC-A'),('upce','UPC-E')],'Encoding',help='This rule will apply only if the barcode is encoded with the specified encoding'),
- 'type': fields.selection([('unit','Unit Product'),('weight','Weighted Product'),('price','Priced Product'),('discount','Discounted Product'),('client','Client'),('cashier','Cashier')],'Type', required=True),
+ 'type': fields.selection([('product','Unit Product'),('weight','Weighted Product'),('price','Priced Product'),('discount','Discounted Product'),('client','Client'),('cashier','Cashier')],'Type', required=True),
'pattern': fields.char('Barcode Pattern', size=32, help="The barcode matching pattern"),
#'alias': fields.char('Alias',size=32,help='The matched pattern will alias to this barcode'),
}
_defaults = {
- 'type': 'unit',
+ 'type': 'product',
'pattern': '*',
#'encoding': 'any',
}
<openerp>
<data>
+ <record model="ir.ui.view" id="view_pos_config_form">
+ <field name="name">pos.config.form.view</field>
+ <field name="model">pos.config</field>
+ <field name="inherit_id" ref="point_of_sale.view_pos_config_form" />
+ <field name="arch" type="xml">
+ <xpath expr="//group[@string='Barcode Types']" position="after">
+ <group string="Barcode Nomenclature" col="4" >
+ <field name="barcode_nomenclature_id" />
+ </group>
+ </xpath>
+ </field>
+ </record>
+
<!-- BARCODE NOMENCLATURES -->
<record model="ir.ui.view" id="view_barcode_nomenclature_form">
sequence="30"
groups="point_of_sale.group_pos_manager"/>
-
</data>
</openerp>
for (var i = 0; i < rules.length; i++) {
if (match_pattern(ean,rules[i].pattern)) {
parse_result.type = rules[i].type;
- parse_result.value = get_value(ean,patterns[i].pattern);
- parse_result.base_code = get_basecode(ean,patterns[i].pattern);
+ parse_result.value = get_value(ean,rules[i].pattern);
+ parse_result.base_code = get_basecode(ean,rules[i].pattern);
return parse_result;
}
}