From 872b75d4f3c7e6708dc8b419dfca6ad56c832b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20L=C3=B3pez=20Soil=C3=A1n=20=28Pexego=29?= <> Date: Fri, 25 Sep 2009 18:58:13 +0530 Subject: [PATCH 1/2] [FIX] Sale: Passing Contact address for invoices from SO lp bug: https://launchpad.net/bugs/436008 fixed bzr revid: jvo@tinyerp.com-20090925132813-jrhul80rsxdo6aay --- addons/sale/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index b33736714ca..52e25c603dd 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -374,7 +374,7 @@ class sale_order(osv.osv): 'account_id': a, 'partner_id': order.partner_id.id, 'address_invoice_id': order.partner_invoice_id.id, - 'address_contact_id': order.partner_invoice_id.id, + 'address_contact_id': order.partner_order_id.id, 'invoice_line': [(6, 0, lines)], 'currency_id': order.pricelist_id.currency_id.id, 'comment': order.note, From 0d897873892fb74090bfd193ce26a82f669b4783 Mon Sep 17 00:00:00 2001 From: "YSA(OpenERP)" <> Date: Fri, 25 Sep 2009 19:19:42 +0530 Subject: [PATCH 2/2] [FIX] Document: attachment linked with Files lp bug: https://launchpad.net/bugs/416810 fixed bzr revid: jvo@tinyerp.com-20090925134942-y663miys2ocgwi56 --- addons/document/document.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/addons/document/document.py b/addons/document/document.py index 1d7ca841576..4b1a5c715e3 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -651,10 +651,11 @@ class document_file(osv.osv): def create(self, cr, uid, vals, context={}): vals['title']=vals['name'] vals['parent_id'] = context.get('parent_id',False) or vals.get('parent_id',False) - if not vals.get('res_id', False) and context.get('default_res_id',False): - vals['res_id']=context.get('default_res_id',False) - if not vals.get('res_model', False) and context.get('default_res_model',False): - vals['res_model']=context.get('default_res_model',False) +# if not vals.get('res_id', False) and context.get('default_res_id',False): +# vals['res_id']=context.get('default_res_id',False) +# if not vals.get('res_model', False) and context.get('default_res_model',False): +# vals['res_model']=context.get('default_res_model',False) + vals['res_model'] = "report.document.user" if vals.get('res_id', False) and vals.get('res_model',False): obj_model=self.pool.get(vals['res_model']) result = obj_model.read(cr, uid, [vals['res_id']], context=context) @@ -693,7 +694,8 @@ class document_file(osv.osv): try: res = content_index(base64.decodestring(datas), vals['datas_fname'], vals.get('content_type', None)) super(document_file,self).write(cr, uid, [result], { - 'index_content': res, + 'index_content' : res, + 'res_id' : result }) cr.commit() except: