From aec0dafa1712a16c3208ebfec398b05224bbaaff Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 8 Dec 2008 08:56:41 +0100 Subject: [PATCH] modifs bzr revid: fp@tinyerp.com-20081208075641-3i3clllhoa8u180n --- addons/account/invoice.py | 9 ++++++--- addons/document/document.py | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 40191d48a91..e60c04d9851 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -33,7 +33,8 @@ from tools.translate import _ class account_invoice(osv.osv): def _amount_all(self, cr, uid, ids, name, args, context={}): res = {} - for invoice in self.browse(cr,uid,ids): + print ids + for invoice in self.browse(cr,uid,ids, context=context): res[invoice.id] = { 'amount_untaxed': 0.0, 'amount_tax': 0.0, @@ -115,8 +116,10 @@ class account_invoice(osv.osv): def _get_invoice_line(self, cr, uid, ids, context={}): result = {} - for tax in self.pool.get('account.invoice.line').browse(cr, uid, ids, context=context): - result[tax.invoice_id.id] = True + for line in self.pool.get('account.invoice.line').browse(cr, uid, ids, context=context): + print '\t', line.invoice_id + result[line.invoice_id.id] = True + print result return result.keys() def _get_invoice_tax(self, cr, uid, ids, context={}): diff --git a/addons/document/document.py b/addons/document/document.py index 942eefb2682..84c70b56c30 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -94,7 +94,6 @@ class node_class(object): if test_nodename.find('/'): test_nodename=test_nodename.replace('/', '_') path = self.path+'/'+test_nodename - #path = self.path+'/'+self.object2.name + (content.suffix or '') + (content.extension or '') if not nodename: n = node_class(self.cr, self.uid,path, self.object2, False, content=content, type='content', root=False) res2.append( n)