[IMP] pos_barcodes: fix some wrongly named variables, fix missing barcode nomenclature field in pos config, 'unit' type renamed to 'product' to fit with the existing keywords
This commit is contained in:
committed by
Frédéric van der Essen
parent
e92963fb78
commit
acffd62e3d
@@ -44,13 +44,13 @@ class barcode_rule(osv.osv):
|
||||
'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',
|
||||
}
|
||||
|
||||
@@ -2,6 +2,19 @@
|
||||
<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">
|
||||
@@ -75,6 +88,5 @@
|
||||
sequence="30"
|
||||
groups="point_of_sale.group_pos_manager"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -110,8 +110,8 @@ openerp.pos_barcodes = function(instance){
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user