[FIX] mrp: remove method: get_product_accounts. its dead code

bzr revid: hmo@tinyerp.com-20111212145334-toc7pfa0lqb65yf2
This commit is contained in:
Harry (OpenERP) 2011-12-12 20:23:34 +05:30
parent 74ffef84cf
commit a373d36496
1 changed files with 0 additions and 30 deletions

View File

@ -25,39 +25,9 @@ from tools.translate import _
class product_product(osv.osv):
_inherit = "product.product"
# TODO: DEAD CODE: This function was called from do_change_standard_price,
# but as that function is removed for the fix of lp:747056, its not reached
# def get_product_accounts(self, cr, uid, product_id, context=None):
# """ To get the stock input account, stock output account and stock journal related to product.
# @param product_id: product id
# @return: dictionary which contains information regarding stock input account, stock output account and stock journal
# """
# product_obj = self.pool.get('product.product').browse(cr, uid, product_id, False)
# res = super(product_product,self).get_product_accounts(cr, uid, product_id, context=context)
# stock_input_acc = product_obj.property_stock_account_input and product_obj.property_stock_account_input.id or False
# if not stock_input_acc:
# stock_input_acc = product_obj.categ_id.property_stock_account_input_categ and product_obj.categ_id.property_stock_account_input_categ.id or False
#
# stock_output_acc = product_obj.property_stock_account_output and product_obj.property_stock_account_output.id or False
# if not stock_output_acc:
# stock_output_acc = product_obj.categ_id.property_stock_account_output_categ and product_obj.categ_id.property_stock_account_output_categ.id or False
#
# journal_id = product_obj.categ_id.property_stock_journal and product_obj.categ_id.property_stock_journal.id or False
#
# res.update({'stock_account_input': stock_input_acc})
# res.update({'stock_account_output': stock_output_acc})
# res.update({'stock_journal': journal_id})
#
# return res
_columns = {
"bom_ids": fields.one2many('mrp.bom', 'product_id','Bill of Materials'),
}
# Removed do_change_standard_price for the fix of lp:747056
def copy(self, cr, uid, id, default=None, context=None):
if not default:
default = {}