Amit Patel (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons13-point-of-sale-apa into
lp:openobject-addons.
Requested reviews:
Amit Patel (OpenERP) (apa-tiny)
Fabien (Open ERP) (fp-tinyerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons13-point-of-sale-apa/+merge/128670
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons13-point-of-sale-apa/+merge/128670
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-addons13-point-of-sale-apa.
=== modified file 'point_of_sale/static/src/js/devices.js'
--- point_of_sale/static/src/js/devices.js 2012-09-18 13:37:32 +0000
+++ point_of_sale/static/src/js/devices.js 2012-10-15 09:24:23 +0000
@@ -196,7 +196,7 @@
* {
* quantity: (number) the number of items, or the weight,
* unit_name: (string) the name of the item's unit (kg, dozen, ...)
- * list_price: (number) the price of one unit of the item before discount
+ * price: (number) the price of one unit of the item before discount
* discount: (number) the discount on the product in % [0,100]
* product_name: (string) the name of the product
* price_with_tax: (number) the price paid for this orderline, tax included
=== modified file 'point_of_sale/static/src/js/models.js'
--- point_of_sale/static/src/js/models.js 2012-09-13 14:03:10 +0000
+++ point_of_sale/static/src/js/models.js 2012-10-15 09:24:23 +0000
@@ -333,7 +333,7 @@
this.pos = options.pos;
this.order = options.order;
this.product = options.product;
- this.price = options.product.get('list_price');
+ this.price = options.product.get('price');
this.quantity = 1;
this.discount = 0;
this.type = 'unit';
@@ -387,11 +387,11 @@
return this.product;
},
// return the base price of this product (for this orderline)
- get_list_price: function(){
+ get_price: function(){
return this.price;
},
// changes the base price of the product for this orderline
- set_list_price: function(price){
+ set_price: function(price){
this.price = price;
this.trigger('change');
},
@@ -425,7 +425,7 @@
export_as_JSON: function() {
return {
qty: this.get_quantity(),
- price_unit: this.get_list_price(),
+ price_unit: this.get_price(),
discount: this.get_discount(),
product_id: this.get_product().get('id'),
};
@@ -435,7 +435,7 @@
return {
quantity: this.get_quantity(),
unit_name: this.get_unit().name,
- list_price: this.get_list_price(),
+ price: this.get_price(),
discount: this.get_discount(),
product_name: this.get_product().get('name'),
price_with_tax : this.get_price_with_tax(),
@@ -580,7 +580,7 @@
line.set_quantity(options.quantity);
}
if(options.price !== undefined){
- line.set_list_price(options.price);
+ line.set_price(options.price);
}
var last_orderline = this.getLastOrderline();
=== modified file 'point_of_sale/static/src/js/screens.js'
--- point_of_sale/static/src/js/screens.js 2012-09-18 13:37:32 +0000
+++ point_of_sale/static/src/js/screens.js 2012-10-15 09:24:23 +0000
@@ -530,7 +530,7 @@
},
get_product_price: function(){
var product = this.get_product();
- return (product ? product.get('list_price') : 0) || 0;
+ return (product ? product.get('price') : 0) || 0;
},
get_product_weight: function(){
return this.weight || 0;
=== modified file 'point_of_sale/static/src/js/widgets.js'
--- point_of_sale/static/src/js/widgets.js 2012-09-18 13:37:32 +0000
+++ point_of_sale/static/src/js/widgets.js 2012-10-15 09:24:23 +0000
@@ -186,8 +186,8 @@
order.getSelectedLine().set_quantity(val);
}else if( mode === 'discount'){
order.getSelectedLine().set_discount(val);
- }else if( mode === 'list_price'){
- order.getSelectedLine().set_list_price(val);
+ }else if( mode === 'price'){
+ order.getSelectedLine().set_price(val);
}
} else {
this.pos.get('selectedOrder').destroy();
=== modified file 'point_of_sale/static/src/xml/pos.xml'
--- point_of_sale/static/src/xml/pos.xml 2012-09-28 15:20:41 +0000
+++ point_of_sale/static/src/xml/pos.xml 2012-10-15 09:24:23 +0000
@@ -74,7 +74,7 @@
<button class="input-button number-char">7</button>
<button class="input-button number-char">8</button>
<button class="input-button number-char">9</button>
- <button class="mode-button" data-mode='list_price'>Price</button>
+ <button class="mode-button" data-mode='price'>Price</button>
<br />
<button class="input-button" id="numpad-minus" >+/-</button>
<button class="input-button number-char">0</button>
@@ -368,12 +368,12 @@
<img src='' /> <!-- the product thumbnail -->
<t t-if="!widget.model.get('to_weight')">
<span class="price-tag">
- <t t-esc="widget.format_currency(widget.model.get('list_price'))"/>
+ <t t-esc="widget.format_currency(widget.model.get('price'))"/>
</span>
</t>
<t t-if="widget.model.get('to_weight')">
<span class="price-tag">
- <t t-esc="widget.format_currency(widget.model.get('list_price'))+'/Kg'"/>
+ <t t-esc="widget.format_currency(widget.model.get('price'))+'/Kg'"/>
</span>
</t>
</div>
@@ -490,7 +490,7 @@
</em>
<t t-esc="widget.model.get_unit().name" />
at
- <t t-esc="widget.format_currency(widget.model.get_list_price())" />
+ <t t-esc="widget.format_currency(widget.model.get_price())" />
/
<t t-esc="widget.model.get_unit().name" />
</li>
@@ -558,7 +558,7 @@
<t t-esc="order.get_quantity().toFixed(0)"/>
</td>
<td class="pos-right-align">
- <t t-esc="widget.format_currency(order.get_list_price() * (1 - order.get_discount()/100) * order.get_quantity().toFixed(2))"/>
+ <t t-esc="widget.format_currency(order.get_price() * (1 - order.get_discount()/100) * order.get_quantity().toFixed(2))"/>
</td>
</tr>
</table>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp