\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-10-03 04:57+0000\n"
+"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
@@ -570,7 +570,7 @@ msgstr ""
#. module: sale
#: wizard_view:sale.advance_payment_inv,create:0
msgid "Invoices"
-msgstr ""
+msgstr "Hóa đơn"
#. module: sale
#: view:sale.order:0
@@ -595,7 +595,7 @@ msgstr ""
#. module: sale
#: field:sale.order.line,product_packaging:0
msgid "Packaging"
-msgstr ""
+msgstr "Đóng gói"
#. module: sale
#: model:ir.module.module,shortdesc:sale.module_meta_information
From 47593a3fc0d77123e20c4d48e37aa10321fa0f7a Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 09:26:51 +0200
Subject: [PATCH 19/89] [IMP] account: 'invoice' report now uses
decimal.precision
bzr revid: olt@tinyerp.com-20101004072651-f0rl5hrk47a7nbb7
---
addons/account/report/invoice.rml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml
index 6c3c6fc01c3..173cbd1e6c4 100644
--- a/addons/account/report/invoice.rml
+++ b/addons/account/report/invoice.rml
@@ -232,10 +232,10 @@
[[ formatLang(l.price_unit) ]][[ o.currency_id.symbol ]]
|
- [[ formatLang(l.discount) ]]
+ [[ formatLang(l.discount, digits=get_digits(dp='Account')) ]]
|
- [[ formatLang(l.price_subtotal) ]] [[ o.currency_id.symbol ]]
+ [[ formatLang(l.price_subtotal, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
@@ -294,7 +294,7 @@
Taxes:
|
- [[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
@@ -338,7 +338,7 @@
[[ t.name ]]
|
- [[ formatLang(t.base) ]] [[ o.currency_id.symbol ]]
+ [[ formatLang(t.base, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]] [[ o.currency_id.symbol ]]
@@ -373,4 +373,4 @@
-
\ No newline at end of file
+
From 3752cffff4958a1d5dd7bb72d2493ef2b37d8238 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 09:27:25 +0200
Subject: [PATCH 20/89] [IMP] report_intrastat: 'invoice' report now uses
decimal.precision
bzr revid: olt@tinyerp.com-20101004072725-girgktjguibvee8q
---
addons/report_intrastat/report/invoice.rml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml
index 8e4f92da708..08a1ab14fe0 100644
--- a/addons/report_intrastat/report/invoice.rml
+++ b/addons/report_intrastat/report/invoice.rml
@@ -488,7 +488,7 @@
- [[ format(o.amount_tax or removeParentNode('blockTable')) ]]
+ [[ o.amount_tax and formatLang(o.amount_tax, digits=get_digits(dp='Account')) or removeParentNode('blockTable') ]]
|
@@ -516,10 +516,10 @@
[[ t.name ]]
|
- [[ formatLang(t.base) ]]
+ [[ formatLang(t.base, digits=get_digits(dp='Account')) ]]
|
- [[ formatLang(t.amount) or 0.00 ]]
+ [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]]
|
From ec3f4d65988a005f257b8091e7eaadb9ed3393a6 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 09:58:27 +0200
Subject: [PATCH 21/89] [IMP] pep8 (before improvement)
bzr revid: olt@tinyerp.com-20101004075827-x3yr8cwrx0decxxz
---
.../report/special_message_invoice.py | 180 +++++++++---------
1 file changed, 90 insertions(+), 90 deletions(-)
diff --git a/addons/account_invoice_layout/report/special_message_invoice.py b/addons/account_invoice_layout/report/special_message_invoice.py
index 7051483828b..db027469373 100644
--- a/addons/account_invoice_layout/report/special_message_invoice.py
+++ b/addons/account_invoice_layout/report/special_message_invoice.py
@@ -24,6 +24,7 @@ import time
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,114 @@ class account_invoice_with_message(report_sxw.rml_parse):
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
+ 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
+ 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'] = "%.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
- 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']=''
+ 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
+ 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]
+ 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
+ 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']=''
+ 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
From 11e2c3201bc0628d9919243c75ff36665b899389 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 10:02:40 +0200
Subject: [PATCH 22/89] [IMP] account_invoice_layout: 'invoices with layout and
message' report now uses decimal.precision
bzr revid: olt@tinyerp.com-20101004080240-1wwa956apwdyi6uh
---
.../report/special_message_invoice.py | 11 +++++------
.../report/special_message_invoice.rml | 12 ++++++------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/addons/account_invoice_layout/report/special_message_invoice.py b/addons/account_invoice_layout/report/special_message_invoice.py
index db027469373..bac4a467ae1 100644
--- a/addons/account_invoice_layout/report/special_message_invoice.py
+++ b/addons/account_invoice_layout/report/special_message_invoice.py
@@ -55,7 +55,7 @@ class account_invoice_with_message(report_sxw.rml_parse):
list_in_seq[info] = info.sequence
i = 1
j = 0
- final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1]))
+ 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
@@ -77,10 +77,10 @@ class account_invoice_with_message(report_sxw.rml_parse):
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)
+ 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
@@ -93,7 +93,6 @@ class account_invoice_with_message(report_sxw.rml_parse):
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'] = ''
diff --git a/addons/account_invoice_layout/report/special_message_invoice.rml b/addons/account_invoice_layout/report/special_message_invoice.rml
index 41775417161..8bea44a67f7 100644
--- a/addons/account_invoice_layout/report/special_message_invoice.rml
+++ b/addons/account_invoice_layout/report/special_message_invoice.rml
@@ -380,7 +380,7 @@
Net Total:
|
- [[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]]
+ [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
@@ -395,7 +395,7 @@
Taxes:
|
- [[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
@@ -410,7 +410,7 @@
Total:
- [[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]]
+ [[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
@@ -449,10 +449,10 @@
[[ t.name ]]
- [[ formatLang(t.base) ]]
+ [[ formatLang(t.base, digits=get_digits(dp='Account')) ]]
|
- [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]
+ [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]]
|
@@ -500,4 +500,4 @@
-
\ No newline at end of file
+
From 2b09325d6584fc62223b97503aad26937710179c Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 10:07:21 +0200
Subject: [PATCH 23/89] [IMP] pep8 (before improvement)
bzr revid: olt@tinyerp.com-20101004080721-5c0zuemdsg0pzjit
---
.../report/report_account_invoice_layout.py | 176 +++++++++---------
1 file changed, 88 insertions(+), 88 deletions(-)
diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.py b/addons/account_invoice_layout/report/report_account_invoice_layout.py
index e28d98479b1..f7cae7a91c5 100644
--- a/addons/account_invoice_layout/report/report_account_invoice_layout.py
+++ b/addons/account_invoice_layout/report/report_account_invoice_layout.py
@@ -23,6 +23,7 @@ import time
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 @@ class account_invoice_1(report_sxw.rml_parse):
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'] = "%.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
- 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'] = ''
- 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
+ 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]
+ 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
+ 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']=''
+ 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
From 957c82182818ec1c7cfebbe11abc42624ea3d1bd Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 10:10:52 +0200
Subject: [PATCH 24/89] [IMP] account_invoice_layout: 'invoices wihh layout'
report now uses decimal.precision
bzr revid: olt@tinyerp.com-20101004081052-l12jti4h22ss3yez
---
.../report/report_account_invoice_layout.py | 8 ++++----
.../report/report_account_invoice_layout.rml | 12 ++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.py b/addons/account_invoice_layout/report/report_account_invoice_layout.py
index f7cae7a91c5..f61a05fd5f4 100644
--- a/addons/account_invoice_layout/report/report_account_invoice_layout.py
+++ b/addons/account_invoice_layout/report/report_account_invoice_layout.py
@@ -68,10 +68,10 @@ class account_invoice_1(report_sxw.rml_parse):
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)
+ 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
diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml
index f92cd477f1a..3cd64a08b02 100644
--- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml
+++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml
@@ -376,7 +376,7 @@
Net Total:
|
- [[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]]
+ [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
@@ -391,7 +391,7 @@
Taxes:
- [[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
@@ -406,7 +406,7 @@
Total:
- [[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]]
+ [[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]
|
@@ -445,10 +445,10 @@
[[ t.name ]]
- [[ formatLang(t.base) ]]
+ [[ formatLang(t.base, digits=get_digits(dp='Account')) ]]
|
- [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]
+ [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]]
|
@@ -485,4 +485,4 @@
-
\ No newline at end of file
+
From 58d8d88e28c480347effe9b5bb6565b78fe34542 Mon Sep 17 00:00:00 2001
From: "Jay (OpenERP)"
Date: Mon, 4 Oct 2010 13:48:03 +0530
Subject: [PATCH 25/89] [FIX] Product : Corrected variable names
lp bug: https://launchpad.net/bugs/653127 fixed
bzr revid: jvo@tinyerp.com-20101004081803-zvv1050ygse3eb10
---
addons/product/pricelist.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py
index a4b93827660..90d55d47251 100644
--- a/addons/product/pricelist.py
+++ b/addons/product/pricelist.py
@@ -222,7 +222,7 @@ class product_pricelist(osv.osv):
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 @@ class product_pricelist(osv.osv):
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)
From 9d3e1dbac2acc956409d7af0cb936c8e560ed734 Mon Sep 17 00:00:00 2001
From: "Anup (OpenERP)"
Date: Mon, 4 Oct 2010 14:06:19 +0530
Subject: [PATCH 26/89] [FIX] account_payment : Fixed YML and demo data
bzr revid: ach@tinyerp.com-20101004083619-inbqfcj8dv9my7l0
---
addons/account_payment/account_payment_demo.xml | 1 +
addons/account_payment/test/account_payment.yml | 1 +
2 files changed, 2 insertions(+)
diff --git a/addons/account_payment/account_payment_demo.xml b/addons/account_payment/account_payment_demo.xml
index 37705a05b07..65a8d341da4 100644
--- a/addons/account_payment/account_payment_demo.xml
+++ b/addons/account_payment/account_payment_demo.xml
@@ -6,6 +6,7 @@
00987654321
bank
+
Direct Payment
diff --git a/addons/account_payment/test/account_payment.yml b/addons/account_payment/test/account_payment.yml
index e65b3ba0b89..3d863686847 100644
--- a/addons/account_payment/test/account_payment.yml
+++ b/addons/account_payment/test/account_payment.yml
@@ -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
From 83582f7648ef1db067baa25d9616ef310c208abd Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 10:43:28 +0200
Subject: [PATCH 27/89] [FIX] stock: '_product_value' function: some ids were
missing in the 'result' dict
bzr revid: olt@tinyerp.com-20101004084328-l63el272pkzi2ua3
---
addons/stock/stock.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index d73a842bedd..f5c4ebd41e3 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -110,7 +110,6 @@ class stock_location(osv.osv):
@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 @@ class stock_location(osv.osv):
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 @@ class stock_location(osv.osv):
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
From 1a13b57a8bf69a5d3e84e2c6b68a6d76bd02b7ae Mon Sep 17 00:00:00 2001
From: "Anup (OpenERP)"
Date: Mon, 4 Oct 2010 15:00:00 +0530
Subject: [PATCH 28/89] [REF] account : Corrections in account report
bzr revid: ach@tinyerp.com-20101004093000-j71sohta6hsyem9t
---
addons/account/report/rml_parse.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/addons/account/report/rml_parse.py b/addons/account/report/rml_parse.py
index cc8299bcecf..0c7018ae290 100644
--- a/addons/account/report/rml_parse.py
+++ b/addons/account/report/rml_parse.py
@@ -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
From f80c5fbd121182206b18b74d04e5b7020cd53820 Mon Sep 17 00:00:00 2001
From: "Anup (OpenERP)"
Date: Mon, 4 Oct 2010 15:28:13 +0530
Subject: [PATCH 29/89] [FIX] base_iban,hr_payroll : 'bank' added in
res.partner.bank record in demo data
bzr revid: ach@tinyerp.com-20101004095813-bo6h57yu6v26fku6
---
addons/base_iban/base_iban_data.xml | 1 +
addons/hr_payroll/test/payslip.yml | 1 +
2 files changed, 2 insertions(+)
diff --git a/addons/base_iban/base_iban_data.xml b/addons/base_iban/base_iban_data.xml
index 678b798c82f..4269bb83ac6 100644
--- a/addons/base_iban/base_iban_data.xml
+++ b/addons/base_iban/base_iban_data.xml
@@ -8,6 +8,7 @@
IBAN Account
iban
+
iban
diff --git a/addons/hr_payroll/test/payslip.yml b/addons/hr_payroll/test/payslip.yml
index 705270d7c82..ca204a62241 100644
--- a/addons/hr_payroll/test/payslip.yml
+++ b/addons/hr_payroll/test/payslip.yml
@@ -9,6 +9,7 @@
sequence: 0.0
name: Fortis
state: bank
+ bank: base.res_bank_1
-
I create a new employee “Richard”
-
From f4fdbd27e44cb052a8e928f11a0b10a32ea4db41 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 11:06:31 +0200
Subject: [PATCH 30/89] [FIX] account_analytic_analysis: '_analysis_all'
function: some ids were missing in the 'result' dict
bzr revid: olt@tinyerp.com-20101004090631-e61vtc4vh3r5gh47
---
.../account_analytic_analysis.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py
index 5a393e1dd83..e765989040b 100644
--- a/addons/account_analytic_analysis/account_analytic_analysis.py
+++ b/addons/account_analytic_analysis/account_analytic_analysis.py
@@ -66,6 +66,8 @@ class account_analytic_account(osv.osv):
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 +104,8 @@ class account_analytic_account(osv.osv):
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 +146,8 @@ class account_analytic_account(osv.osv):
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 +167,8 @@ class account_analytic_account(osv.osv):
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 +189,14 @@ class account_analytic_account(osv.osv):
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 +235,8 @@ class account_analytic_account(osv.osv):
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)
From 52915deaabebd1d592e522ac04930591c55d9aaf Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 12:05:30 +0200
Subject: [PATCH 31/89] [IMP] account_invoice_layout: performance improvement:
avoid 'name_get' in a loop
bzr revid: olt@tinyerp.com-20101004100530-mqyjcts4e10c7qln
---
.../account_invoice_layout.py | 25 +++++++++++--------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/addons/account_invoice_layout/account_invoice_layout.py b/addons/account_invoice_layout/account_invoice_layout.py
index adb80d787a0..2c2a02d4b9d 100644
--- a/addons/account_invoice_layout/account_invoice_layout.py
+++ b/addons/account_invoice_layout/account_invoice_layout.py
@@ -130,19 +130,22 @@ class account_invoice_line(osv.osv):
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 @@ class account_invoice(osv.osv):
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:
From 3f5c0315a0774ab14213b9dd8679cd945508b55d Mon Sep 17 00:00:00 2001
From: "Vir (Open ERP)"
Date: Mon, 4 Oct 2010 15:54:31 +0530
Subject: [PATCH 32/89] [MOD] hr : imprvements in onchange method
bzr revid: vir@tinyerp.com-20101004102431-mmmtnwlshcyrfilq
---
addons/hr/hr.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index 11ad7bb279b..03af527359d 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -135,7 +135,7 @@ class hr_employee(osv.osv):
company_id = self.pool.get('res.company').browse(cr,uid,company)
for address in company_id.partner_id.address:
return {'value': {'address_id': address.id}}
- return {'value':{}}
+ return {'value':{'address_id':False}}
def onchange_department(self, cr, uid, ids, department_id, context=None):
if not department_id:
From 315e8acd928e2a9df1da8682b3cd141eee204f08 Mon Sep 17 00:00:00 2001
From: "Vir (Open ERP)"
Date: Mon, 4 Oct 2010 16:17:35 +0530
Subject: [PATCH 33/89] [MOD] hr_timesheet : employee timesheet report and
wizard, instead of selecting user, from employee report is generated
bzr revid: vir@tinyerp.com-20101004104735-hlo0co1gt7z3rx7i
---
addons/hr_timesheet/report/user_timesheet.py | 4 ++--
.../wizard/hr_timesheet_print_employee.py | 15 +++++++++++----
.../wizard/hr_timesheet_print_employee_view.xml | 5 ++---
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/addons/hr_timesheet/report/user_timesheet.py b/addons/hr_timesheet/report/user_timesheet.py
index dc048748f46..93c425af995 100644
--- a/addons/hr_timesheet/report/user_timesheet.py
+++ b/addons/hr_timesheet/report/user_timesheet.py
@@ -63,7 +63,7 @@ class report_custom(report_rml):
"and product_uom_id = unit.id "\
"and line.user_id=%s and line.date >= %s and line.date < %s "
"order by line.date",
- (data['form']['user_id'], som.strftime('%Y-%m-%d'), eom.strftime('%Y-%m-%d')))
+ (uid, som.strftime('%Y-%m-%d'), eom.strftime('%Y-%m-%d')))
# Sum attendence by account, then by day
accounts = {}
@@ -97,7 +97,7 @@ class report_custom(report_rml):
account_xml.append('')
# Computing the employee
- cr.execute("select name from res_users where id=%s", (data['form']['user_id'],))
+ cr.execute("select name from res_users where id=%s", (str(uid)))
emp = cr.fetchone()[0]
# Computing the xml
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py b/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py
index 4bcdb614e2f..2983166ad56 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py
+++ b/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py
@@ -21,6 +21,7 @@
import datetime
from osv import osv, fields
+from tools.translate import _
class analytical_timesheet_employee(osv.osv_memory):
_name = 'hr.analytical.timesheet.employee'
@@ -29,18 +30,24 @@ class analytical_timesheet_employee(osv.osv_memory):
'month': fields.selection([(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)],
'Month', required=True),
'year': fields.integer('Year', required=True),
- 'user_id': fields.many2one('res.users', 'User', required=True)
+ 'employee_id': fields.many2one('hr.employee', 'Employee', required=True)
+
}
def _get_user(self, cr, uid, context=None):
+
+ emp_obj = self.pool.get('hr.employee')
if context is None:
context = {}
- return uid
+ emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context)
+ if not emp_id:
+ raise osv.except_osv(_("Warning"), _("No employee defined for this user"))
+ return emp_id and emp_id[0] or False
_defaults = {
'month': datetime.date.today().month,
'year': datetime.date.today().year,
- 'user_id': _get_user
+ 'employee_id': _get_user
}
def print_report(self, cr, uid, ids, context=None):
@@ -59,4 +66,4 @@ class analytical_timesheet_employee(osv.osv_memory):
}
analytical_timesheet_employee()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml b/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
index 3b110b52f1d..63e493cfab7 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
+++ b/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
@@ -8,12 +8,11 @@
hr.analytical.timesheet.employee
form
- |
- [[ formatLang(p['price']) ]]
+ [[ formatLang(p['price'], digits=get_digits(dp='Account')) ]]
|
- [[ formatLang(p['price_value']) ]] [[ o.company_id.currency_id.symbol]]
+ [[ formatLang(p['price_value'], digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol]]
|
@@ -184,7 +184,7 @@
Total:
- [[ formatLang(price_total()) ]] [[ o.company_id.currency_id.symbol ]]
+ [[ formatLang(price_total(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]]
|
@@ -201,7 +201,7 @@
- [[ formatLang(grand_total_price()) ]] [[ o.company_id.currency_id.symbol ]]
+ [[ formatLang(grand_total_price(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]]
|
@@ -209,4 +209,4 @@
-
\ No newline at end of file
+
diff --git a/addons/stock/report/lot_overview_all.rml b/addons/stock/report/lot_overview_all.rml
index a0e58e8ce7d..4c4c71561a2 100644
--- a/addons/stock/report/lot_overview_all.rml
+++ b/addons/stock/report/lot_overview_all.rml
@@ -167,10 +167,10 @@
[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]
- [[ formatLang(p['price']) ]]
+ [[ formatLang(p['price'], digits=get_digits(dp='Account')) ]]
|
- [[ formatLang(p['price_value']) ]] [[ o.company_id.currency_id.symbol]]
+ [[ formatLang(p['price_value'], digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol]]
|
@@ -184,7 +184,7 @@
Total:
- [[ formatLang(price_total()) ]] [[ o.company_id.currency_id.symbol ]]
+ [[ formatLang(price_total(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]]
|
@@ -201,7 +201,7 @@
- [[ formatLang(grand_total_price()) ]] [[ o.company_id.currency_id.symbol ]]
+ [[ formatLang(grand_total_price(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]]
|
@@ -209,4 +209,4 @@
-
\ No newline at end of file
+
From 0f71e3f1004b80a4332234b066a94a7b406d15e8 Mon Sep 17 00:00:00 2001
From: "DBR (OpenERP)"
Date: Mon, 4 Oct 2010 16:28:37 +0530
Subject: [PATCH 35/89] [MOD/IMP] hr_* : usability improvement
bzr revid: dbr@tinyerp.com-20101004105837-4572nv8w947docei
---
addons/hr_attendance/hr_attendance_view.xml | 2 +-
addons/hr_contract/hr_contract_view.xml | 2 +-
addons/hr_evaluation/hr_evaluation.py | 2 +-
.../hr_holidays/report/available_holidays.py | 6 +++++
.../report/available_holidays_view.xml | 26 ++++++++++++-------
.../wizard/hr_holidays_summary_department.py | 6 ++++-
.../hr_holidays_summary_department_view.xml | 18 ++++++-------
7 files changed, 39 insertions(+), 23 deletions(-)
diff --git a/addons/hr_attendance/hr_attendance_view.xml b/addons/hr_attendance/hr_attendance_view.xml
index 9339bf72939..c49c25cd5fc 100644
--- a/addons/hr_attendance/hr_attendance_view.xml
+++ b/addons/hr_attendance/hr_attendance_view.xml
@@ -116,7 +116,7 @@
-
+
diff --git a/addons/hr_contract/hr_contract_view.xml b/addons/hr_contract/hr_contract_view.xml
index ea8b2f4e79a..0f38a783d73 100644
--- a/addons/hr_contract/hr_contract_view.xml
+++ b/addons/hr_contract/hr_contract_view.xml
@@ -224,7 +224,7 @@
- Contract
+ Contracts
hr.contract
form
tree,form
diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py
index 263b34322b9..752028be527 100644
--- a/addons/hr_evaluation/hr_evaluation.py
+++ b/addons/hr_evaluation/hr_evaluation.py
@@ -33,7 +33,7 @@ class hr_evaluation_plan(osv.osv):
'name': fields.char("Evaluation Plan", size=64, required=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'phase_ids': fields.one2many('hr_evaluation.plan.phase', 'plan_id', 'Evaluation Phases'),
- 'month_first': fields.integer('First Evaluation After'),
+ 'month_first': fields.integer('Next Evaluation After'),
'month_next': fields.integer('After the Date of Start'),
'active': fields.boolean('Active')
}
diff --git a/addons/hr_holidays/report/available_holidays.py b/addons/hr_holidays/report/available_holidays.py
index 8ab371c67d7..8d91e0d02e4 100644
--- a/addons/hr_holidays/report/available_holidays.py
+++ b/addons/hr_holidays/report/available_holidays.py
@@ -40,6 +40,12 @@ class available_holidays_report(osv.osv):
'remaining_leave': fields.float('Remaining Leaves', readonly=True),
'department_id': fields.many2one('hr.department', 'Department', readonly=True),
'user_id': fields.many2one('res.users', 'User', readonly=True),
+ 'state': fields.selection([('draft', 'Draft'),
+ ('confirm', 'Waiting Validation'),
+ ('refuse', 'Refused'),
+ ('validate', 'Validated'),
+ ('cancel', 'Cancelled')]
+ ,'State', readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'available_holidays_report')
diff --git a/addons/hr_holidays/report/available_holidays_view.xml b/addons/hr_holidays/report/available_holidays_view.xml
index 372d9158599..b4cb2a99b7a 100644
--- a/addons/hr_holidays/report/available_holidays_view.xml
+++ b/addons/hr_holidays/report/available_holidays_view.xml
@@ -11,6 +11,7 @@
+
@@ -18,6 +19,7 @@
+
@@ -48,13 +50,11 @@
-
-
-
+
+
+
+
+
@@ -65,13 +65,19 @@
-
-
-
+
+
+
+
+
+
+
diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_department.py b/addons/hr_holidays/wizard/hr_holidays_summary_department.py
index 9a99d9eff63..d6a5fd1ecb9 100644
--- a/addons/hr_holidays/wizard/hr_holidays_summary_department.py
+++ b/addons/hr_holidays/wizard/hr_holidays_summary_department.py
@@ -29,8 +29,9 @@ class hr_holidays_summary_dept(osv.osv_memory):
_description = 'HR Holidays Summary Report By Department'
_columns = {
'date_from': fields.date('From', required=True),
+ 'date_to': fields.date('To', required=True),
'depts': fields.many2many('hr.department', 'summary_dept_rel', 'sum_id', 'dept_id', 'Department(s)'),
- 'holiday_type': fields.selection([('Validated','Validated'),('Confirmed','Confirmed'),('both','Both Validated and Confirmed')], 'Select Holiday Type', required=True)
+ 'holiday_type': fields.selection([('Validated','Validated'),('Confirmed','Confirmed'),('both','Both Validated and Confirmed')], 'Select Holyday State', required=True)
}
_defaults = {
@@ -42,6 +43,8 @@ class hr_holidays_summary_dept(osv.osv_memory):
if context is None:
context = {}
data = self.read(cr, uid, ids, [], context=context)[0]
+ print context
+ print data
if not data['depts']:
raise osv.except_osv(_('Error'), _('You have to select at least 1 Department. And try again'))
datas = {
@@ -49,6 +52,7 @@ class hr_holidays_summary_dept(osv.osv_memory):
'model': 'ir.ui.menu',
'form': data
}
+ print datas
return {
'type': 'ir.actions.report.xml',
'report_name': 'holidays.summary',
diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_department_view.xml b/addons/hr_holidays/wizard/hr_holidays_summary_department_view.xml
index 01d3f4372ce..ca8e7e75dcf 100644
--- a/addons/hr_holidays/wizard/hr_holidays_summary_department_view.xml
+++ b/addons/hr_holidays/wizard/hr_holidays_summary_department_view.xml
@@ -9,16 +9,16 @@
@@ -42,4 +42,4 @@
icon="STOCK_PRINT"/>
-
\ No newline at end of file
+
From 12dad77b6ab2ad66fc6b63decc2dc21389146c91 Mon Sep 17 00:00:00 2001
From: "AMP (OpenERP)"
Date: Mon, 4 Oct 2010 16:44:42 +0530
Subject: [PATCH 36/89] [MOD] usability improvement
bzr revid: amp@tinyerp.com-20101004111442-njhnokcljhulji4g
---
addons/hr_evaluation/report/hr_evaluation_report_view.xml | 3 ---
addons/hr_holidays/wizard/hr_holidays_summary_department.py | 3 ---
2 files changed, 6 deletions(-)
diff --git a/addons/hr_evaluation/report/hr_evaluation_report_view.xml b/addons/hr_evaluation/report/hr_evaluation_report_view.xml
index f30e473d030..84ebf598e9d 100644
--- a/addons/hr_evaluation/report/hr_evaluation_report_view.xml
+++ b/addons/hr_evaluation/report/hr_evaluation_report_view.xml
@@ -22,7 +22,6 @@
-
@@ -77,8 +76,6 @@
-
-
diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_department.py b/addons/hr_holidays/wizard/hr_holidays_summary_department.py
index d6a5fd1ecb9..a7c0d274194 100644
--- a/addons/hr_holidays/wizard/hr_holidays_summary_department.py
+++ b/addons/hr_holidays/wizard/hr_holidays_summary_department.py
@@ -43,8 +43,6 @@ class hr_holidays_summary_dept(osv.osv_memory):
if context is None:
context = {}
data = self.read(cr, uid, ids, [], context=context)[0]
- print context
- print data
if not data['depts']:
raise osv.except_osv(_('Error'), _('You have to select at least 1 Department. And try again'))
datas = {
@@ -52,7 +50,6 @@ class hr_holidays_summary_dept(osv.osv_memory):
'model': 'ir.ui.menu',
'form': data
}
- print datas
return {
'type': 'ir.actions.report.xml',
'report_name': 'holidays.summary',
From dfc45323ffd28e0416e11b24cb6fd822d2a1d090 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 13:27:02 +0200
Subject: [PATCH 37/89] [IMP] sale_journal: 'picking journal' report now uses
decimal.precision
bzr revid: olt@tinyerp.com-20101004112702-w7wky190ntlexl7k
---
.../report/picking_journal_report.py | 50 ++++++++++---------
1 file changed, 26 insertions(+), 24 deletions(-)
diff --git a/addons/sale_journal/report/picking_journal_report.py b/addons/sale_journal/report/picking_journal_report.py
index 0b447f45cce..74c00367838 100644
--- a/addons/sale_journal/report/picking_journal_report.py
+++ b/addons/sale_journal/report/picking_journal_report.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -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 .
+# along with this program. If not, see .
#
##############################################################################
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 @@ class sale_journal_picking_report(osv.osv):
_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 @@ class sale_journal_picking_report(osv.osv):
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:
From 5b4f3944f6d02dc842d97bc00c31af74fc5cc68b Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 13:30:10 +0200
Subject: [PATCH 38/89] [IMP] report_intrastat: 'intrastat' report now uses
decimal.precision
bzr revid: olt@tinyerp.com-20101004113010-dj6i5kvfce5jnt1z
---
addons/report_intrastat/report_intrastat.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/report_intrastat/report_intrastat.py b/addons/report_intrastat/report_intrastat.py
index 90c2884cceb..a77c4f5d389 100644
--- a/addons/report_intrastat/report_intrastat.py
+++ b/addons/report_intrastat/report_intrastat.py
@@ -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 @@ class report_intrastat(osv.osv):
'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),
}
From 4e18d14a2a1416ec50757032c02d9eff44b5c65c Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 13:33:09 +0200
Subject: [PATCH 39/89] [IMP] stock: 'inventory analysis' report now uses
decimal.precision
bzr revid: olt@tinyerp.com-20101004113309-p5c8o6lf906edmqi
---
addons/stock/report/report_stock_move.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py
index a96144060ca..a27e9f15202 100644
--- a/addons/stock/report/report_stock_move.py
+++ b/addons/stock/report/report_stock_move.py
@@ -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 @@ class report_stock_move(osv.osv):
'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"),
From 8e1b7362c9acc00e6804f857e29a1d67142e1121 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 13:37:37 +0200
Subject: [PATCH 40/89] [IMP] stock: 'inventory analysis' report now uses
decimal.precision
bzr revid: olt@tinyerp.com-20101004113737-rms5p1vbty6fdkj9
---
addons/stock/report/report_stock_move.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py
index a27e9f15202..6907f4ed3d5 100644
--- a/addons/stock/report/report_stock_move.py
+++ b/addons/stock/report/report_stock_move.py
@@ -137,7 +137,7 @@ class report_stock_inventory(osv.osv):
'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.'),
From d51ad12b0c17318118198286a61d85c7813aa5aa Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 13:48:19 +0200
Subject: [PATCH 41/89] [FIX] mrp_repair: don't try to compare a date object
with a datetime object
bzr revid: olt@tinyerp.com-20101004114819-0b8xhsjytfxgll8t
---
addons/mrp_repair/mrp_repair.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py
index af88c32f42a..6cec29650f3 100644
--- a/addons/mrp_repair/mrp_repair.py
+++ b/addons/mrp_repair/mrp_repair.py
@@ -687,8 +687,9 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
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,
From 3a378cef70d9591530f24e178937df2e39dc99c3 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 13:52:15 +0200
Subject: [PATCH 42/89] [IMP] mrp_repair: 'Repair Quotation' report now uses
decimal.precision
bzr revid: olt@tinyerp.com-20101004115215-caqr9sv7jcdgduoy
---
addons/mrp_repair/report/order.py | 4 ++--
addons/mrp_repair/report/order.rml | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/addons/mrp_repair/report/order.py b/addons/mrp_repair/report/order.py
index 3d6f9200dd8..d6edc1f01e4 100644
--- a/addons/mrp_repair/report/order.py
+++ b/addons/mrp_repair/report/order.py
@@ -33,9 +33,9 @@ class order(report_sxw.rml_parse):
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
diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml
index 149a2650bfd..328b5e931ee 100644
--- a/addons/mrp_repair/report/order.rml
+++ b/addons/mrp_repair/report/order.rml
@@ -343,7 +343,7 @@
Net Total :
- [[ formatLang(o.amount_untaxed)]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Sale Price'))]] [[ o.pricelist_id.currency_id. symbol ]]
|
@@ -357,7 +357,7 @@
Taxes:
- [[ formatLang(o.amount_tax)]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Account'))]] [[ o.pricelist_id.currency_id. symbol ]]
|
@@ -370,7 +370,7 @@
Total :
|
- [[ formatLang(total(o)) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(total(o), digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id. symbol ]]
|
@@ -391,4 +391,4 @@
-
\ No newline at end of file
+
From afe202a227165b2728479cdf6269526a936ce139 Mon Sep 17 00:00:00 2001
From: "Vir (Open ERP)"
Date: Mon, 4 Oct 2010 17:30:12 +0530
Subject: [PATCH 43/89] [MOD] hr_timesheet : employees timesheet report and
wizard, instead of selecting user, from employee report is generated
bzr revid: vir@tinyerp.com-20101004120012-rzi4tyn14ixw4aoe
---
addons/hr_timesheet/report/users_timesheet.py | 10 ++++++----
addons/hr_timesheet/wizard/hr_timesheet_print_users.py | 4 ++--
.../wizard/hr_timesheet_print_users_view.xml | 8 ++++----
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/addons/hr_timesheet/report/users_timesheet.py b/addons/hr_timesheet/report/users_timesheet.py
index 35c86fd08b9..5a52e9ce9c8 100644
--- a/addons/hr_timesheet/report/users_timesheet.py
+++ b/addons/hr_timesheet/report/users_timesheet.py
@@ -59,7 +59,7 @@ def emp_create_xml(cr, id, som, eom):
time_xml = ([xml % (day, amount) for day, amount in month.iteritems()])
# Computing the employee
- cr.execute("select name from res_users where id=%s", (id,))
+ cr.execute("select name from resource_resource where id=%s", (id,))
emp = cr.fetchone()[0]
# Computing the xml
@@ -91,9 +91,11 @@ class report_custom(report_rml):
date_xml.append('2.5cm%s,2cm\n' % (',0.7cm' * lengthmonth(som.year, som.month)))
emp_xml=''
- for id in data['form']['user_ids']:
- emp_xml += emp_create_xml(cr, id, som, eom)
-
+ emp_obj = pooler.get_pool(cr.dbname).get('hr.employee')
+ for id in data['form']['employee_ids']:
+ user = emp_obj.browse(cr, uid, id).user_id.id
+ if user:
+ emp_xml += emp_create_xml(cr, id, som, eom)
# Computing the xml
#Without this, report don't show non-ascii characters (TO CHECK)
date_xml = '\n'.join(date_xml)
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_users.py b/addons/hr_timesheet/wizard/hr_timesheet_print_users.py
index 27533710f35..b0a0c3c0f05 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_print_users.py
+++ b/addons/hr_timesheet/wizard/hr_timesheet_print_users.py
@@ -30,7 +30,7 @@ class analytical_timesheet_employees(osv.osv_memory):
'month': fields.selection([(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)],
'Month', required=True),
'year': fields.integer('Year', required=True),
- 'user_ids': fields.many2many('res.users', 'timesheet_users_rel', 'timesheet_id', 'user_id', 'Users', required=True)
+ 'employee_ids': fields.many2many('hr.employee', 'timesheet_employee_rel', 'timesheet_id', 'employee_id', 'employees', required=True)
}
_defaults = {
@@ -55,4 +55,4 @@ class analytical_timesheet_employees(osv.osv_memory):
analytical_timesheet_employees()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml b/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml
index d71946abfd9..95b7bd3b93e 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml
+++ b/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml
@@ -8,16 +8,16 @@
hr.analytical.timesheet.users
form
-