diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index edb44b623e8..bb2dca8b3b3 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -178,6 +178,7 @@ class account_invoice(osv.osv):
move[line.move_id.id] = True
for line in r.line_id:
move[line.move_id.id] = True
+
invoice_ids = []
if move:
invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context)
@@ -1127,14 +1128,14 @@ class account_invoice_tax(osv.osv):
if inv.type in ('out_invoice','in_invoice'):
val['base_code_id'] = tax['base_code_id']
val['tax_code_id'] = tax['tax_code_id']
- val['base_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['base'] * tax['base_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')})
- val['tax_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['amount'] * tax['tax_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')})
+ val['base_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['base'] * tax['base_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')}, round=False)
+ val['tax_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['amount'] * tax['tax_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')}, round=False)
val['account_id'] = tax['account_collected_id'] or line.account_id.id
else:
val['base_code_id'] = tax['ref_base_code_id']
val['tax_code_id'] = tax['ref_tax_code_id']
- val['base_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['base'] * tax['ref_base_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')})
- val['tax_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['amount'] * tax['ref_tax_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')})
+ val['base_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['base'] * tax['ref_base_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')}, round=False)
+ val['tax_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['amount'] * tax['ref_tax_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')}, round=False)
val['account_id'] = tax['account_paid_id'] or line.account_id.id
key = (val['tax_code_id'], val['base_code_id'], val['account_id'])
@@ -1148,6 +1149,8 @@ class account_invoice_tax(osv.osv):
for t in tax_grouped.values():
t['amount'] = cur_obj.round(cr, uid, cur, t['amount'])
+ t['base_amount'] = cur_obj.round(cr, uid, cur, t['base_amount'])
+ t['tax_amount'] = cur_obj.round(cr, uid, cur, t['tax_amount'])
return tax_grouped
def move_line_get(self, cr, uid, invoice_id):
diff --git a/addons/account/product_view.xml b/addons/account/product_view.xml
index cadf5d9c476..1000cef2156 100644
--- a/addons/account/product_view.xml
+++ b/addons/account/product_view.xml
@@ -11,8 +11,8 @@
-
-
+
+
@@ -33,8 +33,8 @@
-
-
+
+
@@ -53,8 +53,8 @@
diff --git a/addons/document/document.py b/addons/document/document.py
index 36d71c27a82..e86d90e4643 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -41,7 +41,7 @@ import tools
def random_name():
random.seed()
- d = [random.choice(string.letters) for x in xrange(10) ]
+ d = [random.choice(string.ascii_letters) for x in xrange(10) ]
name = "".join(d)
return name
diff --git a/addons/hr_timesheet/hr_timesheet_report.xml b/addons/hr_timesheet/hr_timesheet_report.xml
index eae167002a4..06dcd5d6d55 100644
--- a/addons/hr_timesheet/hr_timesheet_report.xml
+++ b/addons/hr_timesheet/hr_timesheet_report.xml
@@ -4,15 +4,15 @@
-
+
-
+
-
+
-
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml
index 794c38abc06..5063362bb1b 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml
@@ -20,7 +20,7 @@
menu="False"
model="account.analytic.line"
name="account.analytic.profit"
- string="Timesheet profit"
+ string="Timesheet Profit"
groups="account.group_account_manager"/>
diff --git a/addons/hr_timesheet_invoice/wizard/account_analytic_profit.py b/addons/hr_timesheet_invoice/wizard/account_analytic_profit.py
index ecf318d234f..9d1ac817baf 100644
--- a/addons/hr_timesheet_invoice/wizard/account_analytic_profit.py
+++ b/addons/hr_timesheet_invoice/wizard/account_analytic_profit.py
@@ -22,6 +22,7 @@
import wizard
import datetime
+import pooler
form='''
@@ -34,8 +34,8 @@
-
-
+
+
@@ -50,8 +50,8 @@
26
-
-
+
+
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index acb6c3b5fe7..9285143c69e 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -395,6 +395,10 @@ class stock_picking(osv.osv):
res[pick]['max_date'] = dt2
return res
+ def create(self, cr, user, vals, context=None):
+ if 'name' not in vals:
+ vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking')
+ return super(stock_picking, self).create(cr, user, vals, context)
_columns = {
'name': fields.char('Reference', size=64, select=True),
@@ -432,7 +436,7 @@ class stock_picking(osv.osv):
select=True, required=True, readonly=True, states={'draft':[('readonly',False)]}),
}
_defaults = {
- 'name': lambda self,cr,uid,context: self.pool.get('ir.sequence').get(cr, uid, 'stock.picking'),
+ 'name': lambda self,cr,uid,context: '/',
'active': lambda *a: 1,
'state': lambda *a: 'draft',
'move_type': lambda *a: 'direct',
@@ -673,7 +677,7 @@ class stock_picking(osv.osv):
else:
invoice_vals = {
'name': picking.name,
- 'origin': str(picking.name or '') + (picking.origin and (':' + picking.origin) or ''),
+ 'origin': (picking.name or '') + (picking.origin and (':' + picking.origin) or ''),
'type': type,
'account_id': account_id,
'partner_id': partner.id,