Remove the "ids" argument from the function _prepare_order_line_invoice_line because it is not needed in our _prepare_* functions.

bzr revid: alexis@via.ecp.fr-20120201182809-e842pbb9t4bx97y9
This commit is contained in:
Alexis de Lattre 2012-02-01 19:28:09 +01:00
parent 32bfeb684a
commit d4842703e2
2 changed files with 3 additions and 3 deletions

View File

@ -981,7 +981,7 @@ class sale_order_line(osv.osv):
'price_unit': 0.0,
}
def _prepare_order_line_invoice_line(self, cr, uid, ids, line, account_id=False, context=None):
def _prepare_order_line_invoice_line(self, cr, uid, line, account_id=False, context=None):
""" Builds the invoice line dict from a sale order line
@param line: sale order line object
@param account_id: the id of the account to force eventually (the method is used for picking return including service)
@ -1055,7 +1055,7 @@ class sale_order_line(osv.osv):
create_ids = []
sales = set()
for line in self.browse(cr, uid, ids, context=context):
vals = self._prepare_order_line_invoice_line(cr, uid, ids, line, False, context)
vals = self._prepare_order_line_invoice_line(cr, uid, line, False, context)
if vals:
inv_id = self.pool.get('account.invoice.line').create(cr, uid, vals, context=context)
cr.execute('insert into sale_order_line_invoice_rel (order_line_id,invoice_id) values (%s,%s)', (line.id, inv_id))

View File

@ -176,7 +176,7 @@ class stock_picking(osv.osv):
account_id = sale_line.product_id.categ_id.\
property_account_expense_categ.id
vals = order_line_obj._prepare_order_line_invoice_line(cursor, user, ids, sale_line, account_id, context)
vals = order_line_obj._prepare_order_line_invoice_line(cursor, user, sale_line, account_id, context)
if vals: #note: in some cases we may not want to include all service lines as invoice lines
vals['name'] = name
vals['account_analytic_id'] = self._get_account_analytic_invoice(cursor, user, picking, sale_line)