[IMP]add logging and remove warning
bzr revid: kjo@tinyerp.com-20120613090600-3ib3r220zpn1yo5o
This commit is contained in:
parent
7b8f7cb44f
commit
ceddfafdc7
|
@ -212,7 +212,6 @@ class account_account(osv.osv):
|
||||||
_name = "account.account"
|
_name = "account.account"
|
||||||
_description = "Account"
|
_description = "Account"
|
||||||
_parent_store = True
|
_parent_store = True
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
def search(self, cr, uid, args, offset=0, limit=None, order=None,
|
def search(self, cr, uid, args, offset=0, limit=None, order=None,
|
||||||
context=None, count=False):
|
context=None, count=False):
|
||||||
|
@ -295,8 +294,7 @@ class account_account(osv.osv):
|
||||||
if aml_query.strip():
|
if aml_query.strip():
|
||||||
wheres.append(aml_query.strip())
|
wheres.append(aml_query.strip())
|
||||||
filters = " AND ".join(wheres)
|
filters = " AND ".join(wheres)
|
||||||
self.logger.warning('addons.'+self._name, logging.LOG_DEBUG,
|
logging.getLogger('account').debug('Filters: %s'%filters)
|
||||||
'Filters: %s'%filters)
|
|
||||||
# IN might not work ideally in case there are too many
|
# IN might not work ideally in case there are too many
|
||||||
# children_and_consolidated, in that case join on a
|
# children_and_consolidated, in that case join on a
|
||||||
# values() e.g.:
|
# values() e.g.:
|
||||||
|
@ -312,8 +310,7 @@ class account_account(osv.osv):
|
||||||
" GROUP BY l.account_id")
|
" GROUP BY l.account_id")
|
||||||
params = (tuple(children_and_consolidated),) + query_params
|
params = (tuple(children_and_consolidated),) + query_params
|
||||||
cr.execute(request, params)
|
cr.execute(request, params)
|
||||||
self.logger.warning('addons.'+self._name, logging.LOG_DEBUG,
|
logging.getLogger('account').debug('Status: %s'%cr.statusmessage)
|
||||||
'Status: %s'%cr.statusmessage)
|
|
||||||
|
|
||||||
for res in cr.dictfetchall():
|
for res in cr.dictfetchall():
|
||||||
accounts[res['id']] = res
|
accounts[res['id']] = res
|
||||||
|
@ -886,6 +883,7 @@ account_journal()
|
||||||
class account_fiscalyear(osv.osv):
|
class account_fiscalyear(osv.osv):
|
||||||
_name = "account.fiscalyear"
|
_name = "account.fiscalyear"
|
||||||
_description = "Fiscal Year"
|
_description = "Fiscal Year"
|
||||||
|
_inherit = 'mail.thread'
|
||||||
_columns = {
|
_columns = {
|
||||||
'name': fields.char('Fiscal Year', size=64, required=True),
|
'name': fields.char('Fiscal Year', size=64, required=True),
|
||||||
'code': fields.char('Code', size=6, required=True),
|
'code': fields.char('Code', size=6, required=True),
|
||||||
|
@ -982,6 +980,7 @@ account_fiscalyear()
|
||||||
class account_period(osv.osv):
|
class account_period(osv.osv):
|
||||||
_name = "account.period"
|
_name = "account.period"
|
||||||
_description = "Account period"
|
_description = "Account period"
|
||||||
|
_inherit = 'mail.thread'
|
||||||
_columns = {
|
_columns = {
|
||||||
'name': fields.char('Period Name', size=64, required=True),
|
'name': fields.char('Period Name', size=64, required=True),
|
||||||
'code': fields.char('Code', size=12),
|
'code': fields.char('Code', size=12),
|
||||||
|
@ -2095,8 +2094,7 @@ class account_tax(osv.osv):
|
||||||
}
|
}
|
||||||
|
|
||||||
def compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None):
|
def compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None):
|
||||||
logger.warning("warning", logging.LOG_WARNING,
|
logging.getLogger('account').debug("Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included")
|
||||||
"Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included")
|
|
||||||
return self._compute(cr, uid, taxes, price_unit, quantity, product, partner)
|
return self._compute(cr, uid, taxes, price_unit, quantity, product, partner)
|
||||||
|
|
||||||
def _compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None):
|
def _compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None):
|
||||||
|
|
|
@ -75,10 +75,10 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _account_sum_debit(self, account, date1, date2):
|
def _account_sum_debit(self, account, date1, date2):
|
||||||
return self._sum_debit(self, [account], date1, date2)
|
return self._sum_debit([account], date1, date2)
|
||||||
|
|
||||||
def _account_sum_credit(self, account, date1, date2):
|
def _account_sum_credit(self, account, date1, date2):
|
||||||
return self._sum_credit(self, [account], date1, date2)
|
return self._sum_credit([account], date1, date2)
|
||||||
|
|
||||||
def _account_sum_balance(self, account, date1, date2):
|
def _account_sum_balance(self, account, date1, date2):
|
||||||
debit = self._account_sum_debit(account, date1, date2)
|
debit = self._account_sum_debit(account, date1, date2)
|
||||||
|
|
|
@ -497,7 +497,7 @@
|
||||||
<para style="terp_default_8">[[ strip_name(line['partner_name'],10) ]]</para>
|
<para style="terp_default_8">[[ strip_name(line['partner_name'],10) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_8">[[ strip_name(line['lref'],9) ]]</para>
|
<para style="terp_default_8">[[ line['lref'] and strip_name(line['lref'],9) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_8">[[ strip_name(line['move'],9) ]]</para>
|
<para style="terp_default_8">[[ strip_name(line['move'],9) ]]</para>
|
||||||
|
@ -590,7 +590,7 @@
|
||||||
<para style="terp_default_8">[[ strip_name(line['partner_name'],20) ]]</para>
|
<para style="terp_default_8">[[ strip_name(line['partner_name'],20) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_8">[[ strip_name(line['lref'],9) ]]</para>
|
<para style="terp_default_8">[[ line['lref'] and strip_name(line['lref'],9) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_8">[[ strip_name(line['move'],9) ]]</para>
|
<para style="terp_default_8">[[ strip_name(line['move'],9) ]]</para>
|
||||||
|
|
|
@ -505,7 +505,7 @@
|
||||||
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
|
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'), currency = company.currency_id) ]]</para>
|
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'), currency_obj= company.currency_id) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Bold_7_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account'),currency_obj=o.currency_id) or '' ]]</para>
|
<para style="terp_default_Bold_7_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account'),currency_obj=o.currency_id) or '' ]]</para>
|
||||||
|
@ -529,7 +529,7 @@
|
||||||
<para style="terp_default_7">[[ strip_name(line['partner_name'],20) ]]</para>
|
<para style="terp_default_7">[[ strip_name(line['partner_name'],20) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_7">[[ strip_name(line['lref'],17) ]]</para>
|
<para style="terp_default_7">[[ line['lref'] and strip_name(line['lref'],17) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_7">[[ line['move'] ]]</para>
|
<para style="terp_default_7">[[ line['move'] ]]</para>
|
||||||
|
|
|
@ -519,7 +519,7 @@
|
||||||
<para style="terp_default_8">[[ line['a_code'] ]]</para>
|
<para style="terp_default_8">[[ line['a_code'] ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_8">[[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para>
|
<para style="terp_default_8">[[ line['ref'] and strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
|
<para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
|
||||||
|
|
|
@ -524,7 +524,7 @@
|
||||||
<para style="terp_default_8">[[ line['a_code'] ]]</para>
|
<para style="terp_default_8">[[ line['a_code'] ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_8">[[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para>
|
<para style="terp_default_8">[[ line['ref'] and strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
|
<para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para>
|
<para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para>
|
||||||
<para style="terp_default_8">[[ display_address(o.partner_id,'invoice') ]]</para>
|
<para style="terp_default_8">[[ display_address(o.partner_id) ]]</para>
|
||||||
<para style="terp_default_8">
|
<para style="terp_default_8">
|
||||||
<font color="white"> </font>
|
<font color="white"> </font>
|
||||||
</para>
|
</para>
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
|
from tools.translate import _
|
||||||
|
|
||||||
class account_fiscalyear_close_state(osv.osv_memory):
|
class account_fiscalyear_close_state(osv.osv_memory):
|
||||||
"""
|
"""
|
||||||
|
@ -56,7 +57,7 @@ class account_fiscalyear_close_state(osv.osv_memory):
|
||||||
# Log message for Fiscalyear
|
# Log message for Fiscalyear
|
||||||
fy_pool = self.pool.get('account.fiscalyear')
|
fy_pool = self.pool.get('account.fiscalyear')
|
||||||
fy_code = fy_pool.browse(cr, uid, fy_id, context=context).code
|
fy_code = fy_pool.browse(cr, uid, fy_id, context=context).code
|
||||||
fy_pool.log(cr, uid, fy_id, "Fiscal year '%s' is closed, no more modification allowed." % (fy_code))
|
fy_pool.message_append_note(cr, uid, [fy_id], body=_("Fiscal year '%s' is closed, no more modification allowed.") % (fy_code))
|
||||||
return {'type': 'ir.actions.act_window_close'}
|
return {'type': 'ir.actions.act_window_close'}
|
||||||
|
|
||||||
account_fiscalyear_close_state()
|
account_fiscalyear_close_state()
|
||||||
|
|
|
@ -55,9 +55,9 @@ class account_period_close(osv.osv_memory):
|
||||||
|
|
||||||
# Log message for Period
|
# Log message for Period
|
||||||
for period_id, name in period_pool.name_get(cr, uid, [id]):
|
for period_id, name in period_pool.name_get(cr, uid, [id]):
|
||||||
period_pool.log(cr, uid, period_id, "Period '%s' is closed, no more modification allowed for this period." % (name))
|
period_pool.message_append_note(cr, uid, [period_id], body=_("Period '%s' is closed, no more modification allowed for this period.") % (name))
|
||||||
return {'type': 'ir.actions.act_window_close'}
|
return {'type': 'ir.actions.act_window_close'}
|
||||||
|
|
||||||
account_period_close()
|
account_period_close()
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -109,7 +109,7 @@ class crossovered_analytic(report_sxw.rml_parse):
|
||||||
res['ref_qty'] = info[0]['qty']
|
res['ref_qty'] = info[0]['qty']
|
||||||
res['ref_amt'] = info[0]['amt']
|
res['ref_amt'] = info[0]['amt']
|
||||||
self.base_amount = info[0]['amt']
|
self.base_amount = info[0]['amt']
|
||||||
|
print "\n =-=-=--= res =-=->>", res, info[0]['qty'], info[0]['amt']
|
||||||
result.append(res)
|
result.append(res)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
@ -237,10 +237,10 @@
|
||||||
<para style="terp_default_Centre_9">[[ a['ref_code'] ]]</para>
|
<para style="terp_default_Centre_9">[[ a['ref_code'] ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Right_9">[[ formatLang(a['ref_qty']) ]]</para>
|
<para style="terp_default_Right_9">[[ a['ref_qty'] and formatLang(a['ref_qty']) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Right_9">[[ formatLang(a['ref_amt'], currency_obj=company.currency_id) ]]</para>
|
<para style="terp_default_Right_9">[[ a['ref_amt'] and formatLang(a['ref_amt'], currency_obj=company.currency_id) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Right_9">100.00%</para>
|
<para style="terp_default_Right_9">100.00%</para>
|
||||||
|
|
|
@ -24,12 +24,11 @@ import time
|
||||||
from report import report_sxw
|
from report import report_sxw
|
||||||
import pooler
|
import pooler
|
||||||
import logging
|
import logging
|
||||||
logger=logging.getLogger(__name__)
|
|
||||||
|
|
||||||
class bank_statement_balance_report(report_sxw.rml_parse):
|
class bank_statement_balance_report(report_sxw.rml_parse):
|
||||||
|
|
||||||
def set_context(self, objects, data, ids, report_type=None):
|
def set_context(self, objects, data, ids, report_type=None):
|
||||||
#logger.warning('addons.'+__name__, logging.LOG_WARNING, 'set_context, objects = %s, data = %s, ids = %s' % (objects, data, ids))
|
#logging('bank.statement.balance.report').warning('addons.'+__name__, 'set_context, objects = %s, data = %s, ids = %s' % (objects, data, ids))
|
||||||
cr = self.cr
|
cr = self.cr
|
||||||
uid = self.uid
|
uid = self.uid
|
||||||
context = self.context
|
context = self.context
|
||||||
|
|
|
@ -22,9 +22,7 @@
|
||||||
|
|
||||||
from osv import osv, fields
|
from osv import osv, fields
|
||||||
import decimal_precision as dp
|
import decimal_precision as dp
|
||||||
import logging
|
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
logger=logging.getLogger(__name__)
|
|
||||||
|
|
||||||
class coda_bank_account(osv.osv):
|
class coda_bank_account(osv.osv):
|
||||||
_name= 'coda.bank.account'
|
_name= 'coda.bank.account'
|
||||||
|
|
|
@ -28,7 +28,6 @@ import logging
|
||||||
import re
|
import re
|
||||||
from traceback import format_exception
|
from traceback import format_exception
|
||||||
from sys import exc_info
|
from sys import exc_info
|
||||||
logger=logging.getLogger(__name__)
|
|
||||||
|
|
||||||
class account_coda_import(osv.osv_memory):
|
class account_coda_import(osv.osv_memory):
|
||||||
_name = 'account.coda.import'
|
_name = 'account.coda.import'
|
||||||
|
@ -816,7 +815,7 @@ class account_coda_import(osv.osv_memory):
|
||||||
ttype = line['type'] == 'supplier' and 'payment' or 'receipt',
|
ttype = line['type'] == 'supplier' and 'payment' or 'receipt',
|
||||||
date = line['val_date'],
|
date = line['val_date'],
|
||||||
context = context)
|
context = context)
|
||||||
#logger.warning('addons.'+self._name, logging.LOG_WARNING, 'voucher_dict = %s' % voucher_dict)
|
#logging('account.coda').warning('voucher_dict = %s' % voucher_dict)
|
||||||
voucher_line_vals = False
|
voucher_line_vals = False
|
||||||
if voucher_dict['value']['line_ids']:
|
if voucher_dict['value']['line_ids']:
|
||||||
for line_dict in voucher_dict['value']['line_ids']:
|
for line_dict in voucher_dict['value']['line_ids']:
|
||||||
|
@ -889,22 +888,19 @@ class account_coda_import(osv.osv_memory):
|
||||||
nb_err += 1
|
nb_err += 1
|
||||||
err_string += _('\nError ! ') + str(e)
|
err_string += _('\nError ! ') + str(e)
|
||||||
tb = ''.join(format_exception(*exc_info()))
|
tb = ''.join(format_exception(*exc_info()))
|
||||||
logger.warning('addons.'+self._name, logging.LOG_ERROR,
|
logging('account.coda').error('Application Error while processing Statement %s\n%s' % (statement.get('name', '/'),tb))
|
||||||
'Application Error while processing Statement %s\n%s' % (statement.get('name', '/'),tb))
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
cr.rollback()
|
cr.rollback()
|
||||||
nb_err += 1
|
nb_err += 1
|
||||||
err_string += _('\nSystem Error : ') + str(e)
|
err_string += _('\nSystem Error : ') + str(e)
|
||||||
tb = ''.join(format_exception(*exc_info()))
|
tb = ''.join(format_exception(*exc_info()))
|
||||||
logger.warning('addons.'+self._name, logging.LOG_ERROR,
|
logging('account.coda').error('System Error while processing Statement %s\n%s' % (statement.get('name', '/'),tb))
|
||||||
'System Error while processing Statement %s\n%s' % (statement.get('name', '/'),tb))
|
|
||||||
except :
|
except :
|
||||||
cr.rollback()
|
cr.rollback()
|
||||||
nb_err += 1
|
nb_err += 1
|
||||||
err_string = _('\nUnknown Error : ') + str(e)
|
err_string = _('\nUnknown Error : ') + str(e)
|
||||||
tb = ''.join(format_exception(*exc_info()))
|
tb = ''.join(format_exception(*exc_info()))
|
||||||
logger.warning('addons.'+self._name, logging.LOG_ERROR,
|
logging('account.coda').error('Unknown Error while processing Statement %s\n%s' % (statement.get('name', '/'),tb))
|
||||||
'Unknown Error while processing Statement %s\n%s' % (statement.get('name', '/'),tb))
|
|
||||||
|
|
||||||
# end 'for statement in coda_statements'
|
# end 'for statement in coda_statements'
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para>
|
<para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para>
|
||||||
<para style="terp_default_8">[[ display_address(o.partner_id, 'invoice') ]]</para>
|
<para style="terp_default_8">[[ display_address(o.partner_id) ]]</para>
|
||||||
<para style="terp_default_8">
|
<para style="terp_default_8">
|
||||||
<font color="white"> </font>
|
<font color="white"> </font>
|
||||||
</para>
|
</para>
|
||||||
|
|
|
@ -197,7 +197,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para>
|
<para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para>
|
||||||
<para style="terp_default_8">[[ display_address(o.partner_id, 'invoice') ]]</para>
|
<para style="terp_default_8">[[ display_address(o.partner_id) ]]</para>
|
||||||
<para style="terp_default_8">
|
<para style="terp_default_8">
|
||||||
<font color="white"> </font>
|
<font color="white"> </font>
|
||||||
</para>
|
</para>
|
||||||
|
|
|
@ -36,6 +36,8 @@ class report_voucher(report_sxw.rml_parse):
|
||||||
})
|
})
|
||||||
|
|
||||||
def convert(self, amount, cur):
|
def convert(self, amount, cur):
|
||||||
|
if cur is None:
|
||||||
|
cur='euro'
|
||||||
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur)
|
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur)
|
||||||
return amt_en
|
return amt_en
|
||||||
|
|
||||||
|
@ -72,4 +74,4 @@ report_sxw.report_sxw(
|
||||||
parser=report_voucher,header="external"
|
parser=report_voucher,header="external"
|
||||||
)
|
)
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -35,6 +35,7 @@ class report_voucher_print(report_sxw.rml_parse):
|
||||||
})
|
})
|
||||||
|
|
||||||
def convert(self, amount, cur):
|
def convert(self, amount, cur):
|
||||||
|
print "\n\n\n =-=-=-convert -=->", cur
|
||||||
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur)
|
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur)
|
||||||
return amt_en
|
return amt_en
|
||||||
|
|
||||||
|
@ -93,4 +94,4 @@ report_sxw.report_sxw(
|
||||||
parser=report_voucher_print,header="external"
|
parser=report_voucher_print,header="external"
|
||||||
)
|
)
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -24,7 +24,6 @@ import re, time, random
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
import logging
|
import logging
|
||||||
logger=logging.getLogger(__name__)
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
account.invoice object:
|
account.invoice object:
|
||||||
|
@ -41,7 +40,7 @@ class account_invoice(osv.osv):
|
||||||
context=context)
|
context=context)
|
||||||
res[[i for i,x in enumerate(res) if x[0] == 'none'][0]] = ('none', 'Free Communication')
|
res[[i for i,x in enumerate(res) if x[0] == 'none'][0]] = ('none', 'Free Communication')
|
||||||
res.append(('bba', 'BBA Structured Communication'))
|
res.append(('bba', 'BBA Structured Communication'))
|
||||||
#logger.warning('addons.'+self._name, logging.LOG_WARNING, 'reference_type = %s' %res )
|
#logging('l1on.be.invoice.bba').warning('reference_type = %s' %res )
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def check_bbacomm(self, val):
|
def check_bbacomm(self, val):
|
||||||
|
@ -68,7 +67,7 @@ class account_invoice(osv.osv):
|
||||||
result = super(account_invoice, self).onchange_partner_id(cr, uid, ids, type, partner_id,
|
result = super(account_invoice, self).onchange_partner_id(cr, uid, ids, type, partner_id,
|
||||||
date_invoice, payment_term, partner_bank_id, company_id)
|
date_invoice, payment_term, partner_bank_id, company_id)
|
||||||
# reference_type = self.default_get(cr, uid, ['reference_type'])['reference_type']
|
# reference_type = self.default_get(cr, uid, ['reference_type'])['reference_type']
|
||||||
# logger.warning('addons.'+self._name, logging.LOG_WARNING, 'partner_id %s' % partner_id)
|
# logging('l1on.be.invoice.bba').warning('partner_id %s' % partner_id)
|
||||||
reference = False
|
reference = False
|
||||||
reference_type = 'none'
|
reference_type = 'none'
|
||||||
if partner_id:
|
if partner_id:
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
import time
|
import time
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
import logging
|
|
||||||
logger=logging.getLogger(__name__)
|
|
||||||
|
|
||||||
class res_partner(osv.osv):
|
class res_partner(osv.osv):
|
||||||
""" add field to indicate default 'Communication Type' on customer invoices """
|
""" add field to indicate default 'Communication Type' on customer invoices """
|
||||||
|
|
|
@ -276,7 +276,6 @@ class mail_thread(osv.osv):
|
||||||
|
|
||||||
ir_attachment = self.pool.get('ir.attachment')
|
ir_attachment = self.pool.get('ir.attachment')
|
||||||
mail_message = self.pool.get('mail.message')
|
mail_message = self.pool.get('mail.message')
|
||||||
|
|
||||||
new_msg_ids = []
|
new_msg_ids = []
|
||||||
for thread in threads:
|
for thread in threads:
|
||||||
to_attach = []
|
to_attach = []
|
||||||
|
|
Loading…
Reference in New Issue