From b3ea75636d17db12dc37cb5d4e05c8200f7cf4c3 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Mon, 16 Jul 2012 12:44:55 +0530 Subject: [PATCH] [FIX]: Fix general issue. Unknown field state in domain [["state","in",["done"]]] for period form "Could not get field with name payment_rate_currency_id "Could not get field with name algorithm bzr revid: atp@tinyerp.com-20120716071455-r30romahsfg1zvxr --- addons/account/account_view.xml | 1 + addons/account_voucher/account_voucher_view.xml | 1 + addons/l10n_be_invoice_bba/account_invoice_view.xml | 3 ++- addons/l10n_be_invoice_bba/invoice.py | 8 ++++---- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 27590b8a34c..6bfaf23abfe 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -37,6 +37,7 @@ + diff --git a/addons/account_voucher/account_voucher_view.xml b/addons/account_voucher/account_voucher_view.xml index c69e386e879..6ab2ba3ade7 100644 --- a/addons/account_voucher/account_voucher_view.xml +++ b/addons/account_voucher/account_voucher_view.xml @@ -67,6 +67,7 @@ + diff --git a/addons/l10n_be_invoice_bba/account_invoice_view.xml b/addons/l10n_be_invoice_bba/account_invoice_view.xml index 51c39a4b3be..ffa6ad68d65 100644 --- a/addons/l10n_be_invoice_bba/account_invoice_view.xml +++ b/addons/l10n_be_invoice_bba/account_invoice_view.xml @@ -11,8 +11,9 @@ + + on_change="generate_bbacomm(type,reference_type,partner_id,reference)" colspan="1"/> diff --git a/addons/l10n_be_invoice_bba/invoice.py b/addons/l10n_be_invoice_bba/invoice.py index 4cdbca84c0a..0c767f3a54c 100644 --- a/addons/l10n_be_invoice_bba/invoice.py +++ b/addons/l10n_be_invoice_bba/invoice.py @@ -64,7 +64,7 @@ class account_invoice(osv.osv): return True def onchange_partner_id(self, cr, uid, ids, type, partner_id, - date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): + date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): result = super(account_invoice, self).onchange_partner_id(cr, uid, ids, type, partner_id, date_invoice, payment_term, partner_bank_id, company_id) # reference_type = self.default_get(cr, uid, ['reference_type'])['reference_type'] @@ -78,15 +78,15 @@ class account_invoice(osv.osv): algorithm = self.pool.get('res.partner').browse(cr, uid, partner_id).out_inv_comm_algorithm if not algorithm: algorithm = 'random' - reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, algorithm, partner_id, '')['value']['reference'] + reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, partner_id, '', algorithm)['value']['reference'] res_update = { 'reference_type': reference_type or 'none', 'reference': reference, } result['value'].update(res_update) return result - - def generate_bbacomm(self, cr, uid, ids, type, reference_type, algorithm, partner_id, reference): +#algorithm is not defined as field in any account related modules.so pass it as false argument. + def generate_bbacomm(self, cr, uid, ids, type, reference_type, partner_id, reference, algorithm=False): partner_obj = self.pool.get('res.partner') reference = reference or '' if (type == 'out_invoice'):