diff --git a/addons/account/account.py b/addons/account/account.py
index ce5dbf012b4..729037102b3 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -844,7 +844,7 @@ class account_move(osv.osv):
if line.account_id.currency_id:
if line.account_id.currency_id.id != line.currency_id.id and (line.account_id.currency_id.id != line.account_id.company_id.currency_id.id or line.currency_id):
- raise osv.except_osv(_('Error'), _('Couldn\'t create move with currency different than the secondary currency of the account'))
+ raise osv.except_osv(_('Error'), _('Couldn\'t create move with currency different than the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.' % (line.account_id.code, line.account_id.name)))
if abs(amount) < 0.0001:
if not len(line_draft_ids):
@@ -1851,9 +1851,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
obj_journal = self.pool.get('account.journal')
obj_acc_template = self.pool.get('account.account.template')
- if obj_multi.code_digits<=5:
- raise osv.except_osv(_('User Error'), _('Account code should be of more than 5 digits.'))
-
# Creating Account
obj_acc_root = obj_multi.chart_template_id.account_root_id
tax_code_root_id = obj_multi.chart_template_id.tax_code_root_id.id
@@ -1936,7 +1933,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'name': (obj_acc_root.id == account_template.id) and obj_multi.company_id.name or account_template.name,
#'sign': account_template.sign,
'currency_id': account_template.currency_id and account_template.currency_id.id or False,
- 'code': code_acc[:dig],
+ 'code': code_acc,
'type': account_template.type,
'user_type': account_template.user_type and account_template.user_type.id or False,
'reconcile': account_template.reconcile,
diff --git a/addons/account_report/report/print_indicator.py b/addons/account_report/report/print_indicator.py
index 4649443ad7b..4b97289af07 100644
--- a/addons/account_report/report/print_indicator.py
+++ b/addons/account_report/report/print_indicator.py
@@ -35,11 +35,8 @@ from crm.report import report_businessopp
from report.interface import report_int
from reportlab.graphics.shapes import Drawing
from reportlab.graphics.charts.barcharts import VerticalBarChart
-import reportlab.lib.colors as colors
-#from reportlab.graphics.widgetbase import Widget, TypedPropertyCollection
-#from reportlab.graphics.charts.textlabels import BarChartLabel
+import reportlab.lib.colors
#from reportlab.graphics import renderPM
-import tools
class accounting_report1(report_sxw.rml_parse):
@@ -49,88 +46,34 @@ class accounting_report1(report_sxw.rml_parse):
self.localcontext.update({
'time': time,
'test': self.test1,
- 'lines':self.lines,
+# 'childs':self.process
})
- self.count=0
- self.list=[]
- def lines(self,data):
- res={}
- result=[]
- obj_inds=self.pool.get('account.report.report').browse(self.cr,self.uid,data['indicator_id'])
- def find_child(obj):
- self.list.append(obj)
- if obj.child_ids:
- for child in obj.child_ids:
- find_child(child)
- return True
- find_child(obj_inds)
-
- for obj_ind in self.list:
- res = {
- 'id':obj_ind.id,
- 'name':obj_ind.name,
- 'code':obj_ind.code,
- 'expression':obj_ind.expression,
- 'disp_graph':obj_ind.disp_graph,
- 'note':obj_ind.note,
- 'type':obj_ind.type
- }
- result.append(res)
- return result
-
- def test1(self,data,object):
- path=tools.config['root_path']+"/Temp_report/Image"
- obj_history=self.pool.get('account.report.history')
-
- if data['select_base']=='year':
- tuple_search=('fiscalyear_id','in',data['base_selection'][0][2])
- else:
- tuple_search=('period_id','in',data['base_selection'][0][2])
-
- history_ids=obj_history.search(self.cr,self.uid,[('name','=',object['id']),tuple_search])
- obj_his=obj_history.browse(self.cr,self.uid,history_ids)
-
- data_val=[]
- data_period=[]
- for item in obj_his:
- data_val.append(item.val)
- data_period.append(item.period_id.name)
- self.count +=1
- drawing = Drawing(400, 300)
+ def test1(self):
+ drawing = Drawing(400, 200)
data = [
- tuple(data_val),
+ (13, 5, 20, 22, 37, 45, 19, 4),
+ (11, 3, 10, 22, 30, 25, 29, 6),
]
- value_min=0.0
- vmin=min(data_val)
- vmax=max(data_val)
-
- val_min=((vmin < 0.00 and vmin-2.00) or 0.00)
- # calculating maximum
- val_max=(vmax/(pow(10,len(str(int(vmax)))-2))+1)*pow(10,len(str(int(vmax)))-2)
bc = VerticalBarChart()
bc.x = 50
bc.y = 50
- bc.height = 245
+ bc.height = 125
bc.width = 300
bc.data = data
- value_step=(abs(val_max)-abs(val_min))/5
-
- bc.strokeColor = colors.black
- bc.valueAxis.valueMin = val_min
- bc.valueAxis.valueMax = val_max
- bc.valueAxis.valueStep = value_step
-
+ bc.strokeColor = reportlab.lib.colors.black
+ bc.valueAxis.valueMin = 0
+ bc.valueAxis.valueMax = 50
+ bc.valueAxis.valueStep = 10
bc.categoryAxis.labels.boxAnchor = 'ne'
bc.categoryAxis.labels.dx = 8
-
bc.categoryAxis.labels.dy = -2
bc.categoryAxis.labels.angle = 30
- bc.categoryAxis.categoryNames = data_period
+ bc.categoryAxis.categoryNames = ['Jan-99','Feb-99','Mar-99',
+ 'Apr-99','May-99','Jun-99','Jul-99','Aug-99']
drawing.add(bc)
- drawing.save(formats=['png'],fnRoot=path+str(self.count),title="helo")
-# renderPM.drawToFile(drawing1, 'example1.jpg','jpg')
- return path+str(self.count)+'.png'
+# renderPM.drawToFile(drawing, 'example1.jpg','jpg')
+ return True
report_sxw.report_sxw('report.print.indicators', 'account.report.history',
diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml
index 07dec155ddf..a29fdde7ac8 100644
--- a/addons/delivery/delivery_view.xml
+++ b/addons/delivery/delivery_view.xml
@@ -62,7 +62,7 @@
-
+
diff --git a/addons/product/product.py b/addons/product/product.py
index b3a9f77dc41..3b1b78b7241 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -531,6 +531,7 @@ class product_packaging(osv.osv):
_description = "Packaging"
_rec_name = 'ean'
_columns = {
+ 'sequence': fields.integer('Sequence'),
'name' : fields.char('Description', size=64),
'qty' : fields.float('Quantity by Package',
help="The total number of products you can put by palet or box."),
@@ -559,6 +560,7 @@ class product_packaging(osv.osv):
_defaults = {
'rows' : lambda *a : 3,
+ 'sequence' : lambda *a : 1,
'ul' : _get_1st_ul,
}
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index ad359628958..30b07fe8f74 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -121,6 +121,7 @@