38 lines
1.8 KiB
Diff
38 lines
1.8 KiB
Diff
diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js
|
|
index e8ec348..b8ae62f 100644
|
|
--- a/addons/point_of_sale/static/src/js/db.js
|
|
+++ b/addons/point_of_sale/static/src/js/db.js
|
|
@@ -155,6 +155,9 @@ var PosDB = core.Class.extend({
|
|
if (product.barcode) {
|
|
str += '|' + product.barcode;
|
|
}
|
|
+ if (product.second_barcode) {
|
|
+ str += '|' + product.second_barcode;
|
|
+ }
|
|
if (product.default_code) {
|
|
str += '|' + product.default_code;
|
|
}
|
|
@@ -206,6 +209,9 @@ var PosDB = core.Class.extend({
|
|
if(product.barcode){
|
|
this.product_by_barcode[product.barcode] = product;
|
|
}
|
|
+ if(product.second_barcode){
|
|
+ this.product_by_barcode[product.second_barcode] = product;
|
|
+ }
|
|
}
|
|
},
|
|
_partner_search_string: function(partner){
|
|
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
|
|
index 15b866a..717c30b 100644
|
|
--- a/addons/point_of_sale/static/src/js/models.js
|
|
+++ b/addons/point_of_sale/static/src/js/models.js
|
|
@@ -347,7 +347,7 @@ exports.PosModel = Backbone.Model.extend({
|
|
model: 'product.product',
|
|
// todo remove list_price in master, it is unused
|
|
fields: ['display_name', 'list_price', 'lst_price', 'standard_price', 'categ_id', 'pos_categ_id', 'taxes_id',
|
|
- 'barcode', 'default_code', 'to_weight', 'uom_id', 'description_sale', 'description',
|
|
+ 'barcode', 'second_barcode', 'default_code', 'to_weight', 'uom_id', 'description_sale', 'description',
|
|
'product_tmpl_id','tracking'],
|
|
order: _.map(['sequence','default_code','name'], function (name) { return {name: name}; }),
|
|
domain: [['sale_ok','=',true],['available_in_pos','=',true]],
|