[CLEAN] sale, sale_crm: reverted some changes, cleaning before merging.
bzr revid: tde@openerp.com-20130604123026-f0xks6ky1rkw3ser
This commit is contained in:
parent
6dd31d5841
commit
a3c677b337
|
@ -400,6 +400,8 @@ class sale_order(osv.osv):
|
|||
def _make_invoice(self, cr, uid, order, lines, context=None):
|
||||
inv_obj = self.pool.get('account.invoice')
|
||||
obj_invoice_line = self.pool.get('account.invoice.line')
|
||||
if context is None:
|
||||
context = {}
|
||||
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):
|
||||
|
@ -437,7 +439,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)
|
||||
|
|
|
@ -48,8 +48,8 @@ modules.
|
|||
'report/sale_crm_account_invoice_report_view.xml',
|
||||
],
|
||||
'js': [
|
||||
'static/src/js/sale_crm.js',
|
||||
'static/lib/justgage.js',
|
||||
'static/src/js/sale_crm.js',
|
||||
],
|
||||
'demo': ['sale_crm_demo.xml'],
|
||||
'test': ['test/sale_crm.yml'],
|
||||
|
|
|
@ -34,11 +34,6 @@ class sale_order(osv.osv):
|
|||
domain="['|',('section_id','=',section_id),('section_id','=',False), ('object_id.model', '=', 'crm.lead')]")
|
||||
}
|
||||
|
||||
def _make_invoice(self, cr, uid, order, lines, context=None):
|
||||
if order.section_id:
|
||||
context = dict(context or {}, default_section_id= order.section_id.id)
|
||||
return super(sale_order, self)._make_invoice(cr, uid, order, lines, context=context)
|
||||
|
||||
def _prepare_invoice(self, cr, uid, order, lines, context=None):
|
||||
invoice_vals = super(sale_order, self)._prepare_invoice(cr, uid, order, lines, context=context)
|
||||
if order.section_id and order.section_id.id:
|
||||
|
|
Loading…
Reference in New Issue