From c4f4f475dd0eef7e9be88811fcf620d03650feeb Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Thu, 16 Sep 2010 14:55:05 +0200 Subject: [PATCH] [FIX] point_of_sale: fixed yaml test, company_id field on bank statement lines is already defined in the module account bzr revid: qdp-launchpad@tinyerp.com-20100916125505-uz5s80q5j1dc5rzy --- .../point_of_sale/account_bank_statement.py | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/addons/point_of_sale/account_bank_statement.py b/addons/point_of_sale/account_bank_statement.py index 8f5f33c9107..395319eeb64 100644 --- a/addons/point_of_sale/account_bank_statement.py +++ b/addons/point_of_sale/account_bank_statement.py @@ -69,31 +69,4 @@ class account_cash_statement(osv.osv): account_cash_statement() -class account_bank_statement_line(osv.osv): - - def _default_company(self, cr, uid, context={}): - """ To get default company for the object" - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of bank statement ids - @param context: A standard dictionary for contextual values - @return: company - """ - - user = self.pool.get('res.users').browse(cr, uid, uid, context=context) - if user.company_id: - return user.company_id.id - - return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0] - - _inherit = 'account.bank.statement.line' - _columns = { - 'company_id':fields.many2one('res.company', 'Company', required=True), - } - _defaults = { - 'company_id': _default_company, - } -account_bank_statement_line() - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: