[FIX] pos_restaurant: Issue 614981: product renaming from name to display_name was not done in the pos_restaurant module, resulting in empty product names in various places

This commit is contained in:
Frederic van der Essen 2014-10-08 12:38:44 +02:00
parent 6c779e736a
commit a644c4c3c1
2 changed files with 5 additions and 5 deletions

View File

@ -81,19 +81,19 @@ function openerp_restaurant_multiprint(instance,module){
if (typeof old[product] === 'undefined'){ if (typeof old[product] === 'undefined'){
add.push({ add.push({
'id': product, '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], 'quantity': current[product],
}); });
}else if( old[product] < current[product]){ }else if( old[product] < current[product]){
add.push({ add.push({
'id': product, '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], 'quantity': current[product] - old[product],
}); });
}else if( old[product] > current[product]){ }else if( old[product] > current[product]){
rem.push({ rem.push({
'id': product, '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], 'quantity': old[product] - current[product],
}); });
} }
@ -103,7 +103,7 @@ function openerp_restaurant_multiprint(instance,module){
if(typeof current[product] === 'undefined'){ if(typeof current[product] === 'undefined'){
rem.push({ rem.push({
'id': product, '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], 'quantity': old[product],
}); });
} }

View File

@ -13,7 +13,7 @@
<li t-attf-class="orderline #{ selected ? 'selected' : ''} #{ quantity !== line.get_quantity() ? 'partially' : '' }" <li t-attf-class="orderline #{ selected ? 'selected' : ''} #{ quantity !== line.get_quantity() ? 'partially' : '' }"
t-att-data-id="id"> t-att-data-id="id">
<span class="product-name"> <span class="product-name">
<t t-esc="line.get_product().name"/> <t t-esc="line.get_product().display_name"/>
</span> </span>
<span class="price"> <span class="price">
<t t-esc="widget.format_currency(line.get_display_price())"/> <t t-esc="widget.format_currency(line.get_display_price())"/>