summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function
diff options
context:
space:
mode:
authoruco (OpenERP) <uco@tinyerp.co.in>2010-02-16 14:15:03 +0530
committeruco (OpenERP) <uco@tinyerp.co.in>2010-02-16 14:15:03 +0530
commit20c1f2fff1e858b207706f003a3b4b0befcbe9e0 (patch)
tree64756ec05ce16f0254915d05946487ee7036a982 /addons/analytic_user_function
parent06fae133f0edd382dad9450956ab5db1e40dc73b (diff)
parentb4cd54ad9e4baa5f58ea8464222dfeddc1da65d4 (diff)
[MERGE]
bzr revid: uco@tinyerp.co.in-20100216084503-k4jbdrp1x23f8awz
Diffstat (limited to 'addons/analytic_user_function')
-rw-r--r--addons/analytic_user_function/analytic_user_function.py14
-rw-r--r--addons/analytic_user_function/i18n/tr.po12
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..2a372335dc0 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-15 04:48+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