From e5150890236f42e48e4055dcba8aef39e093c8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20L=C3=B3pez=20L=C3=B3pez=20=28OpenERP=29?= Date: Tue, 27 Mar 2012 16:14:22 +0200 Subject: [PATCH] [imp] currency conversion - yet incomplete bzr revid: rlo@openerp.com-20120327141422-9grv8dw70q89ayx5 --- addons/point_of_sale/__openerp__.py | 2 +- addons/point_of_sale/static/src/js/pos.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py index 911ccf24bb5..f39c05c5e7d 100644 --- a/addons/point_of_sale/__openerp__.py +++ b/addons/point_of_sale/__openerp__.py @@ -40,7 +40,7 @@ Main features : """, 'author': 'OpenERP SA', 'images': ['images/cash_registers.jpeg', 'images/pos_analysis.jpeg','images/register_analysis.jpeg','images/sale_order_pos.jpeg','images/product_pos.jpeg'], - 'depends': ['sale'], + 'depends': ['sale','account'], 'init_xml': [], 'update_xml': [ diff --git a/addons/point_of_sale/static/src/js/pos.js b/addons/point_of_sale/static/src/js/pos.js index ecaecdf91d5..77b38d9b872 100644 --- a/addons/point_of_sale/static/src/js/pos.js +++ b/addons/point_of_sale/static/src/js/pos.js @@ -1249,6 +1249,7 @@ openerp.point_of_sale = function(db) { id = 0; } c = pos.categories[id]; + currency = pos.get('currency'); this.categoryView.ancestors = c.ancestors; this.categoryView.children = c.children; this.categoryView.renderElement(); @@ -1307,6 +1308,7 @@ openerp.point_of_sale = function(db) { // product with a specific price - specified into the barcode barcode = barcode.substring(2,5); // TODO conversion euro - old local currencies + new db.web.Model('res.currency').get_func('_get_conversion_rate')(['FRF', 'EUR']).pipe(function(result){}); price = Number(barcode.substring(7,5))/100; weight = ''; } else if (barcode.substring(0,2) in ['21','23','27','29','25']) {