From e54317dd2b76ae226d7ad24c448300a6114b9608 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 15 Nov 2011 16:32:01 +0100 Subject: [PATCH] [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 --- addons/account_anglo_saxon/purchase.py | 4 ++-- addons/purchase/purchase.py | 4 ++-- addons/purchase_analytic_plans/purchase_analytic_plans.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account_anglo_saxon/purchase.py b/addons/account_anglo_saxon/purchase.py index 8e02cc361ef..f08cc0879a5 100644 --- a/addons/account_anglo_saxon/purchase.py +++ b/addons/account_anglo_saxon/purchase.py @@ -26,8 +26,8 @@ class purchase_order(osv.osv): _inherit = "purchase.order" _description = "Purchase Order" - 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) + 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) 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 if not oa: diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 4a52f669c49..d2154a9630d 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -320,7 +320,7 @@ class purchase_order(osv.osv): '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 for that purchase order line :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 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_lines.append(inv_line_id) diff --git a/addons/purchase_analytic_plans/purchase_analytic_plans.py b/addons/purchase_analytic_plans/purchase_analytic_plans.py index 27bf8019f5f..9be9e828d22 100644 --- a/addons/purchase_analytic_plans/purchase_analytic_plans.py +++ b/addons/purchase_analytic_plans/purchase_analytic_plans.py @@ -35,8 +35,8 @@ class purchase_order(osv.osv): _name='purchase.order' _inherit='purchase.order' - 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) + 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['analytics_id'] = order_line.analytics_id.id return res