merge trunk
bzr revid: nicolas.vanhoren@openerp.com-20121002122939-xr3by0mdqzri0lss
This commit is contained in:
commit
dbd69a0e9e
|
@ -595,12 +595,15 @@ class account_account(osv.osv):
|
|||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False):
|
||||
def copy(self, cr, uid, id, default=None, context=None, done_list=None, local=False):
|
||||
if default is None:
|
||||
default = {}
|
||||
else:
|
||||
default = default.copy()
|
||||
if done_list is None:
|
||||
done_list = []
|
||||
account = self.browse(cr, uid, id, context=context)
|
||||
new_child_ids = []
|
||||
if not default:
|
||||
default = {}
|
||||
default = default.copy()
|
||||
default.update(code=_("%s (copy)") % (account['code'] or ''))
|
||||
if not local:
|
||||
done_list = []
|
||||
|
@ -777,11 +780,14 @@ class account_journal(osv.osv):
|
|||
(_check_currency, 'Configuration error!\nThe currency chosen should be shared by the default accounts too.', ['currency','default_debit_account_id','default_credit_account_id']),
|
||||
]
|
||||
|
||||
def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False):
|
||||
journal = self.browse(cr, uid, id, context=context)
|
||||
if not default:
|
||||
def copy(self, cr, uid, id, default=None, context=None, done_list=None, local=False):
|
||||
if default is None:
|
||||
default = {}
|
||||
default = default.copy()
|
||||
else:
|
||||
default = default.copy()
|
||||
if done_list is None:
|
||||
done_list = []
|
||||
journal = self.browse(cr, uid, id, context=context)
|
||||
default.update(
|
||||
code=_("%s (copy)") % (journal['code'] or ''),
|
||||
name=_("%s (copy)") % (journal['name'] or ''),
|
||||
|
@ -1178,7 +1184,7 @@ class account_fiscalyear(osv.osv):
|
|||
'end_journal_period_id':fields.many2one('account.journal.period','End of Year Entries Journal', readonly=True),
|
||||
}
|
||||
|
||||
def copy(self, cr, uid, id, default={}, context=None):
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
default.update({
|
||||
'period_ids': [],
|
||||
'end_journal_period_id': False
|
||||
|
@ -1437,9 +1443,15 @@ class account_move(osv.osv):
|
|||
result = super(account_move, self).create(cr, uid, vals, context)
|
||||
return result
|
||||
|
||||
def copy(self, cr, uid, id, default={}, context=None):
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if context is None:
|
||||
default = {}
|
||||
else:
|
||||
default = default.copy()
|
||||
if context is None:
|
||||
context = {}
|
||||
else:
|
||||
context = context.copy()
|
||||
default.update({
|
||||
'state':'draft',
|
||||
'name':'/',
|
||||
|
@ -2269,7 +2281,10 @@ class account_model(osv.osv):
|
|||
_defaults = {
|
||||
'legend': lambda self, cr, uid, context:_('You can specify year, month and date in the name of the model using the following labels:\n\n%(year)s: To Specify Year \n%(month)s: To Specify Month \n%(date)s: Current Date\n\ne.g. My model on %(date)s'),
|
||||
}
|
||||
def generate(self, cr, uid, ids, datas={}, context=None):
|
||||
|
||||
def generate(self, cr, uid, ids, data=None, context=None):
|
||||
if data is None:
|
||||
data = {}
|
||||
move_ids = []
|
||||
entry = {}
|
||||
account_move_obj = self.pool.get('account.move')
|
||||
|
@ -2280,8 +2295,8 @@ class account_model(osv.osv):
|
|||
if context is None:
|
||||
context = {}
|
||||
|
||||
if datas.get('date', False):
|
||||
context.update({'date': datas['date']})
|
||||
if data.get('date', False):
|
||||
context.update({'date': data['date']})
|
||||
|
||||
move_date = context.get('date', time.strftime('%Y-%m-%d'))
|
||||
move_date = datetime.strptime(move_date,"%Y-%m-%d")
|
||||
|
@ -2467,10 +2482,10 @@ class account_subscription_line(osv.osv):
|
|||
all_moves = []
|
||||
obj_model = self.pool.get('account.model')
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
datas = {
|
||||
data = {
|
||||
'date': line.date,
|
||||
}
|
||||
move_ids = obj_model.generate(cr, uid, [line.subscription_id.model_id.id], datas, context)
|
||||
move_ids = obj_model.generate(cr, uid, [line.subscription_id.model_id.id], data, context)
|
||||
tocheck[line.subscription_id.id] = True
|
||||
self.write(cr, uid, [line.id], {'move_id':move_ids[0]})
|
||||
all_moves.extend(move_ids)
|
||||
|
@ -3236,7 +3251,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
property_obj.create(cr, uid, vals, context=context)
|
||||
return True
|
||||
|
||||
def _install_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, acc_ref={}, taxes_ref={}, tax_code_ref={}, context=None):
|
||||
def _install_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, acc_ref=None, taxes_ref=None, tax_code_ref=None, context=None):
|
||||
'''
|
||||
This function recursively loads the template objects and create the real objects from them.
|
||||
|
||||
|
@ -3254,6 +3269,12 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
* a last identical containing the mapping of tax code templates and tax codes
|
||||
:rtype: tuple(dict, dict, dict)
|
||||
'''
|
||||
if acc_ref is None:
|
||||
acc_ref = {}
|
||||
if taxes_ref is None:
|
||||
taxes_ref = {}
|
||||
if tax_code_ref is None:
|
||||
tax_code_ref = {}
|
||||
template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context)
|
||||
if template.parent_id:
|
||||
tmp1, tmp2, tmp3 = self._install_template(cr, uid, template.parent_id.id, company_id, code_digits=code_digits, acc_ref=acc_ref, taxes_ref=taxes_ref, tax_code_ref=tax_code_ref, context=context)
|
||||
|
@ -3266,7 +3287,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
tax_code_ref.update(tmp3)
|
||||
return acc_ref, taxes_ref, tax_code_ref
|
||||
|
||||
def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref={}, taxes_ref={}, tax_code_ref={}, context=None):
|
||||
def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref=None, taxes_ref=None, tax_code_ref=None, context=None):
|
||||
'''
|
||||
This function generates all the objects from the templates
|
||||
|
||||
|
@ -3284,6 +3305,12 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
* a last identical containing the mapping of tax code templates and tax codes
|
||||
:rtype: tuple(dict, dict, dict)
|
||||
'''
|
||||
if account_ref is None:
|
||||
account_ref = {}
|
||||
if taxes_ref is None:
|
||||
taxes_ref = {}
|
||||
if tax_code_ref is None:
|
||||
tax_code_ref = {}
|
||||
template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context)
|
||||
obj_tax_code_template = self.pool.get('account.tax.code.template')
|
||||
obj_acc_tax = self.pool.get('account.tax')
|
||||
|
|
|
@ -29,12 +29,12 @@ class bank(osv.osv):
|
|||
'currency_id': fields.related('journal_id', 'currency', type="many2one", relation='res.currency', readonly=True,
|
||||
string="Currency", help="Currency of the related account journal."),
|
||||
}
|
||||
def create(self, cr, uid, data, context={}):
|
||||
def create(self, cr, uid, data, context=None):
|
||||
result = super(bank, self).create(cr, uid, data, context=context)
|
||||
self.post_write(cr, uid, [result], context=context)
|
||||
return result
|
||||
|
||||
def write(self, cr, uid, ids, data, context={}):
|
||||
def write(self, cr, uid, ids, data, context=None):
|
||||
result = super(bank, self).write(cr, uid, ids, data, context=context)
|
||||
self.post_write(cr, uid, ids, context=context)
|
||||
return result
|
||||
|
@ -53,7 +53,7 @@ class bank(osv.osv):
|
|||
data['currency_name'] = data['currency_id'] and currency_name[data['currency_id'][0]] or ''
|
||||
return super(bank, self)._prepare_name_get(cr, uid, bank_dicts, context=context)
|
||||
|
||||
def post_write(self, cr, uid, ids, context={}):
|
||||
def post_write(self, cr, uid, ids, context=None):
|
||||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
|
||||
|
|
|
@ -1105,7 +1105,7 @@ class account_move_line(osv.osv):
|
|||
'has been confirmed.') % res[2])
|
||||
return res
|
||||
|
||||
def _remove_move_reconcile(self, cr, uid, move_ids=[], context=None):
|
||||
def _remove_move_reconcile(self, cr, uid, move_ids=None, context=None):
|
||||
# Function remove move rencocile ids related with moves
|
||||
obj_move_line = self.pool.get('account.move.line')
|
||||
obj_move_rec = self.pool.get('account.move.reconcile')
|
||||
|
|
|
@ -47,4 +47,4 @@ class account_analytic_chart(osv.osv_memory):
|
|||
return result
|
||||
|
||||
account_analytic_chart()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -52,4 +52,4 @@ class account_analytic_inverted_balance(osv.osv_memory):
|
|||
}
|
||||
|
||||
account_analytic_inverted_balance()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -55,4 +55,4 @@ class project_account_analytic_line(osv.osv_memory):
|
|||
|
||||
project_account_analytic_line()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -68,7 +68,7 @@ class account_balance(report_sxw.rml_parse, common_report_header):
|
|||
return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name
|
||||
return super(account_balance ,self)._get_account(data)
|
||||
|
||||
def lines(self, form, ids=[], done=None):#, level=1):
|
||||
def lines(self, form, ids=None, done=None):
|
||||
def _process_child(accounts, disp_acc, parent):
|
||||
account_rec = [acct for acct in accounts if acct['id']==parent][0]
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
|
|
|
@ -105,4 +105,4 @@ class journal_print(report_sxw.rml_parse, common_report_header):
|
|||
|
||||
report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/account_central_journal.rml', parser=journal_print, header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -158,4 +158,4 @@ class journal_print(report_sxw.rml_parse, common_report_header):
|
|||
|
||||
report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print, header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -284,4 +284,4 @@ class report_account_sales(osv.osv):
|
|||
)""")
|
||||
report_account_sales()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -160,7 +160,7 @@ class tax_report(report_sxw.rml_parse, common_report_header):
|
|||
i+=1
|
||||
return res
|
||||
|
||||
def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=[], context=None):
|
||||
def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=None, context=None):
|
||||
obj_tc = self.pool.get('account.tax.code')
|
||||
ids = obj_tc.search(self.cr, self.uid, [('parent_id','=',parent),('company_id','=',company_id)], order='sequence', context=context)
|
||||
|
||||
|
@ -171,7 +171,11 @@ class tax_report(report_sxw.rml_parse, common_report_header):
|
|||
res += self._get_codes(based_on, company_id, code.id, level+1, context=context)
|
||||
return res
|
||||
|
||||
def _add_codes(self, based_on, account_list=[], period_list=[], context=None):
|
||||
def _add_codes(self, based_on, account_list=None, period_list=None, context=None):
|
||||
if account_list is None:
|
||||
account_list = []
|
||||
if period_list is None:
|
||||
period_list = []
|
||||
res = []
|
||||
obj_tc = self.pool.get('account.tax.code')
|
||||
for account in account_list:
|
||||
|
|
|
@ -45,4 +45,3 @@ class res_currency_account(osv.osv):
|
|||
res_currency_account()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -71,4 +71,4 @@ class account_invoice_cancel(osv.osv_memory):
|
|||
|
||||
account_invoice_cancel()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -47,4 +47,4 @@ class account_journal_select(osv.osv_memory):
|
|||
|
||||
account_journal_select()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -61,4 +61,4 @@ the bank account\nin the journal definition for reconciliation.'))
|
|||
|
||||
account_move_bank_reconcile()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -38,7 +38,7 @@ class account_move_journal(osv.osv_memory):
|
|||
_defaults = {
|
||||
'target_move': 'all'
|
||||
}
|
||||
def _get_period(self, cr, uid, context={}):
|
||||
def _get_period(self, cr, uid, context=None):
|
||||
"""
|
||||
Return default account period value
|
||||
"""
|
||||
|
|
|
@ -52,4 +52,4 @@ class account_move_line_reconcile_select(osv.osv_memory):
|
|||
|
||||
account_move_line_reconcile_select()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -69,4 +69,4 @@ class account_move_line_select(osv.osv_memory):
|
|||
|
||||
account_move_line_select()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -41,4 +41,4 @@ class account_move_line_unreconcile_select(osv.osv_memory):
|
|||
|
||||
account_move_line_unreconcile_select()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -160,4 +160,4 @@ class account_move_line_reconcile_writeoff(osv.osv_memory):
|
|||
|
||||
account_move_line_reconcile_writeoff()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -41,4 +41,4 @@ class account_state_open(osv.osv_memory):
|
|||
|
||||
account_state_open()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -50,4 +50,4 @@ class account_subscription_generate(osv.osv_memory):
|
|||
|
||||
account_subscription_generate()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -50,4 +50,4 @@ class account_unreconcile_reconcile(osv.osv_memory):
|
|||
|
||||
account_unreconcile_reconcile()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -34,7 +34,7 @@ class crossovered_analytic(report_sxw.rml_parse):
|
|||
})
|
||||
self.base_amount = 0.00
|
||||
|
||||
def find_children(self,ref_ids):
|
||||
def find_children(self, ref_ids):
|
||||
to_return_ids = []
|
||||
final_list = []
|
||||
parent_list = []
|
||||
|
@ -53,7 +53,7 @@ class crossovered_analytic(report_sxw.rml_parse):
|
|||
final_list.extend(set_list)
|
||||
return final_list #to_return_ids[0]
|
||||
|
||||
def set_account(self,cats):
|
||||
def set_account(self, cats):
|
||||
lst = []
|
||||
category = self.pool.get('account.analytic.account').read(self.cr, self.uid, cats)
|
||||
for cat in category:
|
||||
|
@ -62,7 +62,7 @@ class crossovered_analytic(report_sxw.rml_parse):
|
|||
lst.extend(self.set_account(cat['child_ids']))
|
||||
return lst
|
||||
|
||||
def _ref_lines(self,form):
|
||||
def _ref_lines(self, form):
|
||||
result = []
|
||||
res = {}
|
||||
acc_pool = self.pool.get('account.analytic.account')
|
||||
|
@ -112,7 +112,9 @@ class crossovered_analytic(report_sxw.rml_parse):
|
|||
result.append(res)
|
||||
return result
|
||||
|
||||
def _lines(self, form, ids={}):
|
||||
def _lines(self, form, ids=None):
|
||||
if ids is None:
|
||||
ids = {}
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
|
||||
|
|
|
@ -23,4 +23,4 @@ import stock
|
|||
import purchase
|
||||
import invoice
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
|
||||
#class sale_order_line(osv.osv):
|
||||
# _name = 'sale.order.line'
|
||||
# _description = 'Sale Order line'
|
||||
# _inherit = 'sale.order.line'
|
||||
#
|
||||
# def invoice_line_create(self, cr, uid, ids, context={}):
|
||||
# line_ids = super('sale_order_line',self).invoice_line_create(cr, uid, ids, context)
|
||||
# invoice_line_obj = self.pool.get('account.invoice.line')
|
||||
# for line in invoice_line_obj.browse(cr, uid, line_ids):
|
||||
# if line.product_id:
|
||||
# a = line.product_id.product_tmpl_id.property_stock_account_output and line.product_id.product_tmpl_id.property_stock_account_output.id
|
||||
# if not a:
|
||||
# a = line.product_id.categ_id.property_stock_account_output_categ and line.product_id.categ_id.property_stock_account_output_categ.id
|
||||
# if a:
|
||||
# a = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, a)
|
||||
# invoice_line_obj.write(cr, uid, line.id, {'account_id':a})
|
||||
#
|
||||
#sale_order_line()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -75,7 +75,7 @@ class account_asset_asset(osv.osv):
|
|||
_name = 'account.asset.asset'
|
||||
_description = 'Asset'
|
||||
|
||||
def _get_period(self, cr, uid, context={}):
|
||||
def _get_period(self, cr, uid, context=None):
|
||||
periods = self.pool.get('account.period').find(cr, uid)
|
||||
if periods:
|
||||
return periods[0]
|
||||
|
@ -176,7 +176,9 @@ class account_asset_asset(osv.osv):
|
|||
year = depreciation_date.year
|
||||
return True
|
||||
|
||||
def validate(self, cr, uid, ids, context={}):
|
||||
def validate(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
return self.write(cr, uid, ids, {
|
||||
'state':'open'
|
||||
}, context)
|
||||
|
@ -304,7 +306,7 @@ class account_asset_asset(osv.osv):
|
|||
default.update({'depreciation_line_ids': [], 'state': 'draft'})
|
||||
return super(account_asset_asset, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def _compute_entries(self, cr, uid, ids, period_id, context={}):
|
||||
def _compute_entries(self, cr, uid, ids, period_id, context=None):
|
||||
result = []
|
||||
period_obj = self.pool.get('account.period')
|
||||
depreciation_obj = self.pool.get('account.asset.depreciation.line')
|
||||
|
|
|
@ -35,7 +35,9 @@ class analytic_account_budget_report(report_sxw.rml_parse):
|
|||
})
|
||||
self.context = context
|
||||
|
||||
def funct(self, object, form, ids={}, done=None, level=1):
|
||||
def funct(self, object, form, ids=None, done=None, level=1):
|
||||
if ids is None:
|
||||
ids = {}
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not done:
|
||||
|
@ -153,7 +155,7 @@ class analytic_account_budget_report(report_sxw.rml_parse):
|
|||
tot['perc'] = float(tot['prac'] / tot['theo']) * 100
|
||||
return result
|
||||
|
||||
def funct_total(self,form):
|
||||
def funct_total(self, form):
|
||||
result = []
|
||||
res = {}
|
||||
res = {
|
||||
|
@ -167,4 +169,4 @@ class analytic_account_budget_report(report_sxw.rml_parse):
|
|||
|
||||
report_sxw.report_sxw('report.account.analytic.account.budget', 'account.analytic.account', 'addons/account_budget/report/analytic_account_budget_report.rml',parser=analytic_account_budget_report,header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -34,7 +34,9 @@ class budget_report(report_sxw.rml_parse):
|
|||
})
|
||||
self.context = context
|
||||
|
||||
def funct(self, object, form, ids={}, done=None, level=1):
|
||||
def funct(self, object, form, ids=None, done=None, level=1):
|
||||
if ids is None:
|
||||
ids = {}
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not done:
|
||||
|
|
|
@ -37,7 +37,9 @@ class budget_report(report_sxw.rml_parse):
|
|||
})
|
||||
self.context = context
|
||||
|
||||
def funct(self, object, form, ids={}, done=None, level=1):
|
||||
def funct(self, object, form, ids=None, done=None, level=1):
|
||||
if ids is None:
|
||||
ids = {}
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not done:
|
||||
|
|
|
@ -52,4 +52,4 @@ class account_budget_analytic(osv.osv_memory):
|
|||
|
||||
account_budget_analytic()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -53,4 +53,4 @@ class account_budget_crossvered_report(osv.osv_memory):
|
|||
|
||||
account_budget_crossvered_report()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -54,4 +54,4 @@ class account_budget_report(osv.osv_memory):
|
|||
|
||||
account_budget_report()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -23,4 +23,4 @@ import account_followup
|
|||
import wizard
|
||||
import report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -21,4 +21,4 @@
|
|||
|
||||
import account_followup_print
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -209,7 +209,7 @@ class account_followup_print_all(osv.osv_memory):
|
|||
to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': stat_line_id}
|
||||
return {'partner_ids': partner_list, 'to_update': to_update}
|
||||
|
||||
def do_mail(self ,cr, uid, ids, context=None):
|
||||
def do_mail(self, cr, uid, ids, context=None):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
move_obj = self.pool.get('account.move.line')
|
||||
user_obj = self.pool.get('res.users')
|
||||
|
|
|
@ -29,4 +29,4 @@ import account_move_line
|
|||
import account_invoice
|
||||
import report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -50,4 +50,4 @@ class Invoice(osv.osv):
|
|||
|
||||
Invoice()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -26,7 +26,7 @@ from tools.translate import _
|
|||
class account_move_line(osv.osv):
|
||||
_inherit = "account.move.line"
|
||||
|
||||
def amount_to_pay(self, cr, uid, ids, name, arg={}, context=None):
|
||||
def amount_to_pay(self, cr, uid, ids, name, arg=None, context=None):
|
||||
""" Return the amount still to pay regarding all the payemnt orders
|
||||
(excepting cancelled orders)"""
|
||||
if not ids:
|
||||
|
@ -117,4 +117,4 @@ class account_move_line(osv.osv):
|
|||
|
||||
account_move_line()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -139,7 +139,9 @@ class payment_order(osv.osv):
|
|||
wf_service.trg_validate(uid, 'payment.order', ids[0], 'done', cr)
|
||||
return True
|
||||
|
||||
def copy(self, cr, uid, id, default={}, context=None):
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
default.update({
|
||||
'state': 'draft',
|
||||
'line_ids': [],
|
||||
|
|
|
@ -20,4 +20,4 @@
|
|||
##############################################################################
|
||||
|
||||
import payment_order
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -77,7 +77,7 @@ class payment_order(report_sxw.rml_parse):
|
|||
user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
|
||||
return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False
|
||||
|
||||
def _get_account_name(self,bank_id):
|
||||
def _get_account_name(self, bank_id):
|
||||
if bank_id:
|
||||
pool = pooler.get_pool(self.cr.dbname)
|
||||
value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id])
|
||||
|
@ -87,4 +87,4 @@ class payment_order(report_sxw.rml_parse):
|
|||
|
||||
report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="external")
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -23,4 +23,4 @@ import account_payment_order
|
|||
import account_payment_populate_statement
|
||||
import account_payment_pay
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -56,4 +56,4 @@ class account_payment_make_payment(osv.osv_memory):
|
|||
|
||||
account_payment_make_payment()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -120,4 +120,4 @@ class account_payment_populate_statement(osv.osv_memory):
|
|||
|
||||
account_payment_populate_statement()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -22,4 +22,4 @@
|
|||
import account_sequence
|
||||
import account_sequence_installer
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -24,4 +24,4 @@ import invoice
|
|||
import report
|
||||
import wizard
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -849,7 +849,7 @@ class account_voucher(osv.osv):
|
|||
res['account_id'] = account_id
|
||||
return {'value':res}
|
||||
|
||||
def _sel_context(self, cr, uid, voucher_id,context=None):
|
||||
def _sel_context(self, cr, uid, voucher_id, context=None):
|
||||
"""
|
||||
Select the context to use accordingly if it needs to be multicurrency or not.
|
||||
|
||||
|
@ -1275,7 +1275,9 @@ class account_voucher(osv.osv):
|
|||
self.reconcile_send_note(cr, uid, [voucher.id], context=context)
|
||||
return True
|
||||
|
||||
def copy(self, cr, uid, id, default={}, context=None):
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
default.update({
|
||||
'state': 'draft',
|
||||
'number': False,
|
||||
|
|
|
@ -23,4 +23,4 @@ import account_voucher
|
|||
import account_voucher_print
|
||||
import account_voucher_sales_receipt
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -363,7 +363,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
|||
})
|
||||
raise osv.except_osv(error_type, error_msg)
|
||||
|
||||
def anonymize_database(self,cr, uid, ids, context=None):
|
||||
def anonymize_database(self, cr, uid, ids, context=None):
|
||||
"""Sets the 'anonymized' state to defined fields"""
|
||||
|
||||
# create a new history record:
|
||||
|
@ -498,7 +498,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
|||
'target':'new',
|
||||
}
|
||||
|
||||
def reverse_anonymize_database(self,cr, uid, ids, context=None):
|
||||
def reverse_anonymize_database(self, cr, uid, ids, context=None):
|
||||
"""Set the 'clear' state to defined fields"""
|
||||
|
||||
ir_model_fields_anonymization_model = self.pool.get('ir.model.fields.anonymization')
|
||||
|
|
|
@ -202,7 +202,7 @@ class audittrail_objects_proxy(object_proxy):
|
|||
res = value
|
||||
return res
|
||||
|
||||
def create_log_line(self, cr, uid, log_id, model, lines=[]):
|
||||
def create_log_line(self, cr, uid, log_id, model, lines=None):
|
||||
"""
|
||||
Creates lines for changed fields with its old and new values
|
||||
|
||||
|
@ -211,6 +211,8 @@ class audittrail_objects_proxy(object_proxy):
|
|||
@param model: Object which values are being changed
|
||||
@param lines: List of values for line is to be created
|
||||
"""
|
||||
if lines is None:
|
||||
lines = []
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
obj_pool = pool.get(model.model)
|
||||
model_pool = pool.get('ir.model')
|
||||
|
@ -349,9 +351,9 @@ class audittrail_objects_proxy(object_proxy):
|
|||
data[(model.id, resource_id)] = {'text':values_text, 'value': values}
|
||||
return data
|
||||
|
||||
def prepare_audittrail_log_line(self, cr, uid, pool, model, resource_id, method, old_values, new_values, field_list=[]):
|
||||
def prepare_audittrail_log_line(self, cr, uid, pool, model, resource_id, method, old_values, new_values, field_list=None):
|
||||
"""
|
||||
This function compares the old data (i.e before the method was executed) and the new data
|
||||
This function compares the old data (i.e before the method was executed) and the new data
|
||||
(after the method was executed) and returns a structure with all the needed information to
|
||||
log those differences.
|
||||
|
||||
|
@ -375,9 +377,11 @@ class audittrail_objects_proxy(object_proxy):
|
|||
(model.id, resource_id): []
|
||||
}
|
||||
|
||||
The reason why the structure returned is build as above is because when modifying an existing
|
||||
The reason why the structure returned is build as above is because when modifying an existing
|
||||
record, we may have to log a change done in a x2many field of that object
|
||||
"""
|
||||
if field_list is None:
|
||||
field_list = []
|
||||
key = (model.id, resource_id)
|
||||
lines = {
|
||||
key: []
|
||||
|
@ -416,7 +420,7 @@ class audittrail_objects_proxy(object_proxy):
|
|||
lines[key].append(data)
|
||||
return lines
|
||||
|
||||
def process_data(self, cr, uid, pool, res_ids, model, method, old_values={}, new_values={}, field_list=[]):
|
||||
def process_data(self, cr, uid, pool, res_ids, model, method, old_values=None, new_values=None, field_list=None):
|
||||
"""
|
||||
This function processes and iterates recursively to log the difference between the old
|
||||
data (i.e before the method was executed) and the new data and creates audittrail log
|
||||
|
@ -435,6 +439,8 @@ class audittrail_objects_proxy(object_proxy):
|
|||
on specific fields only.
|
||||
:return: True
|
||||
"""
|
||||
if field_list is None:
|
||||
field_list = []
|
||||
# loop on all the given ids
|
||||
for res_id in res_ids:
|
||||
# compare old and new values and get audittrail log lines accordingly
|
||||
|
|
|
@ -38,7 +38,10 @@ Allow users to login through Google OAuth2.
|
|||
'security/ir.model.access.csv'
|
||||
],
|
||||
'js': ['static/src/js/auth_oauth.js'],
|
||||
'css': ['static/lib/zocial/css/zocial.css'],
|
||||
'css': [
|
||||
'static/lib/zocial/css/zocial.css',
|
||||
'static/src/css/auth_oauth.css',
|
||||
],
|
||||
'qweb': ['static/src/xml/auth_oauth.xml'],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
|
|
|
@ -2,6 +2,15 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="provider_openerp" model="auth.oauth.provider">
|
||||
<field name="name">OpenERP Accounts</field>
|
||||
<field name="auth_endpoint">https://accounts.openerp.com/oauth2/auth</field>
|
||||
<field name="scope">userinfo</field>
|
||||
<field name="validation_endpoint">https://accounts.openerp.com/oauth2/tokeninfo</field>
|
||||
<field name="data_endpoint"></field>
|
||||
<field name="css_class">zocial openerp</field>
|
||||
<field name="body">Sign in with OpenERP account</field>
|
||||
</record>
|
||||
<record id="provider_facebook" model="auth.oauth.provider">
|
||||
<field name="name">Facebook Graph</field>
|
||||
<field name="auth_endpoint">https://www.facebook.com/dialog/oauth</field>
|
||||
|
|
|
@ -16,10 +16,13 @@ class OAuthController(openerpweb.Controller):
|
|||
|
||||
@openerpweb.jsonrequest
|
||||
def list_providers(self, req, dbname):
|
||||
registry = openerp.modules.registry.RegistryManager.get(dbname)
|
||||
with registry.cursor() as cr:
|
||||
providers = registry.get('auth.oauth.provider')
|
||||
l = providers.read(cr, SUPERUSER_ID, providers.search(cr, SUPERUSER_ID, [('enabled','=',True)]))
|
||||
try:
|
||||
registry = openerp.modules.registry.RegistryManager.get(dbname)
|
||||
with registry.cursor() as cr:
|
||||
providers = registry.get('auth.oauth.provider')
|
||||
l = providers.read(cr, SUPERUSER_ID, providers.search(cr, SUPERUSER_ID, [('enabled','=',True)]))
|
||||
except Exception:
|
||||
l = []
|
||||
return l
|
||||
|
||||
@openerpweb.httprequest
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import logging
|
||||
|
||||
import urllib
|
||||
import urlparse
|
||||
import urllib2
|
||||
import simplejson
|
||||
|
||||
|
@ -20,8 +21,11 @@ class res_users(osv.Model):
|
|||
}
|
||||
|
||||
def auth_oauth_rpc(self, cr, uid, endpoint, access_token, context=None):
|
||||
params = urllib.urlencode({'access_token':access_token})
|
||||
url = endpoint + '?' + params
|
||||
params = urllib.urlencode({ 'access_token': access_token })
|
||||
if urlparse.urlparse(endpoint)[4]:
|
||||
url = endpoint + '&' + params
|
||||
else:
|
||||
url = endpoint + '?' + params
|
||||
f = urllib2.urlopen(url)
|
||||
response = f.read()
|
||||
return simplejson.loads(response)
|
||||
|
@ -38,26 +42,32 @@ class res_users(osv.Model):
|
|||
validation = self.auth_oauth_rpc(cr, uid, p.validation_endpoint, access_token)
|
||||
if validation.get("error"):
|
||||
raise openerp.exceptions.AccessDenied
|
||||
login = validation['email']
|
||||
if p.data_endpoint:
|
||||
data = self.auth_oauth_rpc(cr, uid, p.data_endpoint, access_token)
|
||||
validation.update(data)
|
||||
# required
|
||||
oauth_uid = validation['user_id']
|
||||
name = self.auth_oauth_rpc(cr, uid, p.data_endpoint, access_token)['name']
|
||||
|
||||
credentials = (cr.dbname, login, access_token)
|
||||
if not oauth_uid:
|
||||
raise openerp.exceptions.AccessDenied
|
||||
email = validation.get('email', 'provider_%d_user_%d' % (p.id, oauth_uid))
|
||||
# optional
|
||||
name = validation.get('name', email)
|
||||
res = self.search(cr, uid, [("oauth_uid", "=", oauth_uid)])
|
||||
if res:
|
||||
self.write(cr, uid, res[0], {'oauth_access_token':access_token})
|
||||
self.write(cr, uid, res[0], { 'oauth_access_token': access_token })
|
||||
else:
|
||||
# New user
|
||||
new_user = {
|
||||
'name': name,
|
||||
'login': login,
|
||||
'user_email': login,
|
||||
'oauth_provider_id': 1,
|
||||
'login': email,
|
||||
'user_email': email,
|
||||
'oauth_provider_id': p.id,
|
||||
'oauth_uid': oauth_uid,
|
||||
'oauth_access_token': access_token,
|
||||
'active': True,
|
||||
}
|
||||
self.auth_signup_create(cr, uid, new_user)
|
||||
credentials = (cr.dbname, email, access_token)
|
||||
return credentials
|
||||
|
||||
def check_credentials(self, cr, uid, password):
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
.openerp .oe_application .zocial {
|
||||
font: white;
|
||||
}
|
||||
|
||||
.openerp .zocial.openerp:before {
|
||||
content: "\E02E";
|
||||
font-style: italic;
|
||||
text-shadow: 0 1px 1px black;
|
||||
}
|
||||
|
||||
.openerp a.zocial.openerp {
|
||||
float: right;
|
||||
border: 1px solid #222222;
|
||||
color: white;
|
||||
margin: 0;
|
||||
background-color: #b92020;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#b92020), to(#600606));
|
||||
background-image: -webkit-linear-gradient(top, #b92020, #600606);
|
||||
background-image: -moz-linear-gradient(top, #b92020, #600606);
|
||||
background-image: -ms-linear-gradient(top, #b92020, #600606);
|
||||
background-image: -o-linear-gradient(top, #b92020, #600606);
|
||||
background-image: linear-gradient(to bottom, #b92020, #600606);
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
|
||||
text-shadow: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.openerp .oe_login .oe_oauth_provider_login_button {
|
||||
margin-top: 4px;
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
openerp.auth_oauth = function(instance) {
|
||||
var QWeb = instance.web.qweb;
|
||||
|
||||
instance.web.Login = instance.web.Login.extend({
|
||||
instance.web.Login.include({
|
||||
start: function(parent, params) {
|
||||
var self = this;
|
||||
var d = this._super.apply(this, arguments);
|
||||
this.$el.on('click', 'a.zocial', this.on_oauth_sign_in);
|
||||
this.oauth_providers = [];
|
||||
|
@ -11,7 +12,13 @@ openerp.auth_oauth = function(instance) {
|
|||
} else if(this.params.oauth_error === 2) {
|
||||
this.do_warn("Authentication error","");
|
||||
}
|
||||
return d.then(this.do_oauth_load);
|
||||
return d.then(this.do_oauth_load).fail(function() {
|
||||
self.do_oauth_load([]);
|
||||
});
|
||||
},
|
||||
on_db_loaded: function(result) {
|
||||
this._super.apply(this, arguments);
|
||||
this.$("form [name=db]").change(this.do_oauth_load);
|
||||
},
|
||||
do_oauth_load: function() {
|
||||
var db = this.$("form [name=db]").val();
|
||||
|
@ -21,6 +28,7 @@ openerp.auth_oauth = function(instance) {
|
|||
},
|
||||
on_oauth_loaded: function(result) {
|
||||
this.oauth_providers = result;
|
||||
this.$('.oe_oauth_provider_login_button').remove();
|
||||
var buttons = QWeb.render("auth_oauth.Login.button",{"widget":this});
|
||||
this.$(".oe_login_pane form ul").after(buttons);
|
||||
},
|
||||
|
@ -33,7 +41,7 @@ openerp.auth_oauth = function(instance) {
|
|||
var state_object = {
|
||||
d: dbname,
|
||||
p: p.id
|
||||
}
|
||||
};
|
||||
var state = JSON.stringify(state_object);
|
||||
var params = {
|
||||
response_type: 'token',
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="auth_oauth.Login.button">
|
||||
<t t-foreach="widget.oauth_providers" t-as="p">
|
||||
<a href="#" t-att-class="p.css_class" t-att-data-index="p_index"><t t-esc="p.body"/></a>
|
||||
<br/>
|
||||
<a href="#" t-attf-class="oe_oauth_provider_login_button #{p.css_class}" t-att-data-index="p_index"><t t-esc="p.body"/></a>
|
||||
</t>
|
||||
</t>
|
||||
</templates>
|
||||
|
|
|
@ -47,7 +47,9 @@ import logging
|
|||
magic_md5 = '$1$'
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
def gen_salt( length=8, symbols=ascii_letters + digits ):
|
||||
def gen_salt( length=8, symbols=None):
|
||||
if symbols is None:
|
||||
symbols = ascii_letters + digits
|
||||
seed()
|
||||
return ''.join( sample( symbols, length ) )
|
||||
|
||||
|
|
|
@ -7,14 +7,14 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2009-04-20 10:04+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"PO-Revision-Date: 2012-10-01 11:08+0000\n"
|
||||
"Last-Translator: Els Van Vossel (Agaplan) <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-28 05:58+0000\n"
|
||||
"X-Generator: Launchpad (build 15864)\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-02 05:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16061)\n"
|
||||
|
||||
#. module: base_iban
|
||||
#: constraint:res.partner.bank:0
|
||||
|
@ -23,22 +23,27 @@ msgid ""
|
|||
"Please define BIC/Swift code on bank for bank type IBAN Account to make "
|
||||
"valid payments"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Definieer een BIC/Swift-code voor IBAN-rekeningen om geldige betalingen te "
|
||||
"maken."
|
||||
|
||||
#. module: base_iban
|
||||
#: code:addons/base_iban/base_iban.py:139
|
||||
#, python-format
|
||||
msgid "This IBAN does not pass the validation check, please verify it"
|
||||
msgstr ""
|
||||
"Dit IBAN-nummer voldoet niet aan de controle. Gelieve het nummer na te "
|
||||
"kijken."
|
||||
|
||||
#. module: base_iban
|
||||
#: model:res.partner.bank.type,format_layout:base_iban.bank_iban
|
||||
msgid "%(bank_name)s: IBAN %(acc_number)s - BIC %(bank_bic)s"
|
||||
msgstr ""
|
||||
msgstr "%(bank_name)s: IBAN %(acc_number)s - BIC %(bank_bic)s"
|
||||
|
||||
#. module: base_iban
|
||||
#: model:res.partner.bank.type.field,name:base_iban.bank_swift_field
|
||||
msgid "bank_bic"
|
||||
msgstr ""
|
||||
msgstr "bank_bic"
|
||||
|
||||
#. module: base_iban
|
||||
#: model:res.partner.bank.type.field,name:base_iban.bank_zip_field
|
||||
|
@ -67,6 +72,8 @@ msgid ""
|
|||
"The IBAN does not seem to be correct. You should have entered something like "
|
||||
"this %s"
|
||||
msgstr ""
|
||||
"Dit IBAN-nummer lijkt niet juist te zijn. U dient een nummer in te geven in "
|
||||
"dit formaat %s."
|
||||
|
||||
#. module: base_iban
|
||||
#: field:res.partner.bank,iban:0
|
||||
|
@ -77,7 +84,7 @@ msgstr "IBAN"
|
|||
#: code:addons/base_iban/base_iban.py:140
|
||||
#, python-format
|
||||
msgid "The IBAN is invalid, it should begin with the country code"
|
||||
msgstr ""
|
||||
msgstr "Dit IBAN-nummer is ongeldig; het moet beginnen met de landcode."
|
||||
|
||||
#. module: base_iban
|
||||
#: model:res.partner.bank.type,name:base_iban.bank_iban
|
||||
|
@ -87,7 +94,7 @@ msgstr "IBAN-rekening"
|
|||
#. module: base_iban
|
||||
#: constraint:res.partner.bank:0
|
||||
msgid "The RIB and/or IBAN is not valid"
|
||||
msgstr ""
|
||||
msgstr "RIB en/of IBAN is niet geldig."
|
||||
|
||||
#, python-format
|
||||
#~ msgid "The IBAN is invalid, It should begin with the country code"
|
||||
|
|
|
@ -79,4 +79,4 @@ report_sxw.report_sxw('report.ir.module.reference.graph', 'ir.module.module',
|
|||
'addons/base_module_doc_rst/report/ir_module_reference_graph.rml',
|
||||
parser=ir_module_reference_print_graph, header=False)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -127,7 +127,7 @@ class base_module_record_objects(osv.osv_memory):
|
|||
_name = 'base.module.record.objects'
|
||||
_description = "Base Module Record Objects"
|
||||
|
||||
def inter_call(self,cr,uid,data,context=None):
|
||||
def inter_call(self, cr, uid, data, context=None):
|
||||
res=base_module_save._create_module(self, cr, uid, data, context)
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'module_create_form_view')], context=context)
|
||||
|
|
|
@ -42,11 +42,11 @@ import copy
|
|||
|
||||
class DomApiGeneral:
|
||||
"""General DOM API utilities."""
|
||||
def __init__(self,content_string="",file=""):
|
||||
def __init__(self, content_string="", file=""):
|
||||
self.content_string = content_string
|
||||
self.re_digits = re.compile(r"(.*?\d)(pt|cm|mm|inch|in)")
|
||||
|
||||
def _unitTuple(self,string):
|
||||
def _unitTuple(self, string):
|
||||
"""Split values and units to a tuple."""
|
||||
temp = self.re_digits.findall(string)
|
||||
if not temp:
|
||||
|
@ -54,13 +54,15 @@ class DomApiGeneral:
|
|||
else:
|
||||
return (temp[0])
|
||||
|
||||
def stringPercentToFloat(self,string):
|
||||
def stringPercentToFloat(self, string):
|
||||
temp = string.replace("""%""","")
|
||||
return float(temp)/100
|
||||
|
||||
def findChildrenByName(self,parent,name,attr_dict={}):
|
||||
def findChildrenByName(self, parent, name, attr_dict=None):
|
||||
"""Helper functions. Does not work recursively.
|
||||
Optional: also test for certain attribute/value pairs."""
|
||||
if attr_dict is None:
|
||||
attr_dict = {}
|
||||
children = []
|
||||
for c in parent.childNodes:
|
||||
if c.nodeType == c.ELEMENT_NODE and c.nodeName == name:
|
||||
|
@ -70,7 +72,7 @@ class DomApiGeneral:
|
|||
else:
|
||||
return self._selectForAttributes(nodelist=children,attr_dict=attr_dict)
|
||||
|
||||
def _selectForAttributes(self,nodelist,attr_dict):
|
||||
def _selectForAttributes(self, nodelist, attr_dict):
|
||||
"Helper function."""
|
||||
selected_nodes = []
|
||||
for n in nodelist:
|
||||
|
@ -83,7 +85,7 @@ class DomApiGeneral:
|
|||
selected_nodes.append(n)
|
||||
return selected_nodes
|
||||
|
||||
def _stringToTuple(self,s):
|
||||
def _stringToTuple(self, s):
|
||||
"""Helper function."""
|
||||
try:
|
||||
temp = string.split(s,",")
|
||||
|
@ -91,13 +93,13 @@ class DomApiGeneral:
|
|||
except:
|
||||
return None
|
||||
|
||||
def _tupleToString(self,t):
|
||||
def _tupleToString(self, t):
|
||||
try:
|
||||
return self.openOfficeStringUtf8("%s,%s" % (t[0],t[1]))
|
||||
except:
|
||||
return None
|
||||
|
||||
def _lengthToFloat(self,value):
|
||||
def _lengthToFloat(self, value):
|
||||
v = value
|
||||
if not self.re_digits.search(v):
|
||||
return v
|
||||
|
@ -113,7 +115,7 @@ class DomApiGeneral:
|
|||
except:
|
||||
return v
|
||||
|
||||
def openOfficeStringUtf8(self,string):
|
||||
def openOfficeStringUtf8(self, string):
|
||||
if type(string) == unicode:
|
||||
return string.encode("utf-8")
|
||||
tempstring = unicode(string,"cp1252").encode("utf-8")
|
||||
|
@ -121,7 +123,7 @@ class DomApiGeneral:
|
|||
|
||||
class DomApi(DomApiGeneral):
|
||||
"""This class provides a DOM-API for XML-Files from an SXW-Archive."""
|
||||
def __init__(self,xml_content,xml_styles):
|
||||
def __init__(self, xml_content, xml_styles):
|
||||
DomApiGeneral.__init__(self)
|
||||
self.content_dom = xml.dom.minidom.parseString(xml_content)
|
||||
self.styles_dom = xml.dom.minidom.parseString(xml_styles)
|
||||
|
@ -145,7 +147,7 @@ class DomApi(DomApiGeneral):
|
|||
for s in self.style_dict.keys():
|
||||
self.style_properties_dict[s] = self.getStylePropertiesDict(s)
|
||||
|
||||
def updateWithPercents(self,dict,updatedict):
|
||||
def updateWithPercents(self, dict, updatedict):
|
||||
"""Sometimes you find values like "115%" in the style hierarchy."""
|
||||
if not updatedict:
|
||||
# no style hierarchies for this style? =>
|
||||
|
@ -244,7 +246,7 @@ class DomApi(DomApiGeneral):
|
|||
def toxml(self):
|
||||
return self.content_dom.toxml(encoding="utf-8")
|
||||
|
||||
def getStylePropertiesDict(self,style_name):
|
||||
def getStylePropertiesDict(self, style_name):
|
||||
res = {}
|
||||
|
||||
if self.style_dict[style_name].hasAttribute("style:parent-style-name"):
|
||||
|
@ -265,7 +267,7 @@ class PyOpenOffice(object):
|
|||
self.save_pict = save_pict
|
||||
self.images = {}
|
||||
|
||||
def oo_read(self,fname):
|
||||
def oo_read(self, fname):
|
||||
z = zipfile.ZipFile(fname,"r")
|
||||
content = z.read('content.xml')
|
||||
style = z.read('styles.xml')
|
||||
|
@ -281,7 +283,7 @@ class PyOpenOffice(object):
|
|||
z.close()
|
||||
return content,style
|
||||
|
||||
def oo_replace(self,content):
|
||||
def oo_replace(self, content):
|
||||
regex = [
|
||||
(r"<para[^>]*/>", ""),
|
||||
(r"<para(.*)>(.*?)<text:line-break[^>]*/>", "<para$1>$2</para><para$1>"),
|
||||
|
@ -290,7 +292,7 @@ class PyOpenOffice(object):
|
|||
content = re.sub(key, val, content)
|
||||
return content
|
||||
|
||||
def unpackNormalize(self,sourcefile):
|
||||
def unpackNormalize(self, sourcefile):
|
||||
c,s = self.oo_read(sourcefile)
|
||||
c = self.oo_replace(c)
|
||||
dom = DomApi(c,s)
|
||||
|
|
|
@ -52,7 +52,7 @@ if __name__<>'package':
|
|||
from lib.gui import *
|
||||
|
||||
class About(unohelper.Base, XJobExecutor):
|
||||
def __init__(self,ctx):
|
||||
def __init__(self, ctx):
|
||||
self.ctx = ctx
|
||||
self.module = "openerp_report"
|
||||
self.version = "0.1"
|
||||
|
|
|
@ -64,7 +64,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
'PDF' : 'pdf',
|
||||
'OpenOffice': 'sxw',
|
||||
}
|
||||
def __init__(self,ctx):
|
||||
def __init__(self, ctx):
|
||||
self.ctx = ctx
|
||||
self.module = "openerp_report"
|
||||
self.version = "0.1"
|
||||
|
@ -132,7 +132,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
self.win.addButton('btnCancel', -2 - 27 , -5 , 30 , 15, 'Cancel' ,actionListenerProc = self.btnCancel_clicked )
|
||||
self.win.doModalDialog("lstResourceType", self.Kind.keys()[0])
|
||||
|
||||
def btnSearch_clicked( self, oActionEvent ):
|
||||
def btnSearch_clicked(self, oActionEvent):
|
||||
modelSelectedItem = self.win.getListBoxSelectedItem("lstmodel")
|
||||
if modelSelectedItem == "":
|
||||
return
|
||||
|
@ -151,7 +151,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
for result in self.aSearchResult:
|
||||
self.lstResource.addItem(result[1],result[0])
|
||||
|
||||
def _send_attachment( self, name, data, res_model, res_id ):
|
||||
def _send_attachment(self, name, data, res_model, res_id):
|
||||
desktop = getDesktop()
|
||||
oDoc2 = desktop.getCurrentComponent()
|
||||
docinfo = oDoc2.getDocumentInfo()
|
||||
|
@ -166,7 +166,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
|
||||
return self.sock.execute( database, uid, self.password, 'ir.attachment', 'create', params )
|
||||
|
||||
def send_attachment( self, model, resource_id ):
|
||||
def send_attachment(self, model, resource_id):
|
||||
desktop = getDesktop()
|
||||
oDoc2 = desktop.getCurrentComponent()
|
||||
docinfo = oDoc2.getDocumentInfo()
|
||||
|
@ -187,7 +187,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
data = read_data_from_file( get_absolute_file_path( url ) )
|
||||
return self._send_attachment( os.path.basename( url ), data, model, resource_id )
|
||||
|
||||
def btnOkWithoutInformation_clicked( self, oActionEvent ):
|
||||
def btnOkWithoutInformation_clicked(self, oActionEvent):
|
||||
desktop = getDesktop()
|
||||
oDoc2 = desktop.getCurrentComponent()
|
||||
docinfo = oDoc2.getDocumentInfo()
|
||||
|
@ -199,7 +199,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
res = self.send_attachment( docinfo.getUserFieldValue(3), docinfo.getUserFieldValue(2) )
|
||||
self.win.endExecute()
|
||||
|
||||
def btnOkWithInformation_clicked(self,oActionEvent):
|
||||
def btnOkWithInformation_clicked(self, oActionEvent):
|
||||
if self.win.getListBoxSelectedItem("lstResourceType") == "":
|
||||
ErrorDialog( "You have to select a resource type.", "", "Selection Error." )
|
||||
return
|
||||
|
@ -221,7 +221,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
res = self.send_attachment( self.dModel[self.win.getListBoxSelectedItem('lstmodel')], resourceid )
|
||||
self.win.endExecute()
|
||||
|
||||
def btnCancel_clicked( self, oActionEvent ):
|
||||
def btnCancel_clicked(self, oActionEvent):
|
||||
self.win.endExecute()
|
||||
|
||||
def doc2pdf(self, strFile):
|
||||
|
@ -262,7 +262,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
# Can be None if len(strFilterSubName) <= 0
|
||||
return filename
|
||||
|
||||
def _MakePropertyValue(self, cName = "", uValue = u"" ):
|
||||
def _MakePropertyValue(self, cName="", uValue=u""):
|
||||
oPropertyValue = createUnoStruct( "com.sun.star.beans.PropertyValue" )
|
||||
if cName:
|
||||
oPropertyValue.Name = cName
|
||||
|
|
|
@ -59,7 +59,7 @@ if __name__<>"package":
|
|||
database="test"
|
||||
|
||||
class Change( unohelper.Base, XJobExecutor ):
|
||||
def __init__(self,ctx):
|
||||
def __init__(self, ctx):
|
||||
self.ctx = ctx
|
||||
self.module = "openerp_report"
|
||||
self.version = "0.1"
|
||||
|
@ -107,7 +107,7 @@ class Change( unohelper.Base, XJobExecutor ):
|
|||
self.lstProtocol.addItem(i,self.lstProtocol.getItemCount() )
|
||||
self.win.doModalDialog( "lstProtocol", protocol)
|
||||
|
||||
def btnNext_clicked(self,oActionEvent):
|
||||
def btnNext_clicked(self, oActionEvent):
|
||||
global url
|
||||
aVal=''
|
||||
#aVal= Fetature used
|
||||
|
|
|
@ -3,31 +3,31 @@
|
|||
# Portions of this file are under the following copyright and license:
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2003-2004 Danny Brewer
|
||||
# d29583@groovegarden.com
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
# Copyright (c) 2003-2004 Danny Brewer
|
||||
# d29583@groovegarden.com
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
#
|
||||
#
|
||||
# and other portions are under the following copyright and license:
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution>..
|
||||
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
|
||||
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
|
@ -63,7 +63,7 @@ if __name__<>"package":
|
|||
|
||||
class ConvertBracesToField( unohelper.Base, XJobExecutor ):
|
||||
|
||||
def __init__(self,ctx):
|
||||
def __init__(self, ctx):
|
||||
|
||||
self.ctx = ctx
|
||||
self.module = "openerp_report"
|
||||
|
@ -198,7 +198,7 @@ class ConvertBracesToField( unohelper.Base, XJobExecutor ):
|
|||
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
self.logobj.log_write('ConvertBraceToField', LOG_ERROR, info)
|
||||
|
||||
def getRes(self,sock,sObject,sVar):
|
||||
def getRes(self, sock, sObject, sVar):
|
||||
desktop=getDesktop()
|
||||
doc =desktop.getCurrentComponent()
|
||||
docinfo=doc.getDocumentInfo()
|
||||
|
@ -215,7 +215,9 @@ class ConvertBracesToField( unohelper.Base, XJobExecutor ):
|
|||
sObject = self.getRes(sock,res[myval]['relation'], sVar[sVar.find("/")+1:])
|
||||
return sObject
|
||||
|
||||
def getBraces(self,aReportSyntex=[]):
|
||||
def getBraces(self, aReportSyntex=None):
|
||||
if aReportSyntex is None:
|
||||
aReportSyntex = []
|
||||
desktop=getDesktop()
|
||||
doc = desktop.getCurrentComponent()
|
||||
aSearchString=[]
|
||||
|
|
|
@ -57,7 +57,7 @@ if __name__<>"package":
|
|||
uid = 3
|
||||
|
||||
class ConvertFieldsToBraces( unohelper.Base, XJobExecutor ):
|
||||
def __init__(self,ctx):
|
||||
def __init__(self, ctx):
|
||||
self.ctx = ctx
|
||||
self.module = "openerp_report"
|
||||
self.version = "0.1"
|
||||
|
|
|
@ -67,7 +67,7 @@ if __name__<>"package":
|
|||
|
||||
|
||||
class ExportToRML( unohelper.Base, XJobExecutor ):
|
||||
def __init__(self,ctx):
|
||||
def __init__(self, ctx):
|
||||
self.ctx = ctx
|
||||
self.module = "openerp_report"
|
||||
self.version = "0.1"
|
||||
|
|
|
@ -57,7 +57,7 @@ if __name__<>"package":
|
|||
uid = 3
|
||||
|
||||
class Expression(unohelper.Base, XJobExecutor ):
|
||||
def __init__(self,sExpression="",sName="", bFromModify=False):
|
||||
def __init__(self, sExpression="", sName="", bFromModify=False):
|
||||
LoginTest()
|
||||
if not loginstatus and __name__=="package":
|
||||
exit(1)
|
||||
|
@ -75,7 +75,7 @@ class Expression(unohelper.Base, XJobExecutor ):
|
|||
self.win.doModalDialog("",None)
|
||||
|
||||
|
||||
def btnOk_clicked( self, oActionEvent ):
|
||||
def btnOk_clicked(self, oActionEvent):
|
||||
desktop=getDesktop()
|
||||
doc = desktop.getCurrentComponent()
|
||||
text = doc.Text
|
||||
|
@ -105,7 +105,7 @@ class Expression(unohelper.Base, XJobExecutor ):
|
|||
else:
|
||||
ErrorDialog("Please fill appropriate data in Name field or in Expression field.")
|
||||
|
||||
def btnCancel_clicked( self, oActionEvent ):
|
||||
def btnCancel_clicked(self, oActionEvent):
|
||||
self.win.endExecute()
|
||||
|
||||
if __name__<>"package" and __name__=="__main__":
|
||||
|
|
|
@ -64,7 +64,7 @@ if __name__<>"package":
|
|||
|
||||
|
||||
class Fields(unohelper.Base, XJobExecutor ):
|
||||
def __init__(self,sVariable="",sFields="",sDisplayName="",bFromModify=False):
|
||||
def __init__(self, sVariable="", sFields="", sDisplayName="", bFromModify=False):
|
||||
LoginTest()
|
||||
if not loginstatus and __name__=="package":
|
||||
exit(1)
|
||||
|
@ -177,7 +177,7 @@ class Fields(unohelper.Base, XJobExecutor ):
|
|||
ErrorDialog("Please insert user define field Field-1 or Field-4","Just go to File->Properties->User Define \nField-1 E.g. http://localhost:8069 \nOR \nField-4 E.g. account.invoice")
|
||||
self.win.endExecute()
|
||||
|
||||
def lstbox_selected(self,oItemEvent):
|
||||
def lstbox_selected(self, oItemEvent):
|
||||
try:
|
||||
|
||||
desktop=getDesktop()
|
||||
|
@ -200,7 +200,7 @@ class Fields(unohelper.Base, XJobExecutor ):
|
|||
if self.bModify:
|
||||
self.win.setEditText("txtUName",self.sGDisplayName)
|
||||
|
||||
def getRes(self,sock ,sObject,sVar):
|
||||
def getRes(self, sock, sObject, sVar):
|
||||
desktop=getDesktop()
|
||||
doc =desktop.getCurrentComponent()
|
||||
docinfo=doc.getDocumentInfo()
|
||||
|
@ -219,7 +219,7 @@ class Fields(unohelper.Base, XJobExecutor ):
|
|||
else:
|
||||
return sObject
|
||||
|
||||
def cmbVariable_selected(self,oItemEvent):
|
||||
def cmbVariable_selected(self, oItemEvent):
|
||||
if self.count > 0 :
|
||||
try:
|
||||
desktop=getDesktop()
|
||||
|
@ -246,7 +246,7 @@ class Fields(unohelper.Base, XJobExecutor ):
|
|||
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
self.logobj.log_write('Fields', LOG_ERROR, info)
|
||||
|
||||
def btnOk_clicked( self, oActionEvent ):
|
||||
def btnOk_clicked(self, oActionEvent):
|
||||
desktop=getDesktop()
|
||||
doc = desktop.getCurrentComponent()
|
||||
cursor = doc.getCurrentController().getViewCursor()
|
||||
|
@ -281,7 +281,7 @@ class Fields(unohelper.Base, XJobExecutor ):
|
|||
else:
|
||||
ErrorDialog("Please fill appropriate data in Name field \nor select particular value from the list of fields.")
|
||||
|
||||
def btnCancel_clicked( self, oActionEvent ):
|
||||
def btnCancel_clicked(self, oActionEvent):
|
||||
self.win.endExecute()
|
||||
|
||||
if __name__<>"package" and __name__=="__main__":
|
||||
|
|
|
@ -65,7 +65,7 @@ if __name__<>'package':
|
|||
uid = 3
|
||||
|
||||
class ModifyExistingReport(unohelper.Base, XJobExecutor):
|
||||
def __init__(self,ctx):
|
||||
def __init__(self, ctx):
|
||||
self.ctx = ctx
|
||||
self.module = "openerp_report"
|
||||
self.version = "0.1"
|
||||
|
@ -177,10 +177,10 @@ class ModifyExistingReport(unohelper.Base, XJobExecutor):
|
|||
|
||||
self.win.endExecute()
|
||||
|
||||
def btnCancel_clicked( self, oActionEvent ):
|
||||
def btnCancel_clicked(self, oActionEvent):
|
||||
self.win.endExecute()
|
||||
|
||||
def btnDelete_clicked( self, oActionEvent ):
|
||||
def btnDelete_clicked(self, oActionEvent):
|
||||
desktop=getDesktop()
|
||||
doc = desktop.getCurrentComponent()
|
||||
docinfo=doc.getDocumentInfo()
|
||||
|
|
|
@ -66,7 +66,7 @@ if __name__<>"package":
|
|||
#
|
||||
#
|
||||
class NewReport(unohelper.Base, XJobExecutor):
|
||||
def __init__(self,ctx):
|
||||
def __init__(self, ctx):
|
||||
self.ctx = ctx
|
||||
self.module = "openerp_report"
|
||||
self.version = "0.1"
|
||||
|
@ -99,7 +99,7 @@ class NewReport(unohelper.Base, XJobExecutor):
|
|||
self.win.addButton('btnCancel',-2 - 70 - 5 ,-5, 35,15,'Cancel' ,actionListenerProc = self.btnCancel_clicked )
|
||||
self.win.doModalDialog("",None)
|
||||
|
||||
def btnOk_clicked(self,oActionEvent):
|
||||
def btnOk_clicked(self, oActionEvent):
|
||||
desktop=getDesktop()
|
||||
doc = desktop.getCurrentComponent()
|
||||
docinfo=doc.getDocumentInfo()
|
||||
|
@ -107,7 +107,7 @@ class NewReport(unohelper.Base, XJobExecutor):
|
|||
self.logobj.log_write('Module Name',LOG_INFO, ':Module use in creating a report %s using database %s' % (self.aModuleName[self.lstModule.getSelectedItemPos()], database))
|
||||
self.win.endExecute()
|
||||
|
||||
def btnCancel_clicked( self, oActionEvent ):
|
||||
def btnCancel_clicked(self, oActionEvent):
|
||||
self.win.endExecute()
|
||||
|
||||
if __name__<>"package" and __name__=="__main__":
|
||||
|
|
|
@ -64,7 +64,7 @@ if __name__<>"package":
|
|||
|
||||
#class RepeatIn:
|
||||
class RepeatIn( unohelper.Base, XJobExecutor ):
|
||||
def __init__(self,sObject="",sVariable="",sFields="",sDisplayName="",bFromModify=False):
|
||||
def __init__(self, sObject="", sVariable="", sFields="", sDisplayName="", bFromModify=False):
|
||||
# Interface Design
|
||||
LoginTest()
|
||||
self.logobj=Logger()
|
||||
|
@ -204,7 +204,7 @@ class RepeatIn( unohelper.Base, XJobExecutor ):
|
|||
ErrorDialog("Please Select Appropriate module" ,"Create new report from: \nOpenERP -> Open a New Report")
|
||||
self.win.endExecute()
|
||||
|
||||
def lstbox_selected(self,oItemEvent):
|
||||
def lstbox_selected(self, oItemEvent):
|
||||
sItem=self.win.getListBoxSelectedItem("lstFields")
|
||||
sMain=self.aListRepeatIn[self.win.getListBoxSelectedItemPos("lstFields")]
|
||||
|
||||
|
@ -215,7 +215,7 @@ class RepeatIn( unohelper.Base, XJobExecutor ):
|
|||
self.win.setEditText("txtName",sMain[sMain.rfind("/")+1:])
|
||||
self.win.setEditText("txtUName","|-."+sItem[sItem.rfind("/")+1:]+".-|")
|
||||
|
||||
def cmbVariable_selected(self,oItemEvent):
|
||||
def cmbVariable_selected(self, oItemEvent):
|
||||
|
||||
if self.count > 0 :
|
||||
|
||||
|
@ -290,7 +290,7 @@ class RepeatIn( unohelper.Base, XJobExecutor ):
|
|||
else:
|
||||
ErrorDialog("Please fill appropriate data in Object Field or Name field \nor select particular value from the list of fields.")
|
||||
|
||||
def btnCancel_clicked( self, oActionEvent ):
|
||||
def btnCancel_clicked(self, oActionEvent):
|
||||
self.win.endExecute()
|
||||
|
||||
if __name__<>"package" and __name__=="__main__":
|
||||
|
|
|
@ -72,7 +72,7 @@ class SendtoServer(unohelper.Base, XJobExecutor):
|
|||
'HTML' : 'html'
|
||||
}
|
||||
|
||||
def __init__(self,ctx):
|
||||
def __init__(self, ctx):
|
||||
self.ctx = ctx
|
||||
self.module = "openerp_report"
|
||||
self.version = "0.1"
|
||||
|
@ -136,10 +136,10 @@ class SendtoServer(unohelper.Base, XJobExecutor):
|
|||
|
||||
self.win.doModalDialog("lstResourceType", self.Kind.keys()[0])
|
||||
|
||||
def lstbox_selected(self,oItemEvent):
|
||||
def lstbox_selected(self, oItemEvent):
|
||||
pass
|
||||
|
||||
def btnCancel_clicked( self, oActionEvent ):
|
||||
def btnCancel_clicked(self, oActionEvent):
|
||||
self.win.endExecute()
|
||||
|
||||
def btnOk_clicked(self, oActionEvent):
|
||||
|
@ -221,7 +221,7 @@ class SendtoServer(unohelper.Base, XJobExecutor):
|
|||
id=self.sock.execute(database, uid, self.password, 'ir.actions.report.xml' ,'create', params)
|
||||
return id
|
||||
|
||||
def getInverseFieldsRecord(self,nVal):
|
||||
def getInverseFieldsRecord(self, nVal):
|
||||
desktop=getDesktop()
|
||||
doc = desktop.getCurrentComponent()
|
||||
count=0
|
||||
|
|
|
@ -59,7 +59,7 @@ if __name__<>"package":
|
|||
database="test"
|
||||
|
||||
class ServerParameter( unohelper.Base, XJobExecutor ):
|
||||
def __init__(self, aVal= None, sURL=""):
|
||||
def __init__(self, aVal=None, sURL=""):
|
||||
self.module = "openerp_report"
|
||||
self.version = "0.1"
|
||||
desktop=getDesktop()
|
||||
|
@ -116,8 +116,7 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
|
|||
|
||||
#self.win.doModalDialog("lstDatabase",docinfo.getUserFieldValue(2))
|
||||
|
||||
def btnOk_clicked(self,oActionEvent):
|
||||
|
||||
def btnOk_clicked(self, oActionEvent):
|
||||
sLogin=self.win.getEditText("txtLoginName")
|
||||
sPassword=self.win.getEditText("txtPassword")
|
||||
global url
|
||||
|
@ -157,11 +156,10 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
|
|||
self.logobj.log_write('successful login',LOG_INFO, ': successful login from %s using database %s' % (sLogin, sDatabase))
|
||||
self.win.endExecute()
|
||||
|
||||
|
||||
def btnCancel_clicked( self, oActionEvent ):
|
||||
def btnCancel_clicked(self, oActionEvent):
|
||||
self.win.endExecute()
|
||||
|
||||
def btnPrevious_clicked(self,oActionEvent):
|
||||
def btnPrevious_clicked(self, oActionEvent):
|
||||
self.win.endExecute()
|
||||
Change(None)
|
||||
self.win.endExecute()
|
||||
|
@ -172,5 +170,4 @@ if __name__<>"package" and __name__=="__main__":
|
|||
elif __name__=="package":
|
||||
g_ImplementationHelper.addImplementation( ServerParameter, "org.openoffice.openerp.report.serverparam", ("com.sun.star.task.Job",),)
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -61,7 +61,7 @@ if __name__<>"package":
|
|||
|
||||
|
||||
class AddLang(unohelper.Base, XJobExecutor ):
|
||||
def __init__(self,sVariable="",sFields="",sDisplayName="",bFromModify=False):
|
||||
def __init__(self, sVariable="", sFields="", sDisplayName="", bFromModify=False):
|
||||
LoginTest()
|
||||
if not loginstatus and __name__=="package":
|
||||
exit(1)
|
||||
|
@ -157,7 +157,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
|
|||
ErrorDialog("Please insert user define field Field-1 or Field-4","Just go to File->Properties->User Define \nField-1 E.g. http://localhost:8069 \nOR \nField-4 E.g. account.invoice")
|
||||
self.win.endExecute()
|
||||
|
||||
def lstbox_selected(self,oItemEvent):
|
||||
def lstbox_selected(self, oItemEvent):
|
||||
try:
|
||||
|
||||
desktop=getDesktop()
|
||||
|
@ -183,7 +183,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
|
|||
if self.bModify:
|
||||
self.win.setEditText("txtUName",self.sGDisplayName)
|
||||
|
||||
def getRes(self,sock ,sObject,sVar):
|
||||
def getRes(self, sock, sObject, sVar):
|
||||
desktop=getDesktop()
|
||||
doc =desktop.getCurrentComponent()
|
||||
docinfo=doc.getDocumentInfo()
|
||||
|
@ -203,7 +203,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
|
|||
return sObject
|
||||
|
||||
|
||||
def cmbVariable_selected(self,oItemEvent):
|
||||
def cmbVariable_selected(self, oItemEvent):
|
||||
if self.count > 0 :
|
||||
try:
|
||||
desktop=getDesktop()
|
||||
|
@ -229,7 +229,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
|
|||
except:
|
||||
import traceback;traceback.print_exc()
|
||||
|
||||
def btnOk_clicked( self, oActionEvent ):
|
||||
def btnOk_clicked(self, oActionEvent):
|
||||
self.bOkay = True
|
||||
desktop=getDesktop()
|
||||
doc = desktop.getCurrentComponent()
|
||||
|
@ -263,7 +263,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
|
|||
else:
|
||||
ErrorDialog("Please fill appropriate data in name field \nor select particular value from the list of fields.")
|
||||
|
||||
def btnCancel_clicked( self, oActionEvent ):
|
||||
def btnCancel_clicked(self, oActionEvent):
|
||||
self.win.endExecute()
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
if __name__<>"package":
|
||||
from gui import *
|
||||
class ErrorDialog:
|
||||
def __init__(self,sErrorMsg, sErrorHelpMsg="",sTitle="Error Message"):
|
||||
def __init__(self, sErrorMsg, sErrorHelpMsg="", sTitle="Error Message"):
|
||||
self.win = DBModalDialog(50, 50, 150, 90, sTitle)
|
||||
self.win.addFixedText("lblErrMsg", 5, 5, 190, 25, sErrorMsg)
|
||||
self.win.addFixedText("lblErrHelpMsg", 5, 30, 190, 25, sErrorHelpMsg)
|
||||
|
|
|
@ -59,7 +59,13 @@ if __name__<>"package":
|
|||
database="test"
|
||||
uid = 1
|
||||
|
||||
def genTree(object,aList,insField,host,level=3, ending=[], ending_excl=[], recur=[], root='', actualroot=""):
|
||||
def genTree(object, aList, insField, host, level=3, ending=None, ending_excl=None, recur=None, root='', actualroot=""):
|
||||
if ending is None:
|
||||
ending = []
|
||||
if ending_excl is None:
|
||||
ending_excl = []
|
||||
if recur is None:
|
||||
recur = []
|
||||
try:
|
||||
global url
|
||||
sock=RPCSession(url)
|
||||
|
@ -79,7 +85,7 @@ def genTree(object,aList,insField,host,level=3, ending=[], ending_excl=[], recur
|
|||
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
obj.log_write('Function', LOG_ERROR, info)
|
||||
|
||||
def VariableScope(oTcur,insVariable,aObjectList,aComponentAdd,aItemList,sTableName=""):
|
||||
def VariableScope(oTcur, insVariable, aObjectList, aComponentAdd, aItemList, sTableName=""):
|
||||
if sTableName.find(".") != -1:
|
||||
for i in range(len(aItemList)):
|
||||
if aComponentAdd[i]==sTableName:
|
||||
|
@ -96,7 +102,7 @@ def VariableScope(oTcur,insVariable,aObjectList,aComponentAdd,aItemList,sTableNa
|
|||
if aObjectList[j][:aObjectList[j].find("(")] == sLVal and sLVal!="":
|
||||
insVariable.append(aObjectList[j])
|
||||
|
||||
def getList(aObjectList,host,count):
|
||||
def getList(aObjectList, host, count):
|
||||
desktop=getDesktop()
|
||||
doc =desktop.getCurrentComponent()
|
||||
docinfo=doc.getDocumentInfo()
|
||||
|
@ -128,7 +134,7 @@ def getList(aObjectList,host,count):
|
|||
else:
|
||||
aObjectList.append("List of " + docinfo.getUserFieldValue(3))
|
||||
|
||||
def getRelation(sRelName, sItem, sObjName, aObjectList, host ):
|
||||
def getRelation(sRelName, sItem, sObjName, aObjectList, host):
|
||||
global url
|
||||
sock=RPCSession(url)
|
||||
global passwd
|
||||
|
@ -143,7 +149,7 @@ def getRelation(sRelName, sItem, sObjName, aObjectList, host ):
|
|||
getRelation(res[k]['relation'], sItem[sItem.find(".")+1:], sObjName,aObjectList,host)
|
||||
|
||||
|
||||
def getPath(sPath,sMain):
|
||||
def getPath(sPath, sMain):
|
||||
desktop=getDesktop()
|
||||
doc =desktop.getCurrentComponent()
|
||||
oParEnum = doc.getTextFields().createEnumeration()
|
||||
|
@ -161,7 +167,7 @@ def getPath(sPath,sMain):
|
|||
getPath(sPath, sMain)
|
||||
return sPath
|
||||
|
||||
def EnumDocument(aItemList,aComponentAdd):
|
||||
def EnumDocument(aItemList, aComponentAdd):
|
||||
desktop = getDesktop()
|
||||
parent=""
|
||||
bFlag = False
|
||||
|
@ -183,7 +189,7 @@ def EnumDocument(aItemList,aComponentAdd):
|
|||
aItemList.append( templist )
|
||||
aComponentAdd.append( parent )
|
||||
|
||||
def getChildTable(oPar,aItemList,aComponentAdd,sTableName=""):
|
||||
def getChildTable(oPar, aItemList, aComponentAdd, sTableName=""):
|
||||
sNames = oPar.getCellNames()
|
||||
bEmptyTableFlag=True
|
||||
for val in sNames:
|
||||
|
@ -229,7 +235,7 @@ def getChildTable(oPar,aItemList,aComponentAdd,sTableName=""):
|
|||
aComponentAdd.append(sTableName+"."+oPar.Name)
|
||||
return 0
|
||||
|
||||
def getRecersiveSection(oCurrentSection,aSectionList):
|
||||
def getRecersiveSection(oCurrentSection, aSectionList):
|
||||
desktop=getDesktop()
|
||||
doc =desktop.getCurrentComponent()
|
||||
oParEnum=doc.getText().createEnumeration()
|
||||
|
|
|
@ -39,11 +39,10 @@ def log_detail(self):
|
|||
_logger.setLevel(logging.INFO)
|
||||
|
||||
class Logger(object):
|
||||
def log_write(self,name,level,msg):
|
||||
def log_write(self, name, level, msg):
|
||||
getattr(_logger,level)(msg)
|
||||
|
||||
def shutdown(self):
|
||||
logging.shutdown()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -52,7 +52,7 @@ class RPCGateway(object):
|
|||
|
||||
|
||||
class RPCSession(object):
|
||||
def __init__(self,url):
|
||||
def __init__(self, url):
|
||||
|
||||
m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', url or '')
|
||||
|
||||
|
@ -152,7 +152,7 @@ class XMLRPCGateway(RPCGateway):
|
|||
|
||||
return res
|
||||
|
||||
def execute(self, sDatabase,UID,sPassword,obj, method, *args):
|
||||
def execute(self, sDatabase, UID, sPassword, obj, method, *args):
|
||||
global rpc_url
|
||||
|
||||
sock = xmlrpclib.ServerProxy(rpc_url + 'object')
|
||||
|
|
|
@ -21,19 +21,19 @@
|
|||
##############################################################################
|
||||
import urllib
|
||||
|
||||
def get_absolute_file_path( url ):
|
||||
def get_absolute_file_path(url):
|
||||
url_unquoted = urllib.unquote(url)
|
||||
return os.name == 'nt' and url_unquoted[1:] or url_unquoted
|
||||
|
||||
# This function reads the content of a file and return it to the caller
|
||||
def read_data_from_file( filename ):
|
||||
def read_data_from_file(filename):
|
||||
fp = file( filename, "rb" )
|
||||
data = fp.read()
|
||||
fp.close()
|
||||
return data
|
||||
|
||||
# This function writes the content to a file
|
||||
def write_data_to_file( filename, data ):
|
||||
def write_data_to_file(filename, data):
|
||||
fp = file( filename, 'wb' )
|
||||
fp.write( data )
|
||||
fp.close()
|
||||
|
|
|
@ -61,7 +61,7 @@ if __name__<>"package":
|
|||
uid = 3
|
||||
|
||||
class modify(unohelper.Base, XJobExecutor ):
|
||||
def __init__( self, ctx ):
|
||||
def __init__(self, ctx):
|
||||
self.ctx = ctx
|
||||
self.module = "openerp_report"
|
||||
self.version = "0.1"
|
||||
|
|
|
@ -10,7 +10,13 @@ import time
|
|||
|
||||
sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')
|
||||
|
||||
def get(object, level=3, ending=[], ending_excl=[], recur=[], root=''):
|
||||
def get(object, level=3, ending=None, ending_excl=None, recur=None, root=''):
|
||||
if ending is None:
|
||||
ending = []
|
||||
if ending_excl is None:
|
||||
ending_excl = []
|
||||
if recur is None:
|
||||
recur = []
|
||||
res = sock.execute('terp', 3, 'admin', 'account.invoice', 'fields_get')
|
||||
key = res.keys()
|
||||
key.sort()
|
||||
|
|
|
@ -7,44 +7,44 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2009-04-24 15:11+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"PO-Revision-Date: 2012-10-01 11:22+0000\n"
|
||||
"Last-Translator: Els Van Vossel (Agaplan) <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-28 06:08+0000\n"
|
||||
"X-Generator: Launchpad (build 15864)\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-02 05:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16061)\n"
|
||||
|
||||
#. module: base_setup
|
||||
#: field:user.preferences.config,menu_tips:0
|
||||
msgid "Display Tips"
|
||||
msgstr ""
|
||||
msgstr "Tips weergeven"
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:base.setup.terminology,partner:0
|
||||
msgid "Guest"
|
||||
msgstr ""
|
||||
msgstr "Gast"
|
||||
|
||||
#. module: base_setup
|
||||
#: model:ir.model,name:base_setup.model_product_installer
|
||||
msgid "product.installer"
|
||||
msgstr ""
|
||||
msgstr "product.installer"
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:product.installer,customers:0
|
||||
msgid "Create"
|
||||
msgstr ""
|
||||
msgstr "Maken"
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:base.setup.terminology,partner:0
|
||||
msgid "Member"
|
||||
msgstr ""
|
||||
msgstr "Lid"
|
||||
|
||||
#. module: base_setup
|
||||
#: field:migrade.application.installer.modules,sync_google_contact:0
|
||||
msgid "Sync Google Contact"
|
||||
msgstr ""
|
||||
msgstr "Google-contacten synchroniseren"
|
||||
|
||||
#. module: base_setup
|
||||
#: help:user.preferences.config,context_tz:0
|
||||
|
@ -52,21 +52,23 @@ msgid ""
|
|||
"Set default for new user's timezone, used to perform timezone conversions "
|
||||
"between the server and the client."
|
||||
msgstr ""
|
||||
"Stel de standaardtijdzone in voor nieuwe gebruikers. Deze wordt gebruikt om "
|
||||
"tijdzoneconversies te doen tussen server en client."
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:product.installer,customers:0
|
||||
msgid "Import"
|
||||
msgstr ""
|
||||
msgstr "Importeren"
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:base.setup.terminology,partner:0
|
||||
msgid "Donor"
|
||||
msgstr ""
|
||||
msgstr "Donor"
|
||||
|
||||
#. module: base_setup
|
||||
#: model:ir.actions.act_window,name:base_setup.action_base_setup_company
|
||||
msgid "Set Company Header and Footer"
|
||||
msgstr ""
|
||||
msgstr "Stel uw kop- en voettekst in"
|
||||
|
||||
#. module: base_setup
|
||||
#: model:ir.actions.act_window,help:base_setup.action_base_setup_company
|
||||
|
@ -75,21 +77,24 @@ msgid ""
|
|||
"printed on your reports. You can click on the button 'Preview Header' in "
|
||||
"order to check the header/footer of PDF documents."
|
||||
msgstr ""
|
||||
"Vul uw bedrijfsgegevens in (adres, logo, bankrekeningen), zodat deze worden "
|
||||
"afgedrukt op uw rapporten. U kunt op de knop 'Voorbeeld koptekst' klikken om "
|
||||
"de koptekst en voettekst van pdf-documenten te controleren."
|
||||
|
||||
#. module: base_setup
|
||||
#: field:product.installer,customers:0
|
||||
msgid "Customers"
|
||||
msgstr ""
|
||||
msgstr "Klanten"
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:user.preferences.config,view:0
|
||||
msgid "Extended"
|
||||
msgstr ""
|
||||
msgstr "Uitgebreid"
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:base.setup.terminology,partner:0
|
||||
msgid "Patient"
|
||||
msgstr ""
|
||||
msgstr "Patiënt"
|
||||
|
||||
#. module: base_setup
|
||||
#: model:ir.actions.act_window,help:base_setup.action_import_create_installer
|
||||
|
@ -98,26 +103,29 @@ msgid ""
|
|||
"you can import your existing partners by CSV spreadsheet from \"Import "
|
||||
"Data\" wizard"
|
||||
msgstr ""
|
||||
"Maak of importeer klanten en contactpersonen manueel vanuit dit scherm. U "
|
||||
"kunt ook bestaande klanten importeren vanuit een csv-bestand met de wizard "
|
||||
"\"Gegevens importeren\"."
|
||||
|
||||
#. module: base_setup
|
||||
#: view:user.preferences.config:0
|
||||
msgid "Define Users's Preferences"
|
||||
msgstr ""
|
||||
msgstr "Stel de gebruikersvoorkeuren in"
|
||||
|
||||
#. module: base_setup
|
||||
#: model:ir.actions.act_window,name:base_setup.action_user_preferences_config_form
|
||||
msgid "Define default users preferences"
|
||||
msgstr ""
|
||||
msgstr "Stel de standaard gebruikersvoorkeuren in"
|
||||
|
||||
#. module: base_setup
|
||||
#: help:migrade.application.installer.modules,import_saleforce:0
|
||||
msgid "For Import Saleforce"
|
||||
msgstr ""
|
||||
msgstr "Voor Salesforce-import"
|
||||
|
||||
#. module: base_setup
|
||||
#: help:migrade.application.installer.modules,quickbooks_ippids:0
|
||||
msgid "For Quickbooks Ippids"
|
||||
msgstr ""
|
||||
msgstr "Voor Quickboos Ippids"
|
||||
|
||||
#. module: base_setup
|
||||
#: help:user.preferences.config,view:0
|
||||
|
@ -126,6 +134,9 @@ msgid ""
|
|||
"simplified interface, which has less features but is easier. You can always "
|
||||
"switch later from the user preferences."
|
||||
msgstr ""
|
||||
"Als u OpenERP voor de eerste keer gebruikt, raden wij u aan de eenvoudige "
|
||||
"weergave te kiezen, met minder functies en een eenvoudige werking. U kunt "
|
||||
"deze keuze altijd wijzigen via de gebruikersvoorkeuren."
|
||||
|
||||
#. module: base_setup
|
||||
#: view:base.setup.terminology:0
|
||||
|
@ -136,12 +147,12 @@ msgstr "res_config_contents"
|
|||
#. module: base_setup
|
||||
#: field:user.preferences.config,view:0
|
||||
msgid "Interface"
|
||||
msgstr ""
|
||||
msgstr "Interface"
|
||||
|
||||
#. module: base_setup
|
||||
#: model:ir.model,name:base_setup.model_migrade_application_installer_modules
|
||||
msgid "migrade.application.installer.modules"
|
||||
msgstr ""
|
||||
msgstr "migrade.application.installer.modules"
|
||||
|
||||
#. module: base_setup
|
||||
#: view:base.setup.terminology:0
|
||||
|
@ -149,21 +160,23 @@ msgid ""
|
|||
"You can use this wizard to change the terminologies for customers in the "
|
||||
"whole application."
|
||||
msgstr ""
|
||||
"Met deze wizard kunt u een andere benaming kiezen voor klanten, die in de "
|
||||
"volledige toepassing zal worden gebruikt."
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:base.setup.terminology,partner:0
|
||||
msgid "Tenant"
|
||||
msgstr ""
|
||||
msgstr "Huurder"
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:base.setup.terminology,partner:0
|
||||
msgid "Customer"
|
||||
msgstr ""
|
||||
msgstr "Klant"
|
||||
|
||||
#. module: base_setup
|
||||
#: field:user.preferences.config,context_lang:0
|
||||
msgid "Language"
|
||||
msgstr ""
|
||||
msgstr "Taal"
|
||||
|
||||
#. module: base_setup
|
||||
#: help:user.preferences.config,context_lang:0
|
||||
|
@ -172,6 +185,9 @@ msgid ""
|
|||
"available. If you want to Add new Language, you can add it from 'Load an "
|
||||
"Official Translation' wizard from 'Administration' menu."
|
||||
msgstr ""
|
||||
"Kiest de standaardtaal voor de gebruik, als er vertalingen beschikbaar zijn. "
|
||||
"Een Nieuwe taal instellen kan via het menu Beheer, Laad een officiële "
|
||||
"vertaling."
|
||||
|
||||
#. module: base_setup
|
||||
#: view:user.preferences.config:0
|
||||
|
@ -180,47 +196,50 @@ msgid ""
|
|||
"ones. Afterwards, users are free to change those values on their own user "
|
||||
"preference form."
|
||||
msgstr ""
|
||||
"Hiermee wijst u de standaardinstellingen toe aan nieuwe en bestaande "
|
||||
"gebruikers. Een gebruiker kan deze waarden altijd wijzigen via zijn "
|
||||
"voorkeuren."
|
||||
|
||||
#. module: base_setup
|
||||
#: field:base.setup.terminology,partner:0
|
||||
msgid "How do you call a Customer"
|
||||
msgstr ""
|
||||
msgstr "Hoe wordt een klant bij u genoemd?"
|
||||
|
||||
#. module: base_setup
|
||||
#: field:migrade.application.installer.modules,quickbooks_ippids:0
|
||||
msgid "Quickbooks Ippids"
|
||||
msgstr ""
|
||||
msgstr "Quickbooks Ippids"
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:base.setup.terminology,partner:0
|
||||
msgid "Client"
|
||||
msgstr ""
|
||||
msgstr "Cliënt"
|
||||
|
||||
#. module: base_setup
|
||||
#: field:migrade.application.installer.modules,import_saleforce:0
|
||||
msgid "Import Saleforce"
|
||||
msgstr ""
|
||||
msgstr "Salesforce-import"
|
||||
|
||||
#. module: base_setup
|
||||
#: field:user.preferences.config,context_tz:0
|
||||
msgid "Timezone"
|
||||
msgstr ""
|
||||
msgstr "Tijdzone"
|
||||
|
||||
#. module: base_setup
|
||||
#: model:ir.actions.act_window,name:base_setup.action_partner_terminology_config_form
|
||||
msgid "Use another word to say \"Customer\""
|
||||
msgstr ""
|
||||
msgstr "Gebruik een andere benaming voor Klant"
|
||||
|
||||
#. module: base_setup
|
||||
#: model:ir.model,name:base_setup.model_base_setup_terminology
|
||||
msgid "base.setup.terminology"
|
||||
msgstr ""
|
||||
msgstr "base.setup.terminology"
|
||||
|
||||
#. module: base_setup
|
||||
#: help:user.preferences.config,menu_tips:0
|
||||
msgid ""
|
||||
"Check out this box if you want to always display tips on each menu action"
|
||||
msgstr ""
|
||||
msgstr "Schakel dit vakje in als u voor elke menuactie tips wilt weergaven."
|
||||
|
||||
#. module: base_setup
|
||||
#: field:base.setup.terminology,config_logo:0
|
||||
|
@ -233,52 +252,52 @@ msgstr "Afbeelding"
|
|||
#. module: base_setup
|
||||
#: model:ir.model,name:base_setup.model_user_preferences_config
|
||||
msgid "user.preferences.config"
|
||||
msgstr ""
|
||||
msgstr "user.preferences.config"
|
||||
|
||||
#. module: base_setup
|
||||
#: model:ir.actions.act_window,name:base_setup.action_config_access_other_user
|
||||
msgid "Create Additional Users"
|
||||
msgstr ""
|
||||
msgstr "Extra gebruikers maken"
|
||||
|
||||
#. module: base_setup
|
||||
#: model:ir.actions.act_window,name:base_setup.action_import_create_installer
|
||||
msgid "Create or Import Customers"
|
||||
msgstr ""
|
||||
msgstr "Klanten maken of importeren"
|
||||
|
||||
#. module: base_setup
|
||||
#: field:migrade.application.installer.modules,import_sugarcrm:0
|
||||
msgid "Import Sugarcrm"
|
||||
msgstr ""
|
||||
msgstr "SugarCRM-import"
|
||||
|
||||
#. module: base_setup
|
||||
#: help:product.installer,customers:0
|
||||
msgid "Import or create customers"
|
||||
msgstr ""
|
||||
msgstr "Klanten maken of importeren"
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:user.preferences.config,view:0
|
||||
msgid "Simplified"
|
||||
msgstr ""
|
||||
msgstr "Eenvoudig"
|
||||
|
||||
#. module: base_setup
|
||||
#: help:migrade.application.installer.modules,import_sugarcrm:0
|
||||
msgid "For Import Sugarcrm"
|
||||
msgstr ""
|
||||
msgstr "Voor SugarCRM-import"
|
||||
|
||||
#. module: base_setup
|
||||
#: selection:base.setup.terminology,partner:0
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
msgstr "Relatie"
|
||||
|
||||
#. module: base_setup
|
||||
#: view:base.setup.terminology:0
|
||||
msgid "Specify Your Terminology"
|
||||
msgstr ""
|
||||
msgstr "Kies uw terminologie"
|
||||
|
||||
#. module: base_setup
|
||||
#: help:migrade.application.installer.modules,sync_google_contact:0
|
||||
msgid "For Sync Google Contact"
|
||||
msgstr ""
|
||||
msgstr "Voor synchronisatie met Google-contacten"
|
||||
|
||||
#~ msgid "Logo"
|
||||
#~ msgstr "Logo"
|
||||
|
|
|
@ -22,4 +22,4 @@
|
|||
import res_company
|
||||
import base_vat
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -7,14 +7,14 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2009-04-24 15:11+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"PO-Revision-Date: 2012-10-01 11:23+0000\n"
|
||||
"Last-Translator: Els Van Vossel (Agaplan) <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-28 06:07+0000\n"
|
||||
"X-Generator: Launchpad (build 15864)\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-02 05:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16061)\n"
|
||||
|
||||
#. module: base_vat
|
||||
#: code:addons/base_vat/base_vat.py:141
|
||||
|
@ -34,7 +34,7 @@ msgstr "De naam van de firma moet uniek zijn"
|
|||
#. module: base_vat
|
||||
#: constraint:res.partner:0
|
||||
msgid "Error ! You cannot create recursive associated members."
|
||||
msgstr ""
|
||||
msgstr "U kunt niet dezelfde verenigingsleden maken."
|
||||
|
||||
#. module: base_vat
|
||||
#: field:res.company,vat_check_vies:0
|
||||
|
|
|
@ -29,4 +29,4 @@ class res_company_vat (osv.osv):
|
|||
"rather than via a simple format validation (checksum)."),
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class node_calendar_collection(nodes.node_dir):
|
|||
DAV_M_NS = dict_merge2(nodes.node_dir.DAV_M_NS,
|
||||
{ "http://calendarserver.org/ns/" : '_get_dav', } )
|
||||
|
||||
def _file_get(self,cr, nodename=False):
|
||||
def _file_get(self, cr, nodename=False):
|
||||
return []
|
||||
|
||||
def _child_get(self, cr, name=False, parent_id=False, domain=None):
|
||||
|
@ -100,7 +100,7 @@ class node_calendar_res_col(nodes.node_res_obj):
|
|||
DAV_M_NS = dict_merge2(nodes.node_res_obj.DAV_M_NS,
|
||||
{ "http://calendarserver.org/ns/" : '_get_dav', } )
|
||||
|
||||
def _file_get(self,cr, nodename=False):
|
||||
def _file_get(self, cr, nodename=False):
|
||||
return []
|
||||
|
||||
def _child_get(self, cr, name=False, parent_id=False, domain=None):
|
||||
|
@ -181,7 +181,7 @@ class node_calendar(nodes.node_class):
|
|||
|
||||
http_options = { 'DAV': ['calendar-access'] }
|
||||
|
||||
def __init__(self,path, parent, context, calendar):
|
||||
def __init__(self, path, parent, context, calendar):
|
||||
super(node_calendar,self).__init__(path, parent,context)
|
||||
self.calendar_id = calendar.id
|
||||
self.mimetype = 'application/x-directory'
|
||||
|
@ -271,7 +271,7 @@ class node_calendar(nodes.node_class):
|
|||
def children(self, cr, domain=None):
|
||||
return self._child_get(cr, domain=domain)
|
||||
|
||||
def child(self,cr, name, domain=None):
|
||||
def child(self, cr, name, domain=None):
|
||||
res = self._child_get(cr, name, domain=domain)
|
||||
if res:
|
||||
return res[0]
|
||||
|
@ -353,16 +353,16 @@ class node_calendar(nodes.node_class):
|
|||
return None
|
||||
|
||||
|
||||
def set_data(self, cr, data, fil_obj = None):
|
||||
def set_data(self, cr, data, fil_obj=None):
|
||||
uid = self.context.uid
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
res = calendar_obj.import_cal(cr, uid, data, self.calendar_id)
|
||||
return res
|
||||
|
||||
def get_data_len(self, cr, fil_obj = None):
|
||||
def get_data_len(self, cr, fil_obj=None):
|
||||
return self.content_length
|
||||
|
||||
def _get_ttag(self,cr):
|
||||
def _get_ttag(self, cr):
|
||||
return 'calendar-%d' % (self.calendar_id,)
|
||||
|
||||
def rmcol(self, cr):
|
||||
|
@ -441,7 +441,7 @@ class res_node_calendar(nodes.node_class):
|
|||
|
||||
http_options = { 'DAV': ['calendar-access'] }
|
||||
|
||||
def __init__(self,path, parent, context, res_obj, res_model=None, res_id=None):
|
||||
def __init__(self, path, parent, context, res_obj, res_model=None, res_id=None):
|
||||
super(res_node_calendar,self).__init__(path, parent, context)
|
||||
self.mimetype = 'text/calendar'
|
||||
self.create_date = parent.create_date
|
||||
|
@ -474,10 +474,10 @@ class res_node_calendar(nodes.node_class):
|
|||
def _get_caldav_calendar_data(self, cr):
|
||||
return self.get_data(cr)
|
||||
|
||||
def get_data_len(self, cr, fil_obj = None):
|
||||
def get_data_len(self, cr, fil_obj=None):
|
||||
return self.content_length
|
||||
|
||||
def set_data(self, cr, data, fil_obj = None):
|
||||
def set_data(self, cr, data, fil_obj=None):
|
||||
uid = self.context.uid
|
||||
context = self.context.context.copy()
|
||||
context.update(self.dctx)
|
||||
|
@ -486,7 +486,7 @@ class res_node_calendar(nodes.node_class):
|
|||
res = calendar_obj.import_cal(cr, uid, data, self.calendar_id, context=context)
|
||||
return res
|
||||
|
||||
def _get_ttag(self,cr):
|
||||
def _get_ttag(self, cr):
|
||||
res = False
|
||||
if self.model and self.res_id:
|
||||
res = '%s_%d' % (self.model, self.res_id)
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
# Dutch (Belgium) translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-10-01 11:24+0000\n"
|
||||
"Last-Translator: Els Van Vossel (Agaplan) <Unknown>\n"
|
||||
"Language-Team: Dutch (Belgium) <nl_BE@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-02 05:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16061)\n"
|
||||
|
||||
#. module: claim_from_delivery
|
||||
#: model:ir.actions.act_window,name:claim_from_delivery.action_claim_from_delivery
|
||||
msgid "Claim"
|
||||
msgstr "Klacht"
|
|
@ -58,7 +58,7 @@ class crm_case_channel(osv.osv):
|
|||
|
||||
class crm_case_stage(osv.osv):
|
||||
""" Model for case stages. This models the main stages of a document
|
||||
management flow. Main CRM objects (leads, opportunities, project
|
||||
management flow. Main CRM objects (leads, opportunities, project
|
||||
issues, ...) will now use only stages, instead of state and stages.
|
||||
Stages are for example used to display the kanban view of records.
|
||||
"""
|
||||
|
@ -126,11 +126,11 @@ class crm_case_section(osv.osv):
|
|||
'note': fields.text('Description'),
|
||||
'working_hours': fields.float('Working Hours', digits=(16,2 )),
|
||||
'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
|
||||
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
|
||||
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
|
||||
help="The email address associated with this team. New emails received will automatically "
|
||||
"create new leads assigned to the team."),
|
||||
}
|
||||
|
||||
|
||||
def _get_stage_common(self, cr, uid, context):
|
||||
ids = self.pool.get('crm.case.stage').search(cr, uid, [('case_default','=',1)], context=context)
|
||||
return ids
|
||||
|
@ -165,12 +165,12 @@ class crm_case_section(osv.osv):
|
|||
name = record['parent_id'][1] + ' / ' + name
|
||||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
mail_alias = self.pool.get('mail.alias')
|
||||
if not vals.get('alias_id'):
|
||||
vals.pop('alias_name', None) # prevent errors during copy()
|
||||
alias_id = mail_alias.create_unique_alias(cr, uid,
|
||||
alias_id = mail_alias.create_unique_alias(cr, uid,
|
||||
{'alias_name': vals['name']},
|
||||
model_name="crm.lead",
|
||||
context=context)
|
||||
|
@ -178,7 +178,7 @@ class crm_case_section(osv.osv):
|
|||
res = super(crm_case_section, self).create(cr, uid, vals, context)
|
||||
mail_alias.write(cr, uid, [vals['alias_id']], {'alias_defaults': {'section_id': res, 'type':'lead'}}, context)
|
||||
return res
|
||||
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
# Cascade-delete mail aliases as well, as they should not exist without the sales team.
|
||||
mail_alias = self.pool.get('mail.alias')
|
||||
|
@ -217,7 +217,6 @@ class crm_case_resource_type(osv.osv):
|
|||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
}
|
||||
|
||||
|
||||
def _links_get(self, cr, uid, context=None):
|
||||
"""Gets links value for reference field"""
|
||||
obj = self.pool.get('res.request.link')
|
||||
|
|
|
@ -311,7 +311,6 @@ class crm_lead(base_stage, format_address, osv.osv):
|
|||
}
|
||||
return {'value' : values}
|
||||
|
||||
|
||||
def _check(self, cr, uid, ids=False, context=None):
|
||||
""" Override of the base.stage method.
|
||||
Function called by the scheduler to process cases for date actions
|
||||
|
@ -801,7 +800,7 @@ class crm_lead(base_stage, format_address, osv.osv):
|
|||
if section_id:
|
||||
vals.setdefault('message_follower_ids', [])
|
||||
vals['message_follower_ids'] += [(4, follower.id) for follower in section_id.message_follower_ids]
|
||||
return super(crm_lead,self).write(cr, uid, ids, vals, context)
|
||||
return super(crm_lead,self).write(cr, uid, ids, vals, context)
|
||||
|
||||
# ----------------------------------------
|
||||
# Mail Gateway
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -11,9 +11,11 @@
|
|||
!assert {model: crm.lead, id: crm.crm_case_4, string: Lead in open state}:
|
||||
- state == "open"
|
||||
-
|
||||
I create partner from lead.
|
||||
I fill in a lead2partner wizard.
|
||||
-
|
||||
!record {model: crm.lead2partner, id: crm_lead2partner_id1, context: '{"active_model": "crm.lead", "active_ids": [ref("crm_case_4")]}'}:
|
||||
-
|
||||
I create a partner from the lead2partner wizard.
|
||||
-
|
||||
!python {model: crm.lead2partner}: |
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_4')], 'active_id': ref('crm_case_4')})
|
||||
|
|
|
@ -35,7 +35,7 @@ CRM_CLAIM_PENDING_STATES = (
|
|||
|
||||
class crm_claim_stage(osv.osv):
|
||||
""" Model for claim stages. This models the main stages of a claim
|
||||
management flow. Main CRM objects (leads, opportunities, project
|
||||
management flow. Main CRM objects (leads, opportunities, project
|
||||
issues, ...) will now use only stages, instead of state and stages.
|
||||
Stages are for example used to display the kanban view of records.
|
||||
"""
|
||||
|
@ -104,7 +104,7 @@ class crm_claim(base_stage, osv.osv):
|
|||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'stage_id': fields.many2one ('crm.claim.stage', 'Stage',
|
||||
domain="['|', ('section_ids', '=', section_id), ('case_default', '=', True)]"),
|
||||
domain="['|', ('section_ids', '=', section_id), ('case_default', '=', True)]"),
|
||||
'cause': fields.text('Root Cause'),
|
||||
'state': fields.related('stage_id', 'state', type="selection", store=True,
|
||||
selection=crm.AVAILABLE_STATES, string="State", readonly=True,
|
||||
|
|
|
@ -69,9 +69,9 @@ class crm_helpdesk(base_state, base_stage, osv.osv):
|
|||
'probability': fields.float('Probability (%)'),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', \
|
||||
domain="['|',('section_id','=',False),('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.helpdesk')]"),
|
||||
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, 'Status', size=16, readonly=True,
|
||||
('object_id.model', '=', 'crm.helpdesk')]"),
|
||||
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, 'Status', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
\nWhen the case is over, the state is set to \'Done\'.\
|
||||
|
@ -139,9 +139,9 @@ class crm_helpdesk(base_state, base_stage, osv.osv):
|
|||
|
||||
return super(crm_helpdesk,self).message_update(cr, uid, ids, msg, update_vals=update_vals, context=context)
|
||||
|
||||
# ******************************
|
||||
# ---------------------------------------------------
|
||||
# OpenChatter
|
||||
# ******************************
|
||||
# ---------------------------------------------------
|
||||
|
||||
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
|
||||
""" override of default base_state method. """
|
||||
|
@ -152,5 +152,4 @@ class crm_helpdesk(base_state, base_stage, osv.osv):
|
|||
self.message_post(cr, uid, ids, body=msg, context=context)
|
||||
return True
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -77,7 +77,7 @@ def _get_parents(cr, uid, ids):
|
|||
return ids_to_check
|
||||
|
||||
|
||||
def test_prof(cr, uid, seg_id, pid, answers_ids = []):
|
||||
def test_prof(cr, uid, seg_id, pid, answers_ids=None):
|
||||
|
||||
""" return True if the partner pid fetch the segmentation rule seg_id
|
||||
@param cr: the current row, from the database cursor,
|
||||
|
|
|
@ -51,7 +51,7 @@ class indexer(object):
|
|||
return mts[0]
|
||||
return None
|
||||
|
||||
def indexContent(self, content, filename=None, realfile = None):
|
||||
def indexContent(self, content, filename=None, realfile=None):
|
||||
""" Use either content or the real file, to index.
|
||||
Some parsers will work better with the actual
|
||||
content, others parse a file easier. Try the
|
||||
|
@ -95,16 +95,15 @@ class indexer(object):
|
|||
|
||||
raise NhException('No appropriate method to index file.')
|
||||
|
||||
def _doIndexContent(self,content):
|
||||
def _doIndexContent(self, content):
|
||||
raise NhException("Content cannot be handled here.")
|
||||
|
||||
def _doIndexFile(self,fpath):
|
||||
def _doIndexFile(self, fpath):
|
||||
raise NhException("Content cannot be handled here.")
|
||||
|
||||
def __repr__(self):
|
||||
return "<indexer %s.%s>" %(self.__module__, self.__class__.__name__)
|
||||
|
||||
|
||||
def mime_match(mime, mdict):
|
||||
if mdict.has_key(mime):
|
||||
return (mime, mdict[mime])
|
||||
|
@ -136,7 +135,7 @@ class contentIndex(object):
|
|||
if not f:
|
||||
raise Exception("Your indexer should at least support a mimetype or extension.")
|
||||
|
||||
def doIndex(self, content, filename=None, content_type=None, realfname = None, debug=False):
|
||||
def doIndex(self, content, filename=None, content_type=None, realfname=None, debug=False):
|
||||
fobj = None
|
||||
fname = None
|
||||
mime = None
|
||||
|
|
|
@ -149,7 +149,7 @@ class document_file(osv.osv):
|
|||
_sql_constraints = [
|
||||
# filename_uniq is not possible in pure SQL
|
||||
]
|
||||
def _check_duplication(self, cr, uid, vals, ids=[], op='create'):
|
||||
def _check_duplication(self, cr, uid, vals, ids=None, op='create'):
|
||||
name = vals.get('name', False)
|
||||
parent_id = vals.get('parent_id', False)
|
||||
res_model = vals.get('res_model', False)
|
||||
|
|
|
@ -221,7 +221,7 @@ class document_directory(osv.osv):
|
|||
pass
|
||||
return res
|
||||
|
||||
def _locate_child(self, cr, uid, root_id, uri,nparent, ncontext):
|
||||
def _locate_child(self, cr, uid, root_id, uri, nparent, ncontext):
|
||||
""" try to locate the node in uri,
|
||||
Return a tuple (node_dir, remaining_path)
|
||||
"""
|
||||
|
@ -234,7 +234,7 @@ class document_directory(osv.osv):
|
|||
default.update(name=_("%s (copy)") % (name))
|
||||
return super(document_directory,self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def _check_duplication(self, cr, uid, vals, ids=[], op='create'):
|
||||
def _check_duplication(self, cr, uid, vals, ids=None, op='create'):
|
||||
name=vals.get('name',False)
|
||||
parent_id=vals.get('parent_id',False)
|
||||
ressource_parent_type_id=vals.get('ressource_parent_type_id',False)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue