From 99f379dd115ff5701b29255a90c9c7122e43fb90 Mon Sep 17 00:00:00 2001 From: Jay Vora Date: Fri, 26 Sep 2008 11:49:57 +0530 Subject: [PATCH 01/20] Modifs on Print Screen utility bzr revid: jvo@tinyerp.com-20080926061957-u978ss21g4pi4nop --- bin/report/printscreen/ps_form.py | 5 +++-- bin/report/printscreen/ps_list.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/report/printscreen/ps_form.py b/bin/report/printscreen/ps_form.py index e39949b7c51..34e9933e33b 100644 --- a/bin/report/printscreen/ps_form.py +++ b/bin/report/printscreen/ps_form.py @@ -141,8 +141,9 @@ class report_printscreen_list(report_int): line[f] = line[f][1] if fields[f]['type'] in ('one2many','many2many') and line[f]: line[f] = '( '+str(len(line[f])) + ' )' - if fields[f]['type'] in ('float','integer'): - line[f]=round(line[f],2) + if fields[f]['type'] == 'float': + precision=(('digits' in fields[f]) and fields[f]['digits'][1]) or 2 + line[f]=round(line[f],precision) col = new_doc.createElement("col") col.setAttribute('tree','no') if line[f] != None: diff --git a/bin/report/printscreen/ps_list.py b/bin/report/printscreen/ps_list.py index d0245828735..0187b681e56 100644 --- a/bin/report/printscreen/ps_list.py +++ b/bin/report/printscreen/ps_list.py @@ -153,7 +153,6 @@ class report_printscreen_list(report_int): tsum.append(0) for line in results: node_line = new_doc.createElement("row") - count = -1 for f in fields_order: count += 1 @@ -161,8 +160,9 @@ class report_printscreen_list(report_int): line[f] = line[f][1] if fields[f]['type'] in ('one2many','many2many') and line[f]: line[f] = '( '+str(len(line[f])) + ' )' - if fields[f]['type'] in ('float','integer'): - line[f]=round(line[f],2) + if fields[f]['type'] == 'float': + precision=(('digits' in fields[f]) and fields[f]['digits'][1]) or 2 + line[f]=round(line[f],precision) col = new_doc.createElement("col") col.setAttribute('para','yes') col.setAttribute('tree','no') From 88578be5c920effe3afba6535917d7585d08a440 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Fri, 26 Sep 2008 12:04:59 +0530 Subject: [PATCH 02/20] open correct view for customer invoice bzr revid: mra@tinyerp.com-20080926063459-fkvhy18eo30tdjas --- addons/account/account_invoice_view.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 1db082ac151..3b1aaba836c 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -336,6 +336,17 @@ [('type','=','out_invoice')] {'type':'out_invoice'} + + + tree + + + + + form + + + New Customer Invoice From f824dd39107d6ec6c624d6d9bb4934a1639b8aa8 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 26 Sep 2008 11:24:48 +0200 Subject: [PATCH 03/20] bugfixes bzr revid: fp@tinyerp.com-20080926092448-t80o0ypcylehwrk7 --- addons/sale/sale.py | 3 ++- addons/stock/stock.py | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 9d6a9e113fc..d7b3d53c88b 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -515,7 +515,8 @@ class sale_order(osv.osv): 'location_dest_id': output_id, 'sale_line_id': line.id, 'tracking_id': False, - 'state': 'waiting', + 'state': 'draft', + #'state': 'waiting', 'note': line.notes, }) proc_id = self.pool.get('mrp.procurement').create(cr, uid, { diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 7d5f9c3dd0a..ed0ad6bd442 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -102,7 +102,8 @@ class stock_location(osv.osv): 'child_ids': fields.one2many('stock.location', 'location_id', 'Contains'), 'chained_location_id': fields.many2one('stock.location', 'Chained Location If Fixed'), - 'chained_location_type': fields.selection([('','None'),('customer', 'Customer'),('fixed','Fixed Location')], 'Chained Location Type'), + 'chained_location_type': fields.selection([('','None'),('customer', 'Customer'),('fixed','Fixed Location')], + 'Chained Location Type', required=True), 'chained_auto_packing': fields.selection( [('auto','Automatic Move'), ('manual','Manual Operation'),('transparent','Automatic No Step Added')], 'Automatic Move', @@ -422,7 +423,7 @@ class stock_picking(osv.osv): todo.append(r) todo = self.action_explode(cr, uid, todo, context) if len(todo): - self.pool.get('stock.move').action_confirm(cr,uid, todo, context) + self.pool.get('stock.move').action_confirm(cr, uid, todo, context) return True def test_auto_picking(self, cr, uid, ids): @@ -909,14 +910,12 @@ class stock_move(osv.osv): cursor.commit() def onchange_lot_id(self, cr, uid, context, prodlot_id=False,product_qty=False, loc_id=False): - print uid, prodlot_id, product_qty, loc_id if not prodlot_id or not loc_id: return {} prodlot = self.pool.get('stock.production.lot').browse(cr, uid, prodlot_id) location=self.pool.get('stock.location').browse(cr,uid,loc_id) warning={} if (location.usage == 'internal') and (product_qty > (prodlot.stock_available or 0.0)): - print 'Warning' warning={ 'title':'Bad Lot Assignation !', 'message':'You are moving %.2f products but only %.2f available in this lot.' % (product_qty,prodlot.stock_available or 0.0) From 9bef76cbed5c1d3c27b80530b09ea50e5a15c137 Mon Sep 17 00:00:00 2001 From: Jay Vora Date: Fri, 26 Sep 2008 14:59:15 +0530 Subject: [PATCH 04/20] Bugfixes on Sale order report bzr revid: jvo@tinyerp.com-20080926092915-j1pgelu48vu9vggf --- addons/sale/report/order.rml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml index a5a29a6f38c..377126e0dbb 100644 --- a/addons/sale/report/order.rml +++ b/addons/sale/report/order.rml @@ -134,7 +134,8 @@ - [[ repeatIn(objects,'o') ]] [[ setLang(o.partner_id.lang) ]] + [[ repeatIn(objects,'o') ]] + [[ setLang(o.partner_id.lang) ]] @@ -148,7 +149,7 @@ - Invoice address :[[ o.partner_id.property_payment_term.name ]] + Invoice address :[[ o.partner_id.property_payment_term and o.partner_id.property_payment_term.name ]] [[ o.partner_invoice_id.street ]] [[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]] [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]] From 5f809bb14a94c7b6f6ab833f7c799759925adab5 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 26 Sep 2008 11:40:35 +0200 Subject: [PATCH 05/20] bugfix bzr revid: fp@tinyerp.com-20080926094035-2zchwof1ijjosqj0 --- addons/sale/report/order.rml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml index a5a29a6f38c..233af05bccb 100644 --- a/addons/sale/report/order.rml +++ b/addons/sale/report/order.rml @@ -134,7 +134,7 @@ - [[ repeatIn(objects,'o') ]] [[ setLang(o.partner_id.lang) ]] + [[ repeatIn(objects,'o') ]] [[ setLang(o.partner_id.lang) ]] @@ -148,7 +148,7 @@ - Invoice address :[[ o.partner_id.property_payment_term.name ]] + Invoice address :[[ o.partner_id.property_payment_term and o.partner_id.property_payment_term.name or '']] [[ o.partner_invoice_id.street ]] [[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]] [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]] @@ -354,23 +354,6 @@ - - - - - - - [[ format(o.note or '') ]] - - - - - [[ format((o.partner_id.property_payment_term and o.partner_id.property_payment_term.note) or '') ]] - - - - - - + [[ format(o.note or '') ]] From 437387dc2370b2053ce587e7e18fccb048ca14a9 Mon Sep 17 00:00:00 2001 From: qdp Date: Fri, 26 Sep 2008 12:10:54 +0200 Subject: [PATCH 06/20] *improvements bzr revid: qdp@tinyerp.com-20080926101054-cmzmh3ylemjqm2rq --- addons/account_budget/__terp__.py | 4 ++-- addons/account_budget/crossovered_budget_view.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account_budget/__terp__.py b/addons/account_budget/__terp__.py index 9231b606400..b7957697226 100644 --- a/addons/account_budget/__terp__.py +++ b/addons/account_budget/__terp__.py @@ -1,13 +1,13 @@ # -*- encoding: utf-8 -*- { - "name" : "Crossovered Budget Management", + "name" : "Budget Management", "version" : "1.0", "author" : "Tiny", "website" : "http://tinyerp.com/module_crossovered_budget.html", "category" : "Generic Modules/Accounting", "description": """This module allow accountants to manage analytic and crossovered budgets. - Once the Master Budgets and the Budgets defined (in Financial Management/Configuration/Budgets/), the Project Managers can set the planned amount on each Analytic Account. + Once the Master Budgets and the Budgets defined (in Financial Management/Budgets/), the Project Managers can set the planned amount on each Analytic Account. The accountant has the possibility to see the total of amount planned for each Budget and Master Budget in order to ensure the total planned is not greater/lower than what he planned for this Budget/Master Budget. Each list of record can also be switched to a graphical view of it. diff --git a/addons/account_budget/crossovered_budget_view.xml b/addons/account_budget/crossovered_budget_view.xml index 178f8dd0696..ed7b1efb5bb 100644 --- a/addons/account_budget/crossovered_budget_view.xml +++ b/addons/account_budget/crossovered_budget_view.xml @@ -76,7 +76,7 @@ form - +