← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/trunk-dev-addons2-ysa into lp:~openerp-dev/openobject-addons/trunk-dev-addons2

 

Ysa(Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-dev-addons2-ysa into lp:~openerp-dev/openobject-addons/trunk-dev-addons2.

Requested reviews:
  OpenERP Core Team (openerp)


Remove role_id field in all workflow xml file.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-dev-addons2-ysa/+merge/37473
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-dev-addons2-ysa.
=== modified file 'account/report/invoice.rml'
--- account/report/invoice.rml	2010-09-22 06:07:25 +0000
+++ account/report/invoice.rml	2010-10-04 14:13:47 +0000
@@ -232,10 +232,10 @@
             <para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]][[ o.currency_id.symbol ]]</para>
           </td>
           <td>
-            <para style="terp_default_Right_9">[[ formatLang(l.discount) ]] </para>
+            <para style="terp_default_Right_9">[[ formatLang(l.discount, digits=get_digits(dp='Account')) ]] </para>
           </td>
           <td>
-            <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal) ]] [[ o.currency_id.symbol ]]</para>
+            <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
           </td>
         </tr>
         <tr>
@@ -294,7 +294,7 @@
           <para style="terp_default_9">Taxes:</para>
         </td>
         <td>
-          <para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]</para>
+          <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
         </td>
       </tr>
       <tr>
@@ -338,7 +338,7 @@
             <para style="terp_default_8">[[ t.name ]]</para>
           </td>
           <td>
-            <para style="terp_default_Right_8">[[ formatLang(t.base) ]] [[ o.currency_id.symbol ]]</para>
+            <para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
           </td>
           <td>
             <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]] [[ o.currency_id.symbol ]]</para>
@@ -373,4 +373,4 @@
       <font color="white"> </font>
     </para>
   </story>
-</document>
\ No newline at end of file
+</document>

=== modified file 'account/report/rml_parse.py'
--- account/report/rml_parse.py	2010-08-24 12:37:11 +0000
+++ account/report/rml_parse.py	2010-10-04 14:13:47 +0000
@@ -21,12 +21,10 @@
 
 from report import report_sxw
 import xml.dom.minidom
-import os, time
+import time
 import osv
 import re
-import tools
 import pooler
-import re
 import sys
 
 

=== modified file 'account_analytic_analysis/account_analytic_analysis.py'
--- account_analytic_analysis/account_analytic_analysis.py	2010-09-27 06:28:36 +0000
+++ account_analytic_analysis/account_analytic_analysis.py	2010-10-04 14:13:47 +0000
@@ -23,6 +23,8 @@
 from osv.orm import intersect
 import tools.sql
 from tools.translate import _
+from decimal_precision import decimal_precision as dp
+
 
 class account_analytic_account(osv.osv):
     _name = "account.analytic.account"
@@ -66,6 +68,8 @@
                                 and invoice_id is not null \
                             GROUP BY account_analytic_line.account_id;", (parent_ids,))
                     for account_id, sum in cr.fetchall():
+                        if account_id not in res:
+                            res[account_id] = {}
                         res[account_id][f] = sum
                 for account in accounts:
                     for child in account.child_ids:
@@ -102,6 +106,8 @@
                                 and account_analytic_journal.type in ('purchase','general') \
                             GROUP BY account_analytic_account.id;""", (parent_ids,))
                     for account_id, sum in cr.fetchall():
+                        if account_id not in res:
+                            res[account_id] = {}
                         res[account_id][f] = round(sum, dp)
 
                 for account in accounts:
@@ -142,6 +148,8 @@
                                 and invoice_id is null \
                             GROUP BY account_analytic_line.account_id" ,(parent_ids,))
                     for account_id, lwd in cr.fetchall():
+                        if account_id not in res:
+                            res[account_id] = {}
                         res[account_id][f] = lwd
                 for account in accounts:
                     for child in account.child_ids:
@@ -161,6 +169,8 @@
                                 AND to_invoice IS NOT NULL \
                             GROUP BY account_analytic_line.account_id;",(parent_ids,))
                     for account_id, sua in cr.fetchall():
+                        if account_id not in res:
+                            res[account_id] = {}
                         res[account_id][f] = round(sua, dp)
                 for account in accounts:
                     for child in account.child_ids:
@@ -181,10 +191,14 @@
                             GROUP BY account_analytic_line.account_id",(parent_ids,))
                     ff =  cr.fetchall()
                     for account_id, hq in ff:
+                        if account_id not in res:
+                            res[account_id] = {}
                         res[account_id][f] = round(hq, dp)
                 for account in accounts:
                     for child in account.child_ids:
                         if account.id != child.id:
+                            if account.id not in res:
+                                res[account.id] = {f: 0.0}
                             res[account.id][f] += res.get(child.id, {}).get(f, 0.0)
                 for id in ids:
                     res[id][f] = round(res[id][f], dp)
@@ -223,6 +237,8 @@
                     res2.setdefault(account.id, 0.0)
                     for child in account.child_ids:
                         if account.id != child.id:
+                            if account.id not in res:
+                                res[account.id] = {f: 0.0}
                             res[account.id][f] += res.get(child.id, {}).get(f, 0.0)
                             res[account.id][f] += res2.get(child.id, 0.0)
 
@@ -337,22 +353,47 @@
         return res
 
     _columns ={
-        'ca_invoiced': fields.function(_ca_invoiced_calc, method=True, type='float', string='Invoiced Amount', help="Total customer invoiced amount for this account."),
-        'total_cost': fields.function(_total_cost_calc, method=True, type='float', string='Total Costs', help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets."),
-        'ca_to_invoice': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Amount', help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs."),
-        'ca_theorical': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Theorical Revenue', help="Based on the costs you had on the project, what would have been the revenue if all these costs have been invoiced at the normal sale price provided by the pricelist."),
-        'hours_quantity': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Hours Tot', help="Number of hours you spent on the analytic account (from timesheet). It computes on all journal of type 'general'."),
-        'last_invoice_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Last Invoice Date', help="Date of the last invoice created for this analytic account."),
-        'last_worked_invoiced_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Invoiced Cost', help="If invoice from the costs, this is the date of the latest work or cost that have been invoiced."),
-        'last_worked_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Cost/Work', help="Date of the latest work done on this account."),
-        'hours_qtt_non_invoiced': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Hours', help="Number of hours (from journal of type 'general') that can be invoiced if you invoice based on analytic account."),
-        'hours_qtt_invoiced': fields.function(_hours_qtt_invoiced_calc, method=True, type='float', string='Invoiced Hours', help="Number of hours that can be invoiced plus those that already have been invoiced."),
-        'remaining_hours': fields.function(_remaining_hours_calc, method=True, type='float', string='Remaining Hours', help="Computed using the formula: Maximum Quantity - Hours Tot."),
-        'remaining_ca': fields.function(_remaining_ca_calc, method=True, type='float', string='Remaining Revenue', help="Computed using the formula: Max Invoice Price - Invoiced Amount."),
-        'revenue_per_hour': fields.function(_revenue_per_hour_calc, method=True, type='float', string='Revenue per Hours (real)', help="Computed using the formula: Invoiced Amount / Hours Tot."),
-        'real_margin': fields.function(_real_margin_calc, method=True, type='float', string='Real Margin', help="Computed using the formula: Invoiced Amount - Total Costs."),
-        'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theorical Margin', help="Computed using the formula: Theorial Revenue - Total Costs"),
-        'real_margin_rate': fields.function(_real_margin_rate_calc, method=True, type='float', string='Real Margin Rate (%)', help="Computes using the formula: (Real Margin / Total Costs) * 100."),
+        'ca_invoiced': fields.function(_ca_invoiced_calc, method=True, type='float', string='Invoiced Amount',
+            help="Total customer invoiced amount for this account.",
+            digits_compute=dp.get_precision('Account')),
+        'total_cost': fields.function(_total_cost_calc, method=True, type='float', string='Total Costs',
+            help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets.",
+            digits_compute=dp.get_precision('Account')),
+        'ca_to_invoice': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Amount',
+            help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs.",
+            digits_compute=dp.get_precision('Account')),
+        'ca_theorical': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Theorical Revenue',
+            help="Based on the costs you had on the project, what would have been the revenue if all these costs have been invoiced at the normal sale price provided by the pricelist.",
+            digits_compute=dp.get_precision('Account')),
+        'hours_quantity': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Hours Tot',
+            help="Number of hours you spent on the analytic account (from timesheet). It computes on all journal of type 'general'."),
+        'last_invoice_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Last Invoice Date',
+            help="Date of the last invoice created for this analytic account."),
+        'last_worked_invoiced_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Invoiced Cost',
+            help="If invoice from the costs, this is the date of the latest work or cost that have been invoiced."),
+        'last_worked_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Cost/Work',
+            help="Date of the latest work done on this account."),
+        'hours_qtt_non_invoiced': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Hours',
+            help="Number of hours (from journal of type 'general') that can be invoiced if you invoice based on analytic account."),
+        'hours_qtt_invoiced': fields.function(_hours_qtt_invoiced_calc, method=True, type='float', string='Invoiced Hours',
+            help="Number of hours that can be invoiced plus those that already have been invoiced."),
+        'remaining_hours': fields.function(_remaining_hours_calc, method=True, type='float', string='Remaining Hours',
+            help="Computed using the formula: Maximum Quantity - Hours Tot."),
+        'remaining_ca': fields.function(_remaining_ca_calc, method=True, type='float', string='Remaining Revenue',
+            help="Computed using the formula: Max Invoice Price - Invoiced Amount.",
+            digits_compute=dp.get_precision('Account')),
+        'revenue_per_hour': fields.function(_revenue_per_hour_calc, method=True, type='float', string='Revenue per Hours (real)',
+            help="Computed using the formula: Invoiced Amount / Hours Tot.",
+            digits_compute=dp.get_precision('Account')),
+        'real_margin': fields.function(_real_margin_calc, method=True, type='float', string='Real Margin',
+            help="Computed using the formula: Invoiced Amount - Total Costs.",
+            digits_compute=dp.get_precision('Account')),
+        'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theorical Margin',
+            help="Computed using the formula: Theorial Revenue - Total Costs",
+            digits_compute=dp.get_precision('Account')),
+        'real_margin_rate': fields.function(_real_margin_rate_calc, method=True, type='float', string='Real Margin Rate (%)',
+            help="Computes using the formula: (Real Margin / Total Costs) * 100.",
+            digits_compute=dp.get_precision('Account')),
         'month_ids': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'),
         'user_ids': fields.function(_analysis_all, method=True, multi='analytic_analysis', type="many2many", relation='account_analytic_analysis.summary.user', string='User'),
     }

=== modified file 'account_budget/crossovered_budget_workflow.xml'
--- account_budget/crossovered_budget_workflow.xml	2010-09-01 07:43:35 +0000
+++ account_budget/crossovered_budget_workflow.xml	2010-10-04 14:13:47 +0000
@@ -65,28 +65,24 @@
 		<field name="act_from" ref="act_confirm" />
 		<field name="act_to" ref="act_validate" />
 		<field name="signal">validate</field>
-		<field name="role_id" ref="crossovered_budget_role"/>
 	</record>
 
 	<record model="workflow.transition" id="t3">
 		<field name="act_from" ref="act_confirm" />
 		<field name="act_to" ref="act_cancel" />
 		<field name="signal">cancel</field>
-		<field name="role_id" ref="crossovered_budget_role"/>
 	</record>
 
 	<record model="workflow.transition" id="t4">
 		<field name="act_from" ref="act_validate" />
 		<field name="act_to" ref="act_cancel" />
 		<field name="signal">cancel</field>
-		<field name="role_id" ref="crossovered_budget_role"/>
 	</record>
 
 	<record model="workflow.transition" id="t5">
 		<field name="act_from" ref="act_validate" />
 		<field name="act_to" ref="act_done" />
 		<field name="signal">done</field>
-		<field name="role_id" ref="crossovered_budget_role"/>
 	</record>
 
 	<record model="workflow.transition" id="t6">

=== modified file 'account_invoice_layout/account_invoice_layout.py'
--- account_invoice_layout/account_invoice_layout.py	2010-08-19 11:51:57 +0000
+++ account_invoice_layout/account_invoice_layout.py	2010-10-04 14:13:47 +0000
@@ -130,19 +130,22 @@
         default['state'] = self.browse(cr, uid, id).state
         return super(account_invoice_line, self).copy_data(cr, uid, id, default, context)
 
-    def _fnct(self, cr, uid, id, name, args, context=None):
+    def _fnct(self, cr, uid, ids, name, args, context=None):
         res = {}
-        for m in self.browse(cr, uid, id):
-            if m.state != 'article':
-                if m.state == 'line':
-                    res[m.id] = '-----------------------------------------'
-                elif m.state == 'break':
-                    res[m.id] = 'PAGE BREAK'
+
+        lines = self.browse(cr, uid, ids)
+        account_ids = [line.account_id.id for line in lines]
+        account_names = dict(self.pool.get('account.account').name_get(cr, uid, account_ids, context=context))
+        for line in lines:
+            if line.state != 'article':
+                if line.state == 'line':
+                    res[line.id] = '-----------------------------------------'
+                elif line.state == 'break':
+                    res[line.id] = 'PAGE BREAK'
                 else:
-                    res[m.id] = ' '
+                    res[line.id] = ' '
             else:
-                [(temp)] = self.pool.get('account.account').name_get(cr, uid, [m.account_id.id], context=context)
-                res[m.id] = temp[1]
+                res[line.id] = account_names.get(line.account_id.id, '')
         return res
 
     _name = "account.invoice.line"
@@ -205,4 +208,4 @@
 
 account_invoice()
 
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'account_invoice_layout/report/report_account_invoice_layout.py'
--- account_invoice_layout/report/report_account_invoice_layout.py	2010-09-09 11:13:50 +0000
+++ account_invoice_layout/report/report_account_invoice_layout.py	2010-10-04 14:13:47 +0000
@@ -23,6 +23,7 @@
 
 from report import report_sxw
 
+
 class account_invoice_1(report_sxw.rml_parse):
     def __init__(self, cr, uid, name, context):
         super(account_invoice_1, self).__init__(cr, uid, name, context=context)
@@ -33,112 +34,111 @@
         self.context = context
         self._node = None
 
-    def invoice_lines(self,invoice):
-        result =[]
-        sub_total={}
-        info=[]
-        invoice_list=[]
-        res={}
-        list_in_seq={}
+    def invoice_lines(self, invoice):
+        result = []
+        sub_total = {}
+        info = []
+        invoice_list = []
+        res = {}
+        list_in_seq = {}
         ids = self.pool.get('account.invoice.line').search(self.cr, self.uid, [('invoice_id', '=', invoice.id)])
         ids.sort()
-        for id in range(0,len(ids)):
+        for id in range(0, len(ids)):
             info = self.pool.get('account.invoice.line').browse(self.cr, self.uid, ids[id], self.context.copy())
-            list_in_seq[info]=info.sequence
-        i=1
-        j=0
+            list_in_seq[info] = info.sequence
+        i = 1
+        j = 0
         final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1]))
-        invoice_list=[x[0] for x in final]
-        sum_flag={}
-        sum_flag[j]=-1
+        invoice_list = [x[0] for x in final]
+        sum_flag = {}
+        sum_flag[j] = -1
         for entry in invoice_list:
-            res={}
-            if entry.state=='article':
+            res = {}
+            if entry.state == 'article':
                 self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%s', (entry.id,))
-                tax_ids=self.cr.fetchall()
-                if tax_ids==[]:
-                    res['tax_types']=''
+                tax_ids = self.cr.fetchall()
+                if tax_ids == []:
+                    res['tax_types'] = ''
                 else:
-                    tax_names_dict={}
-                    for item in range(0,len(tax_ids))    :
+                    tax_names_dict = {}
+                    for item in range(0, len(tax_ids)):
                         self.cr.execute('select name from account_tax where id=%s', (tax_ids[item][0],))
-                        type=self.cr.fetchone()
-                        tax_names_dict[item] =type[0]
-                    tax_names = ','.join([tax_names_dict[x] for x in range(0,len(tax_names_dict))])
-                    res['tax_types']=tax_names
-                res['name']=entry.name
-                res['quantity']="%.2f"%(entry.quantity)
-                res['price_unit']="%.2f"%(entry.price_unit)
-                res['discount']="%.2f"%(entry.discount)
-                res['price_subtotal']="%.2f"%(entry.price_subtotal)
-                sub_total[i]=entry.price_subtotal
-                i=i+1
-                res['note']=entry.note
-                res['currency']=invoice.currency_id.symbol
-                res['type']=entry.state
+                        type = self.cr.fetchone()
+                        tax_names_dict[item] = type[0]
+                    tax_names = ','.join([tax_names_dict[x] for x in range(0, len(tax_names_dict))])
+                    res['tax_types'] = tax_names
+                res['name'] = entry.name
+                res['quantity'] = self.formatLang(entry.quantity, digits=self.get_digits(dp='Account'))
+                res['price_unit'] = self.formatLang(entry.price_unit, digits=self.get_digits(dp='Account'))
+                res['discount'] = self.formatLang(entry.discount, digits=self.get_digits(dp='Account'))
+                res['price_subtotal'] = self.formatLang(entry.price_subtotal, digits=self.get_digits(dp='Account'))
+                sub_total[i] = entry.price_subtotal
+                i = i + 1
+                res['note'] = entry.note
+                res['currency'] = invoice.currency_id.symbol
+                res['type'] = entry.state
 
-                if entry.uos_id.id==False:
-                    res['uos']=''
+                if entry.uos_id.id == False:
+                    res['uos'] = ''
                 else:
                     uos_name = self.pool.get('product.uom').read(self.cr, self.uid, entry.uos_id.id, ['name'], self.context.copy())
                     res['uos'] = uos_name['name']
             else:
-
-                res['quantity']=''
-                res['price_unit']=''
-                res['discount']=''
-                res['tax_types']=''
-                res['type']=entry.state
-                res['note']=entry.note
-                res['uos']=''
-
-                if entry.state=='subtotal':
-                    res['name']=entry.name
-                    sum=0
-                    sum_id=0
-                    if sum_flag[j]==-1:
-                        temp=1
+                res['quantity'] = ''
+                res['price_unit'] = ''
+                res['discount'] = ''
+                res['tax_types'] = ''
+                res['type'] = entry.state
+                res['note'] = entry.note
+                res['uos'] = ''
+
+                if entry.state == 'subtotal':
+                    res['name'] = entry.name
+                    sum = 0
+                    sum_id = 0
+                    if sum_flag[j] == -1:
+                        temp = 1
                     else:
-                        temp=sum_flag[j]
-
-                    for sum_id in range(temp,len(sub_total)+1):
-                        sum+=sub_total[sum_id]
-                    sum_flag[j+1]= sum_id +1
-
-                    j=j+1
-                    res['price_subtotal']="%.2f"%(sum)
-                    res['currency']=invoice.currency_id.symbol
-                    res['quantity']=''
-                    res['price_unit']=''
-                    res['discount']=''
-                    res['tax_types']=''
-                    res['uos']=''
-                elif entry.state=='title':
-                    res['name']=entry.name
-                    res['price_subtotal']=''
-                    res['currency']=''
-                elif entry.state=='text':
-                    res['name']=entry.name
-                    res['price_subtotal']=''
-                    res['currency']=''
-                elif entry.state=='line':
-                    res['quantity']='_______________'
-                    res['price_unit']='______________'
-                    res['discount']='____________'
-                    res['tax_types']='____________________'
-                    res['uos']='_____'
-                    res['name']='_______________________________________________'
-                    res['price_subtotal']='____________'
-                    res['currency']='____'
-                elif entry.state=='break':
-                    res['type']=entry.state
-                    res['name']=entry.name
-                    res['price_subtotal']=''
-                    res['currency']=''
+                        temp = sum_flag[j]
+
+                    for sum_id in range(temp, len(sub_total)+1):
+                        sum += sub_total[sum_id]
+                    sum_flag[j+1] = sum_id +1
+
+                    j = j + 1
+                    res['price_subtotal'] = "%.2f" % (sum)
+                    res['currency'] = invoice.currency_id.symbol
+                    res['quantity'] = ''
+                    res['price_unit'] = ''
+                    res['discount'] = ''
+                    res['tax_types'] = ''
+                    res['uos'] = ''
+                elif entry.state == 'title':
+                    res['name'] = entry.name
+                    res['price_subtotal'] = ''
+                    res['currency'] = ''
+                elif entry.state == 'text':
+                    res['name'] = entry.name
+                    res['price_subtotal'] = ''
+                    res['currency'] = ''
+                elif entry.state == 'line':
+                    res['quantity'] = '_______________'
+                    res['price_unit'] = '______________'
+                    res['discount'] = '____________'
+                    res['tax_types'] = '____________________'
+                    res['uos'] = '_____'
+                    res['name'] = '_______________________________________________'
+                    res['price_subtotal'] = '____________'
+                    res['currency'] = '____'
+                elif entry.state == 'break':
+                    res['type'] = entry.state
+                    res['name'] = entry.name
+                    res['price_subtotal'] = ''
+                    res['currency'] = ''
                 else:
-                    res['name']=entry.name
-                    res['price_subtotal']=''
-                    res['currency']=invoice.currency_id.symbol
+                    res['name'] = entry.name
+                    res['price_subtotal'] = ''
+                    res['currency'] = invoice.currency_id.symbol
 
             result.append(res)
         return result

=== modified file 'account_invoice_layout/report/report_account_invoice_layout.rml'
--- account_invoice_layout/report/report_account_invoice_layout.rml	2010-09-27 19:15:52 +0000
+++ account_invoice_layout/report/report_account_invoice_layout.rml	2010-10-04 14:13:47 +0000
@@ -376,7 +376,7 @@
           <para style="terp_default_9">Net Total:</para>
         </td>
         <td>
-          <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]]</para>
+          <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
         </td>
       </tr>
     </blockTable>
@@ -391,7 +391,7 @@
           <para style="terp_default_9">Taxes:</para>
         </td>
         <td>
-          <para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]</para>
+          <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
         </td>
       </tr>
     </blockTable>
@@ -406,7 +406,7 @@
           <para style="terp_default_Bold_9">Total:</para>
         </td>
         <td>
-          <para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]]</para>
+          <para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
         </td>
       </tr>
     </blockTable>
@@ -445,10 +445,10 @@
             <para style="terp_default_8">[[ t.name ]]</para>
           </td>
           <td>
-            <para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para>
+            <para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Account')) ]]</para>
           </td>
           <td>
-            <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]</para>
+            <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]]</para>
           </td>
           <td>
             <para style="terp_default_Right_8">
@@ -485,4 +485,4 @@
       <font color="white"> </font>
     </para>
   </story>
-</document>
\ No newline at end of file
+</document>

=== modified file 'account_invoice_layout/report/special_message_invoice.py'
--- account_invoice_layout/report/special_message_invoice.py	2010-09-09 11:13:50 +0000
+++ account_invoice_layout/report/special_message_invoice.py	2010-10-04 14:13:47 +0000
@@ -24,6 +24,7 @@
 from report import report_sxw
 import pooler
 
+
 class account_invoice_with_message(report_sxw.rml_parse):
     def __init__(self, cr, uid, name, context):
         super(account_invoice_with_message, self).__init__(cr, uid, name, context=context)
@@ -40,115 +41,113 @@
         msg = account_msg_data.msg
         return msg
 
-
-    def invoice_lines(self,invoice):
-        result =[]
-        sub_total={}
-        info=[]
-        invoice_list=[]
-        res={}
-        list_in_seq={}
+    def invoice_lines(self, invoice):
+        result = []
+        sub_total = {}
+        info = []
+        invoice_list = []
+        res = {}
+        list_in_seq = {}
         ids = self.pool.get('account.invoice.line').search(self.cr, self.uid, [('invoice_id', '=', invoice.id)])
         ids.sort()
-        for id in range(0,len(ids)):
-            info = self.pool.get('account.invoice.line').browse(self.cr, self.uid,ids[id], self.context.copy())
-            list_in_seq[info]=info.sequence
-        i=1
-        j=0
-        final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1]))
-        invoice_list=[x[0] for x in final]
-        sum_flag={}
-        sum_flag[j]=-1
+        for id in range(0, len(ids)):
+            info = self.pool.get('account.invoice.line').browse(self.cr, self.uid, ids[id], self.context.copy())
+            list_in_seq[info] = info.sequence
+        i = 1
+        j = 0
+        final = sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1]))
+        invoice_list = [x[0] for x in final]
+        sum_flag = {}
+        sum_flag[j] = -1
         for entry in invoice_list:
-            res={}
+            res = {}
 
-            if entry.state=='article':
+            if entry.state == 'article':
                 self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%s', (entry.id,))
-                tax_ids=self.cr.fetchall()
+                tax_ids = self.cr.fetchall()
 
-                if tax_ids==[]:
-                    res['tax_types']=''
+                if tax_ids == []:
+                    res['tax_types'] = ''
                 else:
-                    tax_names_dict={}
-                    for item in range(0,len(tax_ids))    :
+                    tax_names_dict = {}
+                    for item in range(0, len(tax_ids)):
                         self.cr.execute('select name from account_tax where id=%s', (tax_ids[item][0],))
-                        type=self.cr.fetchone()
-                        tax_names_dict[item] =type[0]
-                    tax_names = ','.join([tax_names_dict[x] for x in range(0,len(tax_names_dict))])
-                    res['tax_types']=tax_names
-                res['name']=entry.name
-                res['quantity']="%.2f"%(entry.quantity)
-                res['price_unit']="%.2f"%(entry.price_unit)
-                res['discount']="%.2f"%(entry.discount)
-                res['price_subtotal']="%.2f"%(entry.price_subtotal)
-                sub_total[i]=entry.price_subtotal
-                i=i+1
-                res['note']=entry.note
-                res['currency']=invoice.currency_id.symbol
-                res['type']=entry.state
+                        type = self.cr.fetchone()
+                        tax_names_dict[item] = type[0]
+                    tax_names = ','.join([tax_names_dict[x] for x in range(0, len(tax_names_dict))])
+                    res['tax_types'] = tax_names
+                res['name'] = entry.name
+                res['quantity'] = self.formatLang(entry.quantity, digits=self.get_digits(dp='Account'))
+                res['price_unit'] = self.formatLang(entry.price_unit, digits=self.get_digits(dp='Account'))
+                res['discount'] = self.formatLang(entry.discount, digits=self.get_digits(dp='Account'))
+                res['price_subtotal'] = self.formatLang(entry.price_subtotal, digits=self.get_digits(dp='Account'))
+                sub_total[i] = entry.price_subtotal
+                i = i + 1
+                res['note'] = entry.note
+                res['currency'] = invoice.currency_id.symbol
+                res['type'] = entry.state
 
-                if entry.uos_id.id==False:
-                    res['uos']=''
+                if entry.uos_id.id == False:
+                    res['uos'] = ''
                 else:
                     uos_name = self.pool.get('product.uom').read(self.cr, self.uid, entry.uos_id.id, ['name'], self.context.copy())
-                    res['uos']=uos_name['name']
+                    res['uos'] = uos_name['name']
             else:
-
-                res['quantity']=''
-                res['price_unit']=''
-                res['discount']=''
-                res['tax_types']=''
-                res['type']=entry.state
-                res['note']=entry.note
-                res['uos']=''
-
-                if entry.state=='subtotal':
-                    res['name']=entry.name
-                    sum=0
-                    sum_id=0
-                    if sum_flag[j]==-1:
-                        temp=1
+                res['quantity'] = ''
+                res['price_unit'] = ''
+                res['discount'] = ''
+                res['tax_types'] = ''
+                res['type'] = entry.state
+                res['note'] = entry.note
+                res['uos'] = ''
+
+                if entry.state == 'subtotal':
+                    res['name'] = entry.name
+                    sum = 0
+                    sum_id = 0
+                    if sum_flag[j] == -1:
+                        temp = 1
                     else:
-                        temp=sum_flag[j]
-
-                    for sum_id in range(temp,len(sub_total)+1):
-                        sum+=sub_total[sum_id]
-                    sum_flag[j+1]= sum_id +1
-
-                    j=j+1
-                    res['price_subtotal']="%.2f"%(sum)
-                    res['currency']=invoice.currency_id.symbol
-                    res['quantity']=''
-                    res['price_unit']=''
-                    res['discount']=''
-                    res['tax_types']=''
-                    res['uos']=''
-                elif entry.state=='title':
-                    res['name']=entry.name
-                    res['price_subtotal']=''
-                    res['currency']=''
-                elif entry.state=='text':
-                    res['name']=entry.name
-                    res['price_subtotal']=''
-                    res['currency']=''
-                elif entry.state=='line':
-                    res['quantity']='_______________'
-                    res['price_unit']='______________'
-                    res['discount']='____________'
-                    res['tax_types']='____________________'
-                    res['uos']='_____'
-                    res['name']='_______________________________________________'
-                    res['price_subtotal']='____________'
-                    res['currency']='____'
-                elif entry.state=='break':
-                    res['type']=entry.state
-                    res['name']=entry.name
-                    res['price_subtotal']=''
-                    res['currency']=''
+                        temp = sum_flag[j]
+
+                    for sum_id in range(temp, len(sub_total)+1):
+                        sum += sub_total[sum_id]
+                    sum_flag[j+1] = sum_id +1
+
+                    j = j + 1
+                    res['price_subtotal'] = "%.2f" % (sum)
+                    res['currency'] = invoice.currency_id.symbol
+                    res['quantity'] = ''
+                    res['price_unit'] = ''
+                    res['discount'] = ''
+                    res['tax_types'] = ''
+                    res['uos'] = ''
+                elif entry.state == 'title':
+                    res['name'] = entry.name
+                    res['price_subtotal'] = ''
+                    res['currency'] = ''
+                elif entry.state == 'text':
+                    res['name'] = entry.name
+                    res['price_subtotal'] = ''
+                    res['currency'] = ''
+                elif entry.state == 'line':
+                    res['quantity'] = '_______________'
+                    res['price_unit'] = '______________'
+                    res['discount'] = '____________'
+                    res['tax_types'] = '____________________'
+                    res['uos'] = '_____'
+                    res['name'] = '_______________________________________________'
+                    res['price_subtotal'] = '____________'
+                    res['currency'] = '____'
+                elif entry.state == 'break':
+                    res['type'] = entry.state
+                    res['name'] = entry.name
+                    res['price_subtotal'] = ''
+                    res['currency'] = ''
                 else:
-                    res['name']=entry.name
-                    res['price_subtotal']=''
-                    res['currency']=invoice.currency_id.symbol
+                    res['name'] = entry.name
+                    res['price_subtotal'] = ''
+                    res['currency'] = invoice.currency_id.symbol
 
             result.append(res)
         return result

=== modified file 'account_invoice_layout/report/special_message_invoice.rml'
--- account_invoice_layout/report/special_message_invoice.rml	2010-09-21 05:46:45 +0000
+++ account_invoice_layout/report/special_message_invoice.rml	2010-10-04 14:13:47 +0000
@@ -380,7 +380,7 @@
           <para style="terp_default_9">Net Total:</para>
         </td>
         <td>
-          <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]]</para>
+          <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
         </td>
       </tr>
     </blockTable>
@@ -395,7 +395,7 @@
           <para style="terp_default_9">Taxes:</para>
         </td>
         <td>
-          <para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]</para>
+          <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
         </td>
       </tr>
     </blockTable>
@@ -410,7 +410,7 @@
           <para style="terp_default_Bold_9">Total:</para>
         </td>
         <td>
-          <para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]]</para>
+          <para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
         </td>
       </tr>
     </blockTable>
@@ -449,10 +449,10 @@
             <para style="terp_default_8">[[ t.name ]]</para>
           </td>
           <td>
-            <para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para>
+            <para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Account')) ]]</para>
           </td>
           <td>
-            <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]</para>
+            <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]]</para>
           </td>
           <td>
             <para style="terp_default_Right_8">
@@ -500,4 +500,4 @@
       <font color="white"> </font>
     </para>
   </story>
-</document>
\ No newline at end of file
+</document>

=== modified file 'account_payment/account_payment_demo.xml'
--- account_payment/account_payment_demo.xml	2010-09-24 10:12:04 +0000
+++ account_payment/account_payment_demo.xml	2010-10-04 14:13:47 +0000
@@ -6,6 +6,7 @@
             <field name="acc_number">00987654321</field>
             <field name="partner_id" ref="base.res_partner_agrolait"></field>
             <field name="state">bank</field>
+            <field name="bank" ref="base.res_bank_1"/>
         </record>
     	<record id="payment_mode_1" model="payment.mode">
             <field name="name">Direct Payment</field>

=== modified file 'account_payment/test/account_payment.yml'
--- account_payment/test/account_payment.yml	2010-09-06 03:38:01 +0000
+++ account_payment/test/account_payment.yml	2010-10-04 14:13:47 +0000
@@ -9,6 +9,7 @@
     partner_id: base.res_partner_9
     sequence: 0.0
     state: bank
+    bank: base.res_bank_1
 
 -
   I created a new Payment Mode

=== modified file 'analytic/analytic.py'
--- analytic/analytic.py	2010-09-27 12:38:06 +0000
+++ analytic/analytic.py	2010-10-04 14:13:47 +0000
@@ -25,6 +25,7 @@
 from osv import fields, osv
 import decimal_precision as dp
 
+
 class account_analytic_account(osv.osv):
     _name = 'account.analytic.account'
     _description = 'Analytic Account'
@@ -272,7 +273,7 @@
     _columns = {
         'name' : fields.char('Description', size=256, required=True),
         'date' : fields.date('Date', required=True, select=1),
-        'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.'),
+        'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
         'unit_amount' : fields.float('Quantity', help='Specifies the amount of quantity to count.'),
         'account_id' : fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True),
         'user_id' : fields.many2one('res.users', 'User'),

=== modified file 'base_calendar/base_calendar.py'
=== modified file 'base_iban/base_iban_data.xml'
--- base_iban/base_iban_data.xml	2008-09-10 17:56:00 +0000
+++ base_iban/base_iban_data.xml	2010-10-04 14:13:47 +0000
@@ -8,6 +8,7 @@
         <record id="bank_iban" model="res.partner.bank.type">
             <field name="name">IBAN Account</field>
             <field name="code">iban</field>
+            <field name="bank" ref="base.res_bank_1"/>
         </record>
         <record id="bank_iban_field" model="res.partner.bank.type.field">
             <field name="name">iban</field>

=== modified file 'caldav/calendar.py'
--- caldav/calendar.py	2010-10-01 09:26:28 +0000
+++ caldav/calendar.py	2010-10-04 14:13:47 +0000
@@ -716,7 +716,7 @@
         """
 
         cr.execute("SELECT COUNT(id) FROM basic_calendar_lines \
-                                WHERE name='%s' AND calendar_id=%s", 
+                                WHERE name=%s AND calendar_id=%s", 
                                 (vals.get('name'), vals.get('calendar_id')))
         res = cr.fetchone()
         if res:

=== modified file 'email_template/email_template_workflow.xml'
--- email_template/email_template_workflow.xml	2010-06-12 16:21:54 +0000
+++ email_template/email_template_workflow.xml	2010-10-04 14:13:47 +0000
@@ -47,26 +47,22 @@
             <field name="act_from" ref="act_draft"/>
             <field name="act_to" ref="act_approved"/>
             <field name="signal">button_approval</field>
-            <field name="role_id" ref="PE_ADMIN"/>
         </record>
 
         <record id="trans_approved_suspended" model="workflow.transition">
             <field name="act_from" ref="act_approved"/>
             <field name="act_to" ref="act_suspended"/>
             <field name="signal">button_suspended</field>
-            <field name="role_id" ref="PE_ADMIN"/>
         </record>
         <record id="trans_suspended_reapproved" model="workflow.transition">
             <field name="act_from" ref="act_suspended"/>
             <field name="act_to" ref="act_draft"/>
             <field name="signal">get_reapprove</field>
-            <field name="role_id" ref="PE_ADMIN"/>
         </record>
         <record id="trans_suspended_dummy" model="workflow.transition">
             <field name="act_from" ref="act_suspended"/>
             <field name="act_to" ref="act_dummy"/>
             <field name="signal">get_never</field>
-            <field name="role_id" ref="PE_ADMIN"/>
         </record>
     </data>
 </openerp>

=== modified file 'event/event.py'
--- event/event.py	2010-08-17 07:04:50 +0000
+++ event/event.py	2010-10-04 14:13:47 +0000
@@ -28,6 +28,7 @@
 import tools
 import decimal_precision as dp
 
+
 class event_type(osv.osv):
     """ Event Type """
     _name = 'event.type'
@@ -225,7 +226,7 @@
         'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="The invoices of this event registration will be created with this Product. Thus it allows you to set the default label and the accounting info you want by default on these invoices."),
         'note': fields.text('Notes', help="Description or Summary of Event", readonly=False, states={'done': [('readonly', True)]}),
         'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', readonly=True, states={'draft': [('readonly', False)]}, help="Pricelist version for current event."),
-        'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify for each registration a specific amount if you want to"),
+        'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify for each registration a specific amount if you want to", digits_compute=dp.get_precision('Sale Price')),
         'main_speaker_id': fields.many2one('res.partner','Main Speaker', readonly=False, states={'done': [('readonly', True)]}, help="Speaker who are giving speech on event."),
         'speaker_ids':fields.many2many('res.partner', 'event_speaker_rel', 'speaker_id', 'partner_id', 'Other Speakers', readonly=False, states={'done': [('readonly', True)]}),
         'address_id': fields.many2one('res.partner.address','Location Address', readonly=False, states={'done': [('readonly', True)]}),
@@ -306,8 +307,8 @@
         'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}),
         "partner_invoice_id": fields.many2one('res.partner', 'Partner Invoiced', readonly=True, states={'draft': [('readonly', False)]}),
         "contact_id": fields.many2one('res.partner.contact', 'Partner Contact', readonly=False, states={'done': [('readonly', True)]}), #TODO: filter only the contacts that have a function into the selected partner_id
-        "unit_price": fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Event Price'), readonly=True, states={'draft': [('readonly', False)]}),
-        'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal', digits_compute= dp.get_precision('Event Price')),
+        "unit_price": fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}),
+        'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal', digits_compute=dp.get_precision('Sale Price')),
         "badge_ids": fields.one2many('event.registration.badge', 'registration_id', 'Badges', readonly=False, states={'done': [('readonly', True)]}),
         "event_product": fields.char("Invoice Name", size=128, readonly=True, states={'draft': [('readonly', False)]}),
         "tobe_invoiced": fields.boolean("To be Invoiced", readonly=True, states={'draft': [('readonly', False)]}),

=== modified file 'event/wizard/partner_event_registration.py'
--- event/wizard/partner_event_registration.py	2010-07-16 06:47:14 +0000
+++ event/wizard/partner_event_registration.py	2010-10-04 14:13:47 +0000
@@ -24,6 +24,7 @@
 import tools
 from osv import fields, osv
 from tools.translate import _
+from decimal_precision import decimal_precision as dp
 
 
 class partner_event_registration(osv.osv_memory):
@@ -36,7 +37,7 @@
     _columns = {
         'event_id': fields.many2one('event.event', 'Event'),
         'event_type': fields.many2one('event.type', 'Type', readonly=True),
-        'unit_price': fields.float('Registration Cost'),
+        'unit_price': fields.float('Registration Cost', digits_compute=dp.get_precision('Sale Price')),
         'start_date': fields.datetime('Start date', required=True, help="Beginning Date of Event", readonly=True),
         'end_date': fields.datetime('Closing date', required=True, help="Closing Date of Event", readonly=True),
         'nb_register': fields.integer('Number of Registration'),

=== modified file 'hr_expense/hr_expense_workflow.xml'
--- hr_expense/hr_expense_workflow.xml	2010-08-19 11:51:57 +0000
+++ hr_expense/hr_expense_workflow.xml	2010-10-04 14:13:47 +0000
@@ -75,14 +75,12 @@
             <field name="act_from" ref="act_confirm"/>
             <field name="act_to" ref="act_accepted"/>
             <field name="signal">validate</field>
-            <field name="role_id" ref="HR"/>
         </record>
 
         <record id="t4" model="workflow.transition">
             <field name="act_from" ref="act_confirm"/>
             <field name="act_to" ref="act_refused"/>
             <field name="signal">refuse</field>
-            <field name="role_id" ref="HR"/>
         </record>
 
         <record id="t5" model="workflow.transition">
@@ -95,21 +93,18 @@
             <field name="act_from" ref="act_accepted"/>
             <field name="act_to" ref="act_refused"/>
             <field name="signal">refuse</field>
-            <field name="role_id" ref="HR"/>
         </record>
 
         <record id="t7" model="workflow.transition">
             <field name="act_from" ref="act_confirm"/>
             <field name="act_to" ref="act_draft"/>
             <field name="signal">draft</field>
-            <field name="role_id" ref="HR"/>
         </record>
 
         <record id="t8" model="workflow.transition">
             <field name="act_from" ref="act_accepted"/>
             <field name="act_to" ref="act_invoice"/>
             <field name="signal">invoice</field>
-            <field name="role_id" ref="HR_INV"/>
         </record>
 
         <record id="t9" model="workflow.transition">
@@ -128,7 +123,6 @@
             <field name="act_from" ref="act_refused"/>
             <field name="act_to" ref="act_draft"/>
             <field name="signal">draft</field>
-            <field name="role_id" ref="HR"/>
         </record>
 
     </data>

=== modified file 'hr_holidays/hr_holidays_workflow.xml'
--- hr_holidays/hr_holidays_workflow.xml	2010-08-19 11:51:57 +0000
+++ hr_holidays/hr_holidays_workflow.xml	2010-10-04 14:13:47 +0000
@@ -77,28 +77,24 @@
         <field name="act_to" ref="act_validate" />
         <field name="signal">validate</field>
         <field name="condition">(holiday_status_id.double_validation == False)</field>
-        <field name="role_id" ref="HR_holidays"/>
     </record>
 
     <record model="workflow.transition" id="t3">
         <field name="act_from" ref="act_confirm" />
         <field name="act_to" ref="act_refuse" />
         <field name="signal">refuse</field>
-        <field name="role_id" ref="HR_holidays"/>
     </record>
 
     <record model="workflow.transition" id="t4">
         <field name="act_from" ref="act_validate" />
         <field name="act_to" ref="act_cancel" />
         <field name="signal">cancel</field>
-        <field name="role_id" ref="HR_holidays"/>
     </record>
 
     <record model="workflow.transition" id="t5">
         <field name="act_from" ref="act_refuse" />
         <field name="act_to" ref="act_cancel" />
         <field name="signal">cancel</field>
-        <field name="role_id" ref="HR_holidays"/>
     </record>
 
     <record model="workflow.transition" id="t7">
@@ -124,7 +120,6 @@
         <field name="act_to" ref="act_validate1" />
         <field name="condition">(holiday_status_id.double_validation == True)</field>
         <field name="signal">validate</field>
-        <field name="role_id" ref="HR_holidays"/>
     </record>
 
 </data>

=== modified file 'hr_payroll/test/payslip.yml'
--- hr_payroll/test/payslip.yml	2010-09-15 05:32:58 +0000
+++ hr_payroll/test/payslip.yml	2010-10-04 14:13:47 +0000
@@ -9,6 +9,7 @@
     sequence: 0.0
     name: Fortis
     state: bank
+    bank: base.res_bank_1
 -
   I create a new employee “Richard”
 -

=== modified file 'hr_timesheet_invoice/report/report_analytic.py'
--- hr_timesheet_invoice/report/report_analytic.py	2010-03-12 12:42:47 +0000
+++ hr_timesheet_invoice/report/report_analytic.py	2010-10-04 14:13:47 +0000
@@ -21,6 +21,8 @@
 
 from osv import fields,osv
 import tools
+from decimal_precision import decimal_precision as dp
+
 
 class report_analytic_account_close(osv.osv):
     _name = "report.analytic.account.close"
@@ -70,8 +72,8 @@
         'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
         'product_uom_id':fields.many2one('product.uom', 'UoM', readonly=True),
         'unit_amount': fields.float('Units', readonly=True),
-        'sale_price': fields.float('Sale price', readonly=True),
-        'amount': fields.float('Amount', readonly=True),
+        'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Sale Price')),
+        'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')),
         'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
                                   ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
     }

=== modified file 'hr_timesheet_sheet/hr_timesheet_workflow.xml'
--- hr_timesheet_sheet/hr_timesheet_workflow.xml	2008-09-10 17:56:00 +0000
+++ hr_timesheet_sheet/hr_timesheet_workflow.xml	2010-10-04 14:13:47 +0000
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
     <data>
-        
+
         <!-- Roles definition -->
-        
+
         <record id="HR" model="res.roles">
             <field name="name">Timesheets validation</field>
         </record>
-        
+
         <!-- Workflow definition -->
-        
+
         <record id="wkf_timesheet" model="workflow">
             <field name="name">hr_timesheet_sheet.sheet</field>
             <field name="osv">hr_timesheet_sheet.sheet</field>
             <field name="on_create">True</field>
         </record>
-        
+
         <record id="act_new" model="workflow.activity">
             <field name="wkf_id" ref="wkf_timesheet"/>
             <field name="name">new</field>
@@ -42,7 +42,7 @@
             <field name="action">write({'state':'done'})</field>
             <field name="flow_stop">True</field>
         </record>
-        
+
         <record id="t0" model="workflow.transition">
             <field name="act_from" ref="act_new"/>
             <field name="act_to" ref="act_draft"/>
@@ -56,13 +56,11 @@
             <field name="act_from" ref="act_confirm"/>
             <field name="act_to" ref="act_done"/>
             <field name="signal">done</field>
-            <field name="role_id" ref="HR"/>
         </record>
         <record id="t3" model="workflow.transition">
             <field name="act_from" ref="act_confirm"/>
             <field name="act_to" ref="act_draft"/>
             <field name="signal">cancel</field>
-            <field name="role_id" ref="HR"/>
         </record>
     </data>
 </openerp>

=== modified file 'hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml'
--- hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml	2010-06-14 11:49:17 +0000
+++ hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml	2010-10-04 14:13:47 +0000
@@ -1,21 +1,21 @@
 <?xml version="1.0" ?>
 <openerp>
     <data>
-        
-        <!-- 
+
+        <!--
             Process
         -->
-        
+
         <record id="process_process_hrtimesheetprocess0" model="process.process">
             <field eval="1" name="active"/>
             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
             <field eval="&quot;&quot;&quot;Hr Timesheet&quot;&quot;&quot;" name="name"/>
         </record>
-        
-        <!-- 
+
+        <!--
             Process Node
         -->
-    
+
         <record id="process_node_attendance0" model="process.node">
             <field name="model_id" ref="hr.model_hr_employee"/>
             <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
@@ -24,7 +24,7 @@
             <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
             <field eval="1" name="flow_start"/>
         </record>
-    
+
         <record id="process_node_timesheet0" model="process.node">
             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
@@ -35,7 +35,7 @@
             <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
             <field eval="0" name="flow_start"/>
         </record>
-    
+
         <record id="process_node_drafttimesheetsheet0" model="process.node">
             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
@@ -46,7 +46,7 @@
             <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
             <field eval="0" name="flow_start"/>
         </record>
-    
+
         <record id="process_node_confirmedtimesheet0" model="process.node">
             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
@@ -68,7 +68,7 @@
             <field eval="&quot;&quot;&quot;object.state=='done'&quot;&quot;&quot;" name="model_states"/>
             <field eval="0" name="flow_start"/>
         </record>
-    
+
         <record id="process_node_invoiceonwork0" model="process.node">
             <field name="menu_id" ref="account.menu_finance_receivables"/>
             <field name="model_id" ref="account.model_account_invoice"/>
@@ -91,19 +91,15 @@
             <field eval="&quot;&quot;&quot;object.state in ('open', pending', 'done', 'cancelled')&quot;&quot;&quot;" name="model_states"/>
             <field eval="1" name="flow_start"/>
         </record>
-        
-        <!-- 
+
+        <!--
             Process Transition
         -->
-        
+
         <record id="res_roles_hr0" model="res.roles">
             <field eval="&quot;&quot;&quot;HR&quot;&quot;&quot;" name="name"/>
         </record>
-        
-        <record id="hr_timesheet_sheet.t1" model="workflow.transition">
-            <field name="role_id" ref="res_roles_hr0"/>
-        </record>
-    
+
         <record id="process_transition_attendancetimesheet0" model="process.transition">
             <field eval="[(6,0,[])]" name="role_ids"/>
             <field eval="[(6,0,[])]" name="transition_ids"/>
@@ -112,7 +108,7 @@
             <field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
             <field model="process.node" name="source_node_id" ref="process_node_attendance0"/>
         </record>
-    
+
         <record id="process_transition_timesheetdraft0" model="process.transition">
             <field eval="[(6,0,[])]" name="role_ids"/>
             <field eval="[(6,0,[])]" name="transition_ids"/>
@@ -121,7 +117,7 @@
             <field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
             <field model="process.node" name="source_node_id" ref="process_node_timesheet0"/>
         </record>
-    
+
         <record id="process_transition_confirmtimesheet0" model="process.transition">
             <field eval="[(6,0,[])]" name="role_ids"/>
             <field eval="[(6,0,[])]" name="transition_ids"/>
@@ -131,7 +127,7 @@
             <field model="process.node" name="source_node_id" ref="process_node_drafttimesheetsheet0"/>
             <field eval="[(6,0,[ref('hr_timesheet_sheet.t1')])]" name="transition_ids"/>
         </record>
-    
+
         <record id="process_transition_validatetimesheet0" model="process.transition">
             <field eval="[(6,0,[])]" name="role_ids"/>
             <field eval="[(6,0,[])]" name="transition_ids"/>
@@ -140,7 +136,7 @@
             <field model="process.node" name="target_node_id" ref="process_node_validatedtimesheet0"/>
             <field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
         </record>
-    
+
         <record id="process_transition_invoiceontimesheet0" model="process.transition">
             <field eval="[(6,0,[])]" name="role_ids"/>
             <field eval="[(6,0,[])]" name="transition_ids"/>
@@ -149,7 +145,7 @@
             <field model="process.node" name="target_node_id" ref="process_node_invoiceonwork0"/>
             <field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
         </record>
-        
+
         <record id="process_transition_tasktimesheet0" model="process.transition">
             <field eval="[(6,0,[])]" name="role_ids"/>
             <field eval="[(6,0,[])]" name="transition_ids"/>
@@ -157,32 +153,32 @@
             <field eval="&quot;&quot;&quot;Moves task entry into the timesheet line&quot;&quot;&quot;" name="note"/>
             <field model="process.node" name="target_node_id" ref="process_node_timesheet0"/>
             <field model="process.node" name="source_node_id" ref="process_node_workontask0"/>
-         </record>        
-        
-        <!-- 
+         </record>
+
+        <!--
             Process Action
         -->
-        
+
         <record id="process_transition_action_draftconfirmtimesheet0" model="process.transition.action">
             <field eval="&quot;&quot;&quot;button_confirm&quot;&quot;&quot;" name="action"/>
             <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
             <field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
             <field name="transition_id" ref="process_transition_confirmtimesheet0"/>
         </record>
-        
+
         <record id="process_transition_action_validatetimesheet0" model="process.transition.action">
             <field eval="&quot;&quot;&quot;write({'state':'done'})&quot;&quot;&quot;" name="action"/>
             <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
             <field eval="&quot;&quot;&quot;Validate&quot;&quot;&quot;" name="name"/>
             <field name="transition_id" ref="process_transition_validatetimesheet0"/>
         </record>
-        
+
         <record id="process_transition_action_refusetimesheet0" model="process.transition.action">
             <field eval="&quot;&quot;&quot;write({'state':'draft'})&quot;&quot;&quot;" name="action"/>
             <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
             <field eval="&quot;&quot;&quot;Refuse&quot;&quot;&quot;" name="name"/>
             <field name="transition_id" ref="process_transition_validatetimesheet0"/>
         </record>
-        
+
     </data>
 </openerp>

=== modified file 'marketing_campaign/report/campaign_analysis_view.xml'
--- marketing_campaign/report/campaign_analysis_view.xml	2010-09-13 00:43:29 +0000
+++ marketing_campaign/report/campaign_analysis_view.xml	2010-10-04 14:13:47 +0000
@@ -84,8 +84,8 @@
         <field name="search_view_id" ref="view_campaign_analysis_search"/>
     </record>
 
-    <menuitem name="Reporting" id="base.menu_report_association" parent="base.marketing_menu"/>
-    <menuitem action="action_campaign_analysis_all" id="menu_action_campaign_analysis_all" parent="base.menu_report_association" sequence="2"/>
+    <menuitem name="Reporting" id="base.menu_report_marketing" parent="base.marketing_menu"/>
+    <menuitem action="action_campaign_analysis_all" id="menu_action_campaign_analysis_all" parent="base.menu_report_marketing" sequence="2"/>
 
     </data>
 </openerp>

=== modified file 'mrp_repair/mrp_repair.py'
--- mrp_repair/mrp_repair.py	2010-09-29 08:05:01 +0000
+++ mrp_repair/mrp_repair.py	2010-10-04 14:13:47 +0000
@@ -687,8 +687,9 @@
         if type == 'add':
             stock_id = self.pool.get('stock.location').search(cr, uid, [('name','=','Stock')])[0]
             to_invoice = False
-            if guarantee_limit and date.today() > datetime.strptime(guarantee_limit, '%Y-%m-%d'):
+            if guarantee_limit and datetime.strptime(date.today().strftime('%Y-%m-%d'), '%Y-%m-%d') > datetime.strptime(guarantee_limit, '%Y-%m-%d'):
                 to_invoice=True
+
             return {'value': {
                         'to_invoice': to_invoice,
                         'location_id': stock_id,

=== modified file 'mrp_repair/report/order.py'
--- mrp_repair/report/order.py	2010-09-27 08:28:04 +0000
+++ mrp_repair/report/order.py	2010-10-04 14:13:47 +0000
@@ -33,9 +33,9 @@
     def total(self, repair):
         total = 0.0
         for operation in repair.operations:
-           total+=operation.price_subtotal
+           total += operation.price_subtotal
         for fee in repair.fees_lines:
-           total+=fee.price_subtotal
+           total += fee.price_subtotal
         total = total + repair.amount_tax
         return total
 

=== modified file 'mrp_repair/report/order.rml'
--- mrp_repair/report/order.rml	2010-09-21 14:08:11 +0000
+++ mrp_repair/report/order.rml	2010-10-04 14:13:47 +0000
@@ -343,7 +343,7 @@
           <para style="terp_default_9">Net Total :</para>
         </td>
         <td>
-          <para style="P26">[[ formatLang(o.amount_untaxed)]] [[ o.pricelist_id.currency_id. symbol ]]</para>
+          <para style="P26">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Sale Price'))]] [[ o.pricelist_id.currency_id. symbol ]]</para>
         </td>
 
       </tr>
@@ -357,7 +357,7 @@
           <para style="terp_default_9">Taxes:</para>
         </td>
         <td>
-          <para style="P26">[[ formatLang(o.amount_tax)]] [[ o.pricelist_id.currency_id. symbol ]]</para>
+          <para style="P26">[[ formatLang(o.amount_tax, digits=get_digits(dp='Account'))]] [[ o.pricelist_id.currency_id. symbol ]]</para>
         </td>
       </tr>
       <tr>
@@ -370,7 +370,7 @@
           <para style="terp_tblheader_Details">Total :</para>
         </td>
         <td>
-          <para style="terp_default_right_bold_9">[[ formatLang(total(o)) ]] [[ o.pricelist_id.currency_id. symbol ]]</para>
+          <para style="terp_default_right_bold_9">[[ formatLang(total(o), digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id. symbol ]]</para>
         </td>
       </tr>
     </blockTable>
@@ -391,4 +391,4 @@
       <font color="white"> </font>
     </para>
   </story>
-</document>
\ No newline at end of file
+</document>

=== modified file 'product/pricelist.py'
--- product/pricelist.py	2010-09-29 09:57:42 +0000
+++ product/pricelist.py	2010-10-04 14:13:47 +0000
@@ -222,7 +222,7 @@
                             price = 0.0
                         else:
                             price_tmp = self.price_get(cr, uid,
-                                    [res['base_pricelist_id']], prod_id,
+                                    [res['base_pricelist_id']], product_id,
                                     qty)[res['base_pricelist_id']]
                             ptype_src = self.browse(cr, uid, res['base_pricelist_id']).currency_id.id
                             price = currency_obj.compute(cr, uid, ptype_src, res['currency_id'], price_tmp, round=False)
@@ -388,7 +388,7 @@
                                 price = 0.0
                             else:
                                 price_tmp = self.price_get(cr, uid,
-                                        [res['base_pricelist_id']], prod_id,
+                                        [res['base_pricelist_id']], product_id,
                                         qty)[res['base_pricelist_id']]
                                 ptype_src = self.browse(cr, uid, res['base_pricelist_id']).currency_id.id
                                 price = currency_obj.compute(cr, uid, ptype_src, res['currency_id'], price_tmp, round=False)

=== modified file 'project_timesheet/project_timesheet.py'
--- project_timesheet/project_timesheet.py	2010-09-27 13:47:19 +0000
+++ project_timesheet/project_timesheet.py	2010-10-04 14:13:47 +0000
@@ -112,6 +112,7 @@
         timesheet_obj = self.pool.get('hr.analytic.timesheet')
         project_obj = self.pool.get('project.project')
         uom_obj = self.pool.get('product.uom')
+        result = {}
         
         if isinstance(ids, (long, int)):
             ids = [ids,]
@@ -139,7 +140,7 @@
                 vals_line['unit_amount'] = vals['hours']
                 prod_id = vals_line.get('product_id', line_id.product_id.id) # False may be set
 
-                if result['product_uom_id'] and (not result['product_uom_id'] == default_uom):
+                if result.get('product_uom_id',False) and (not result['product_uom_id'] == default_uom):
                     vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id'])
                     
                 # Compute based on pricetype

=== modified file 'report_intrastat/report/invoice.rml'
--- report_intrastat/report/invoice.rml	2010-08-27 11:44:38 +0000
+++ report_intrastat/report/invoice.rml	2010-10-04 14:13:47 +0000
@@ -488,7 +488,7 @@
     <blockTable colWidths="530.0" style="Table_Main_Table">
       <tr>
         <td>
-          <para style="terp_default_8">[[ format(o.amount_tax or removeParentNode('blockTable')) ]]</para>
+          <para style="terp_default_8">[[ o.amount_tax and formatLang(o.amount_tax, digits=get_digits(dp='Account')) or removeParentNode('blockTable') ]]</para>
           <blockTable colWidths="54.0,58.0,67.0" style="Table_Tax_Header">
             <tr>
               <td>
@@ -516,10 +516,10 @@
                 <para style="terp_default_Centre_8">[[ t.name ]]</para>
               </td>
               <td>
-                <para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para>
+                <para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Account')) ]]</para>
               </td>
               <td>
-                <para style="terp_default_Right_8">[[ formatLang(t.amount) or 0.00 ]]</para>
+                <para style="terp_default_Right_8">[[ formatLang(t.amount, digits=get_digits(dp='Account')) ]]</para>
               </td>
             </tr>
           </blockTable>

=== modified file 'report_intrastat/report_intrastat.py'
--- report_intrastat/report_intrastat.py	2010-08-16 14:50:25 +0000
+++ report_intrastat/report_intrastat.py	2010-10-04 14:13:47 +0000
@@ -21,6 +21,7 @@
 
 from osv import osv, fields
 from tools.sql import drop_view_if_exists
+from decimal_precision import decimal_precision as dp
 
 
 class res_country(osv.osv):
@@ -69,7 +70,7 @@
         'code': fields.char('Country code', size=2, readonly=True),
         'intrastat_id': fields.many2one('report.intrastat.code', 'Intrastat code', readonly=True),
         'weight': fields.float('Weight', readonly=True),
-        'value': fields.float('Value', readonly=True),
+        'value': fields.float('Value', readonly=True, digits_compute=dp.get_precision('Account')),
         'type': fields.selection([('import', 'Import'), ('export', 'Export')], 'Type'),
         'currency_id': fields.many2one('res.currency', "Currency", readonly=True),
     }

=== modified file 'sale/process/sale_process.xml'
--- sale/process/sale_process.xml	2010-08-17 06:27:57 +0000
+++ sale/process/sale_process.xml	2010-10-04 14:13:47 +0000
@@ -138,14 +138,6 @@
             <field eval="&quot;&quot;&quot;Salesman&quot;&quot;&quot;" name="name"/>
         </record>
 
-        <record id="sale.trans_draft_router" model="workflow.transition">
-            <field name="role_id" ref="res_roles_salesman0"/>
-        </record>
-
-        <record id="sale.trans_wait_invoice_invoice_manual" model="workflow.transition">
-            <field name="role_id" ref="res_roles_salesman0"/>
-        </record>
-
         <record id="process_transition_confirmquotation0" model="process.transition">
             <field eval="[(6,0,[])]" name="transition_ids"/>
             <field eval="&quot;&quot;&quot;Confirm Quotation&quot;&quot;&quot;" name="name"/>

=== modified file 'sale_journal/report/picking_journal_report.py'
--- sale_journal/report/picking_journal_report.py	2010-08-09 12:32:34 +0000
+++ sale_journal/report/picking_journal_report.py	2010-10-04 14:13:47 +0000
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
-#    
+#
 #    OpenERP, Open Source Management Solution
 #    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
 #
@@ -15,12 +15,14 @@
 #    GNU Affero General Public License for more details.
 #
 #    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
 
 from osv import fields, osv
 import tools
+from decimal_precision import decimal_precision as dp
+
 
 class sale_journal_picking_report(osv.osv):
     """
@@ -30,32 +32,32 @@
     _description = "Picking lists"
     _auto = False
     _columns = {
-        'name': fields.char('Year', size=64, required=False, readonly=True), 
-        'month': fields.selection([('01', 'January'), ('02', 'February'), ('03', 'March'), ('04', 'April'), ('05', 'May'), ('06', 'June'), 
-                          ('07', 'July'), ('08', 'August'), ('09', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')], 'Month', readonly=True), 
+        'name': fields.char('Year', size=64, required=False, readonly=True),
+        'month': fields.selection([('01', 'January'), ('02', 'February'), ('03', 'March'), ('04', 'April'), ('05', 'May'), ('06', 'June'),
+                          ('07', 'July'), ('08', 'August'), ('09', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')], 'Month', readonly=True),
 
         'invoice_state':fields.selection([
-            ("invoiced", "invoiced"), 
-            ("2binvoiced", "to be invoiced"), 
+            ("invoiced", "invoiced"),
+            ("2binvoiced", "to be invoiced"),
             ("none", "None")
-        ], "Invoice state", readonly=True), 
+        ], "Invoice state", readonly=True),
         'state': fields.selection([
-            ('draft', 'draft'), 
-            ('auto', 'waiting'), 
-            ('confirmed', 'confirmed'), 
-            ('assigned', 'assigned'), 
-            ('done', 'done'), 
-            ('cancel', 'cancel'), 
-        ], 'State', readonly=True), 
-        'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoicing method', readonly=True), 
-        'journal_id': fields.many2one('sale_journal.picking.journal', 'Journal', readonly=True), 
-        'quantity': fields.float('Quantities', readonly=True), 
-        'price_total': fields.float('Total Price', readonly=True), 
-        'price_average': fields.float('Average Price', readonly=True), 
-        'count': fields.integer('# of Lines', readonly=True), 
+            ('draft', 'draft'),
+            ('auto', 'waiting'),
+            ('confirmed', 'confirmed'),
+            ('assigned', 'assigned'),
+            ('done', 'done'),
+            ('cancel', 'cancel'),
+        ], 'State', readonly=True),
+        'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoicing method', readonly=True),
+        'journal_id': fields.many2one('sale_journal.picking.journal', 'Journal', readonly=True),
+        'quantity': fields.float('Quantities', readonly=True),
+        'price_total': fields.float('Total Price', readonly=True, digits_compute=dp.get_precision('Sale Price')),
+        'price_average': fields.float('Average Price', readonly=True, digits_compute=dp.get_precision('Sale Price')),
+        'count': fields.integer('# of Lines', readonly=True),
     }
     _order = 'journal_id, name desc, price_total desc'
-    
+
     def init(self, cr):
         tools.drop_view_if_exists(cr, 'sale_journal_picking_report')
 
@@ -80,7 +82,7 @@
                 order by s.invoice_type_id, s.invoice_state, s.state
                 )
         """)
-        
+
 sale_journal_picking_report()
 
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'stock/product.py'
--- stock/product.py	2010-09-08 12:25:15 +0000
+++ stock/product.py	2010-10-04 14:13:47 +0000
@@ -318,7 +318,7 @@
         'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to specify a Production Lot for all moves containing this product and going to a Customer Location"),
         'location_id': fields.dummy(string='Stock Location', relation='stock.location', type='many2one'),
         'valuation':fields.selection([('manual_periodic', 'Periodic (manual)'),
-                                        ('real_time','Real Time (automatized)'),], 'Stock Valuation', help="Decide if the system must automatically creates account moves based on stock moves", required=True),
+                                        ('real_time','Real Time (automatized)'),], 'Stock Valuation', help="Decide if the system must automatically create account moves based on stock moves", required=True),
     }
 
     _defaults = {

=== modified file 'stock/report/lot_overview.rml'
--- stock/report/lot_overview.rml	2010-09-08 11:02:26 +0000
+++ stock/report/lot_overview.rml	2010-10-04 14:13:47 +0000
@@ -167,10 +167,10 @@
                 <para style="terp_default_Right_9">[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]</para>
               </td>
               <td>
-                <para style="terp_default_Right_9">[[ formatLang(p['price']) ]]</para>
+                <para style="terp_default_Right_9">[[ formatLang(p['price'], digits=get_digits(dp='Account')) ]]</para>
               </td>
               <td>
-                <para style="terp_default_Right_9">[[ formatLang(p['price_value']) ]] [[ o.company_id.currency_id.symbol]]</para>
+                <para style="terp_default_Right_9">[[ formatLang(p['price_value'], digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol]]</para>
               </td>
             </tr>
           </blockTable>
@@ -184,7 +184,7 @@
               <para style="terp_default_Bold_9">Total:</para>
             </td>
             <td>
-              <para style="terp_tblheader_Details_Right">[[ formatLang(price_total()) ]] [[ o.company_id.currency_id.symbol ]]</para>
+              <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]]</para>
             </td>
           </tr>
         </blockTable>
@@ -201,7 +201,7 @@
           </para>
         </td>
         <td>
-          <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price()) ]] [[ o.company_id.currency_id.symbol ]]</para>
+          <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]]</para>
         </td>
       </tr>
     </blockTable>
@@ -209,4 +209,4 @@
       <font color="white"> </font>
     </para>
   </story>
-</document>
\ No newline at end of file
+</document>

=== modified file 'stock/report/lot_overview_all.rml'
--- stock/report/lot_overview_all.rml	2010-09-08 11:11:59 +0000
+++ stock/report/lot_overview_all.rml	2010-10-04 14:13:47 +0000
@@ -167,10 +167,10 @@
                 <para style="terp_default_Right_9">[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]</para>
               </td>
               <td>
-                <para style="terp_default_Right_9">[[ formatLang(p['price']) ]]</para>
+                <para style="terp_default_Right_9">[[ formatLang(p['price'], digits=get_digits(dp='Account')) ]]</para>
               </td>
               <td>
-                <para style="terp_default_Right_9">[[ formatLang(p['price_value']) ]] [[ o.company_id.currency_id.symbol]]</para>
+                <para style="terp_default_Right_9">[[ formatLang(p['price_value'], digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol]]</para>
               </td>
             </tr>
           </blockTable>
@@ -184,7 +184,7 @@
               <para style="terp_default_Bold_9">Total:</para>
             </td>
             <td>
-              <para style="terp_tblheader_Details_Right">[[ formatLang(price_total()) ]] [[ o.company_id.currency_id.symbol ]]</para>
+              <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]]</para>
             </td>
           </tr>
         </blockTable>
@@ -201,7 +201,7 @@
           </para>
         </td>
         <td>
-          <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price()) ]] [[ o.company_id.currency_id.symbol ]]</para>
+          <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]]</para>
         </td>
       </tr>
     </blockTable>
@@ -209,4 +209,4 @@
       <font color="white"> </font>
     </para>
   </story>
-</document>
\ No newline at end of file
+</document>

=== modified file 'stock/report/report_stock_move.py'
--- stock/report/report_stock_move.py	2010-09-17 12:49:50 +0000
+++ stock/report/report_stock_move.py	2010-10-04 14:13:47 +0000
@@ -21,6 +21,7 @@
 
 import tools
 from osv import fields,osv
+from decimal_precision import decimal_precision as dp
 
 
 class report_stock_move(osv.osv):
@@ -44,7 +45,7 @@
         'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True),
         'product_qty_in':fields.integer('In Qty',readonly=True),
         'product_qty_out':fields.integer('Out Qty',readonly=True),
-        'value' : fields.float('Total Value', required=True),
+        'value' : fields.float('Total Value', required=True, digits_compute=dp.get_precision('Sale Price')),
         'day_diff2':fields.float('Delay (Days)',readonly=True, digits=(16,2), group_operator="avg"),
         'day_diff1':fields.float('Planned (Days)',readonly=True, digits=(16,2), group_operator="avg"),
         'day_diff':fields.float('Real (Days)',readonly=True, digits=(16,2), group_operator="avg"),
@@ -136,7 +137,7 @@
         'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True),
         'company_id': fields.many2one('res.company', 'Company', readonly=True),
         'product_qty':fields.float('Qty', digits=(16,2), readonly=True),
-        'value' : fields.float('Total Value', digits=(16,2), required=True),
+        'value' : fields.float('Total Value', digits=(16,2), required=True, digits_compute=dp.get_precision('Sale Price')),
         'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True,
               help='When the stock move is created it is in the \'Draft\' state.\n After that it is set to \'Confirmed\' state.\n If stock is available state is set to \'Avaiable\'.\n When the picking it done the state is \'Done\'.\
               \nThe state is \'Waiting\' if the move is waiting for another one.'),

=== modified file 'stock/stock.py'
--- stock/stock.py	2010-09-28 09:24:45 +0000
+++ stock/stock.py	2010-10-04 14:13:47 +0000
@@ -110,7 +110,6 @@
         @param field_names: Name of field
         @return: Dictionary of values
         """
-        result = dict([(i, {}.fromkeys(field_names, 0.0)) for i in ids])
 
         product_product_obj = self.pool.get('product.product')
 
@@ -118,6 +117,9 @@
         res_products_by_location = sorted(cr.dictfetchall(), key=itemgetter('location_id'))
         products_by_location = dict((k, [v['product_id'] for v in itr]) for k, itr in groupby(res_products_by_location, itemgetter('location_id')))
 
+        result = dict([(i, {}.fromkeys(field_names, 0.0)) for i in ids])
+        result.update(dict([(i, {}.fromkeys(field_names, 0.0)) for i in list(set([aaa['location_id'] for aaa in res_products_by_location]))]))
+
         currency_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.currency_id.id
         currency_obj = self.pool.get('res.currency')
         currency = self.pool.get('res.currency').browse(cr, uid, currency_id)
@@ -129,6 +131,8 @@
             for prod in product_product_obj.browse(cr, uid, product_ids, context=c):
                 for f in field_names:
                     if f == 'stock_real':
+                        if loc_id not in result:
+                            result[loc_id] = {}
                         result[loc_id][f] += prod.qty_available
                     elif f == 'stock_virtual':
                         result[loc_id][f] += prod.virtual_available


Follow ups