diff options
| author | nch@tinyerp.com <> | 2010-02-19 14:39:30 +0530 |
|---|---|---|
| committer | nch@tinyerp.com <> | 2010-02-19 14:39:30 +0530 |
| commit | f95456b07309908b02db49109670a158caefc0b7 (patch) | |
| tree | 2570abd04d6fe7dfccc07e5c7f78a4c9ba80c953 /addons/analytic_user_function | |
| parent | 53b12ce0303b35162b0a127e906b73bde6b90989 (diff) | |
| parent | 9ab741c91df2d1c014097620be82aad69e972add (diff) | |
[MERGE]
bzr revid: nch@tinyerp.com-20100219090930-18c6wvhhq1z7tg97
Diffstat (limited to 'addons/analytic_user_function')
| -rw-r--r-- | addons/analytic_user_function/analytic_user_function.py | 14 | ||||
| -rw-r--r-- | addons/analytic_user_function/i18n/tr.po | 12 |
2 files changed, 16 insertions, 10 deletions
diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index 852d0750a42..c5c2af729a0 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -99,8 +99,11 @@ class hr_analytic_timesheet(osv.osv): _('There is no expense account define ' \ 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) - amount = unit_amount * self.pool.get('product.uom')._compute_price(cr, uid, - r.product_id.uom_id.id, r.product_id.standard_price, False) + # Compute based on pricetype + amount_unit=self.on_change_unit_amount(cr, uid, ids, + r.product_id.id, unit_amount, r.product_id.uom_id.id)['value']['amount'] + + amount = unit_amount * amount_unit res ['value']['amount']= - round(amount, 2) res ['value']['general_account_id']= a return res @@ -132,8 +135,11 @@ class hr_analytic_timesheet(osv.osv): _('There is no expense account define ' \ 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) - amount = unit_amount * r.product_id.uom_id._compute_price(cr, uid, - r.product_id.uom_id.id, r.product_id.standard_price, False) + # Compute based on pricetype + amount_unit=self.on_change_unit_amount(cr, uid, ids, + r.product_id.id, unit_amount, r.product_id.uom_id.id)['value']['amount'] + + amount = unit_amount * amount_unit res ['value']['amount']= - round(amount, 2) res ['value']['general_account_id']= a return res diff --git a/addons/analytic_user_function/i18n/tr.po b/addons/analytic_user_function/i18n/tr.po index f8b37ba2ee4..fe31f743087 100644 --- a/addons/analytic_user_function/i18n/tr.po +++ b/addons/analytic_user_function/i18n/tr.po @@ -1,19 +1,19 @@ # Translation of OpenERP Server. # This file contains the translation of the following modules: -# * analytic_user_function +# * analytic_user_function # msgid "" msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2009-02-03 09:18+0000\n" +"PO-Revision-Date: 2010-02-14 21:31+0000\n" "Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2009-12-16 05:25+0000\n" +"X-Launchpad-Export-Date: 2010-02-17 04:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: analytic_user_function @@ -29,12 +29,12 @@ msgstr "" #. module: analytic_user_function #: field:analytic_user_funct_grid,product_id:0 msgid "Product" -msgstr "" +msgstr "Ürün" #. module: analytic_user_function #: field:analytic_user_funct_grid,account_id:0 msgid "Analytic Account" -msgstr "" +msgstr "Analiz Hesabı" #. module: analytic_user_function #: view:account.analytic.account:0 @@ -45,7 +45,7 @@ msgstr "" #. module: analytic_user_function #: field:analytic_user_funct_grid,user_id:0 msgid "User" -msgstr "" +msgstr "Kullanıcı" #. module: analytic_user_function #: constraint:ir.model:0 |
