From 1ad2ddbc179bf11f1e25b9337c1558ece86876e2 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Fri, 15 Oct 2010 18:52:13 +0530 Subject: [PATCH] [FIX] account: account_move => partner fields set to store=true because it did not work in search view else gave error (partner_id not found) bzr revid: mra@mra-laptop-20101015132213-umetllpb02d666ha --- addons/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index 5de913c45a7..4ceaa9d9e8a 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1105,7 +1105,7 @@ class account_move(osv.osv): help='All manually created new journal entry are usually in the state \'Unposted\', but you can set the option to skip that state on the related journal. In that case, they will be behave as journal entries automatically created by the system on document validation (invoices, bank statements...) and will be created in \'Posted\' state.'), 'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}), 'to_check': fields.boolean('To Review', help='Check this box if you are unsure of that journal entry and if you want to note it as \'to be reviewed\' by an accounting expert.'), - 'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner"), + 'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True), 'amount': fields.function(_amount_compute, method=True, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount), 'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}), 'narration':fields.text('Narration'),