diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-04-14 11:40:23 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-04-14 11:40:23 +0200 |
| commit | 2ffbb5f93d33bd4f498665e4e9f902dfb29ff8f1 (patch) | |
| tree | 96f2c17824baa3cbc919282e79b95e933c773958 | |
| parent | d3e7a8ef5e825ff7b4c0f936345bb01961bd93d5 (diff) | |
| parent | d246e36c824931613229a6467e21d65d392a2fa3 (diff) | |
[MERGE] forward port of branch 7.0 up to d246e36
| -rw-r--r-- | addons/sale_margin/sale_margin.py | 2 | ||||
| -rw-r--r-- | openerp/tools/translate.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/addons/sale_margin/sale_margin.py b/addons/sale_margin/sale_margin.py index 094a9b2ba6f..ec1bd83dd50 100644 --- a/addons/sale_margin/sale_margin.py +++ b/addons/sale_margin/sale_margin.py @@ -37,7 +37,7 @@ class sale_order_line(osv.osv): to_cur = self.pool.get('product.pricelist').browse(cr, uid, [pricelist])[0].currency_id.id if product: product = self.pool['product.product'].browse(cr, uid, product, context=context) - purchase_price = product.price_get(ptype='standard_price', context=dict(context, currency_id=to_cur))[product.id] + purchase_price = product.standard_price to_uom = res.get('product_uom', uom) if to_uom != product.uom_id.id: purchase_price = self.pool['product.uom']._compute_price(cr, uid, product.uom_id.id, purchase_price, to_uom) diff --git a/openerp/tools/translate.py b/openerp/tools/translate.py index 01d1a4a7ebf..0d65d6d0bc2 100644 --- a/openerp/tools/translate.py +++ b/openerp/tools/translate.py @@ -329,6 +329,8 @@ class TinyPoFile(object): elif line.startswith('#,') and (line[2:].strip() == 'fuzzy'): fuzzy = True line = self.lines.pop(0).strip() + if not self.lines: + raise StopIteration() while not line: # allow empty lines between comments and msgid line = self.lines.pop(0).strip() |
