[FIX] pos_restaurant: Issue 614981: product renaming from name to display_name was...
authorFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Wed, 8 Oct 2014 10:38:44 +0000 (12:38 +0200)
committerFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Wed, 8 Oct 2014 10:42:08 +0000 (12:42 +0200)
addons/pos_restaurant/static/src/js/multiprint.js
addons/pos_restaurant/static/src/xml/splitbill.xml

index 14e412a..81b0e34 100644 (file)
@@ -81,19 +81,19 @@ function openerp_restaurant_multiprint(instance,module){
                 if (typeof old[product] === 'undefined'){
                     add.push({
                         'id': product,
-                        'name': this.pos.db.get_product_by_id(product).name,
+                        'name': this.pos.db.get_product_by_id(product).display_name,
                         'quantity': current[product],
                     });
                 }else if( old[product] < current[product]){
                     add.push({
                         'id': product,
-                        'name': this.pos.db.get_product_by_id(product).name,
+                        'name': this.pos.db.get_product_by_id(product).display_name,
                         'quantity': current[product] - old[product],
                     });
                 }else if( old[product] > current[product]){
                     rem.push({
                         'id': product,
-                        'name': this.pos.db.get_product_by_id(product).name,
+                        'name': this.pos.db.get_product_by_id(product).display_name,
                         'quantity': old[product] - current[product],
                     });
                 }
@@ -103,7 +103,7 @@ function openerp_restaurant_multiprint(instance,module){
                 if(typeof current[product] === 'undefined'){
                     rem.push({
                         'id': product,
-                        'name': this.pos.db.get_product_by_id(product).name,
+                        'name': this.pos.db.get_product_by_id(product).display_name,
                         'quantity': old[product], 
                     });
                 }
index d56f01a..e14f7ff 100644 (file)
@@ -13,7 +13,7 @@
         <li t-attf-class="orderline #{ selected ? 'selected' : ''} #{ quantity !== line.get_quantity() ? 'partially' : '' }"
             t-att-data-id="id">
             <span class="product-name">
-                <t t-esc="line.get_product().name"/>
+                <t t-esc="line.get_product().display_name"/>
             </span>
             <span class="price">
                 <t t-esc="widget.format_currency(line.get_display_price())"/>