diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 210e4dd3be6..8d23d5da022 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -402,6 +402,8 @@ class sale_order(osv.osv):
obj_invoice_line = self.pool.get('account.invoice.line')
if context is None:
context = {}
+ if order.section_id:
+ context.update({'default_section_id': order.section_id.id})
invoiced_sale_line_ids = self.pool.get('sale.order.line').search(cr, uid, [('order_id', '=', order.id), ('invoiced', '=', True)], context=context)
from_line_invoice_ids = []
for invoiced_sale_line_id in self.pool.get('sale.order.line').browse(cr, uid, invoiced_sale_line_ids, context=context):
@@ -439,7 +441,7 @@ class sale_order(osv.osv):
view of one of the newly created invoices
"""
mod_obj = self.pool.get('ir.model.data')
-
+
# create invoices through the sales orders' workflow
inv_ids0 = set(inv.id for sale in self.browse(cr, uid, ids, context) for inv in sale.invoice_ids)
self.signal_manual_invoice(cr, uid, ids)