[IMP] pruchase, account_anglo_saxon, purchase_analytic_plans: added underscore prefix on _prepare_inv_line() for consistency

bzr revid: qdp-launchpad@openerp.com-20111115153201-ny1yq1zkyjz8qxfq
This commit is contained in:
Quentin (OpenERP) 2011-11-15 16:32:01 +01:00
parent 2502b18a1f
commit e54317dd2b
3 changed files with 6 additions and 6 deletions

View File

@ -26,8 +26,8 @@ class purchase_order(osv.osv):
_inherit = "purchase.order" _inherit = "purchase.order"
_description = "Purchase Order" _description = "Purchase Order"
def prepare_inv_line(self, cr, uid, account_id, order_line, context=None): def _prepare_inv_line(self, cr, uid, account_id, order_line, context=None):
line = super(purchase_order, self).prepare_inv_line(cr, uid, account_id, order_line, context=context) line = super(purchase_order, self)._prepare_inv_line(cr, uid, account_id, order_line, context=context)
if order_line.product_id and not order_line.product_id.type == 'service': if order_line.product_id and not order_line.product_id.type == 'service':
acc_id = order_line.product_id.property_stock_account_input and order_line.product_id.property_stock_account_input.id acc_id = order_line.product_id.property_stock_account_input and order_line.product_id.property_stock_account_input.id
if not oa: if not oa:

View File

@ -320,7 +320,7 @@ class purchase_order(osv.osv):
'ref_doc1': 'purchase.order,%d' % (po.id,), 'ref_doc1': 'purchase.order,%d' % (po.id,),
}) })
def prepare_inv_line(self, cr, uid, account_id, order_line, context=None): def _prepare_inv_line(self, cr, uid, account_id, order_line, context=None):
"""Collects require data from purchase order line that is used to create invoice line """Collects require data from purchase order line that is used to create invoice line
for that purchase order line for that purchase order line
:param account_id: Expense account of the product of PO line if any. :param account_id: Expense account of the product of PO line if any.
@ -388,7 +388,7 @@ class purchase_order(osv.osv):
fpos = order.fiscal_position or False fpos = order.fiscal_position or False
acc_id = fiscal_obj.map_account(cr, uid, fpos, acc_id) acc_id = fiscal_obj.map_account(cr, uid, fpos, acc_id)
inv_line_data = self.prepare_inv_line(cr, uid, acc_id, po_line, context=context) inv_line_data = self._prepare_inv_line(cr, uid, acc_id, po_line, context=context)
inv_line_id = inv_line_obj.create(cr, uid, inv_line_data, context=context) inv_line_id = inv_line_obj.create(cr, uid, inv_line_data, context=context)
inv_lines.append(inv_line_id) inv_lines.append(inv_line_id)

View File

@ -35,8 +35,8 @@ class purchase_order(osv.osv):
_name='purchase.order' _name='purchase.order'
_inherit='purchase.order' _inherit='purchase.order'
def prepare_inv_line(self, cr, uid, account_id, order_line, context=None): def _prepare_inv_line(self, cr, uid, account_id, order_line, context=None):
res = super(purchase_order, self).prepare_inv_line(cr, uid, account_id, order_line, context=context) res = super(purchase_order, self)._prepare_inv_line(cr, uid, account_id, order_line, context=context)
res['analytics_id'] = order_line.analytics_id.id res['analytics_id'] = order_line.analytics_id.id
return res return res