diff --git a/addons/account/account.py b/addons/account/account.py index 7c9405c2d70..0229297c2de 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## @@ -103,7 +103,7 @@ class account_payment_term_line(osv.osv): _constraints = [ (_check_percent, _('Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% '), ['value_amount']), ] - + account_payment_term_line() @@ -418,7 +418,7 @@ class account_account(osv.osv): line_obj = self.pool.get('account.move.line') account_ids = self.search(cr, uid, [('id', 'child_of', ids)]) if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]): - raise osv.except_osv(_('Error !'), _('You can not deactivate an account that contains account moves.')) + raise osv.except_osv(_('Error !'), _('You can not deactivate an account that contains Ledger Postings.')) return super(account_account, self).write(cr, uid, ids, vals, context=context) account_account() @@ -1426,11 +1426,11 @@ class account_tax(osv.osv): for tax in taxes: if (tax.type=='percent') and not tax.include_base_amount: tax_parent_tot += tax.amount - + for tax in taxes: if (tax.type=='fixed') and not tax.include_base_amount: cur_price_unit -= tax.amount - + for tax in taxes: if tax.type=='percent': if tax.include_base_amount: diff --git a/addons/account/account_assert_test.xml b/addons/account/account_assert_test.xml index a7ff8e236ae..585c6bda124 100644 --- a/addons/account/account_assert_test.xml +++ b/addons/account/account_assert_test.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 0b9b8868ca2..7e289f695ea 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## @@ -213,7 +213,7 @@ class account_bank_statement(osv.osv): 'period_id': st.period_id.id, 'currency_id': st.currency.id, } - + amount = res_currency_obj.compute(cr, uid, st.currency.id, company_currency_id, move.amount, context=context, account=acc_cur) @@ -249,7 +249,7 @@ class account_bank_statement(osv.osv): 'statement_id': st.id, 'journal_id': st.journal_id.id, 'period_id': st.period_id.id, - 'analytic_account_id':newline.analytic_id and newline.analytic_id.id or False, + 'analytic_account_id':newline.analytic_id and newline.analytic_id.id or False, }, context=context) @@ -282,7 +282,7 @@ class account_bank_statement(osv.osv): context=context): if line.state <> 'valid': raise osv.except_osv(_('Error !'), - _('Account move line "%s" is not valid') % line.name) + _('Ledger Posting line "%s" is not valid') % line.name) if move.reconcile_id and move.reconcile_id.line_ids: torec += map(lambda x: x.id, move.reconcile_id.line_ids) @@ -501,7 +501,7 @@ class account_bank_statement_reconcile_line(osv.osv): 'account_id': fields.many2one('account.account', 'Account', required=True), 'line_id': fields.many2one('account.bank.statement.reconcile', 'Reconcile'), 'amount': fields.float('Amount', required=True), - 'analytic_id': fields.many2one('account.analytic.account',"Analytic Account") + 'analytic_id': fields.many2one('account.analytic.account',"Analytic Account") } _defaults = { 'name': lambda *a: 'Write-Off', @@ -588,13 +588,13 @@ class account_bank_statement_line(osv.osv): 'note': fields.text('Notes'), 'reconcile_amount': fields.function(_reconcile_amount, string='Amount reconciled', method=True, type='float'), - 'sequence': fields.integer('Sequence'), + 'sequence': fields.integer('Sequence'), } _defaults = { 'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'), 'date': lambda *a: time.strftime('%Y-%m-%d'), 'type': lambda *a: 'general', - 'sequence': lambda *a: 10, + 'sequence': lambda *a: 10, } account_bank_statement_line() diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 217af3e22f9..d728eed9ffc 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -346,7 +346,7 @@ tree,form,calendar,graph {'type':'out_invoice'} - + @@ -369,7 +369,7 @@ [('type','=','out_invoice')] {'type':'out_invoice'} - + @@ -401,7 +401,7 @@ [('type','=','in_invoice')] {'type':'in_invoice'} - + @@ -422,7 +422,7 @@ [('type','=','out_refund')] {'type':'out_refund'} - + @@ -444,7 +444,7 @@ [('type','=','in_refund')] {'type':'in_refund'} - + @@ -467,7 +467,7 @@ [('state','=','draft'),('type','=','out_invoice')] {'type':'out_invoice'} - + @@ -489,7 +489,7 @@ [('state','=','proforma2'),('type','=','out_invoice')] {'type':'out_invoice'} - + @@ -511,7 +511,7 @@ [('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','out_invoice')] {'type':'out_invoice'} - + @@ -533,7 +533,7 @@ [('state','=','draft'),('type','=','in_invoice')] {'type':'in_invoice'} - + @@ -555,7 +555,7 @@ [('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','in_invoice')] {'type':'in_invoice'} - + @@ -577,7 +577,7 @@ [('state','=','draft'),('type','=','out_refund')] {'type':'out_refund'} - + @@ -599,7 +599,7 @@ [('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','out_refund')] {'type':'out_refund'} - + @@ -621,7 +621,7 @@ [('state','=','draft'),('type','=','in_refund')] {'type':'in_refund'} - + @@ -643,7 +643,7 @@ [('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','in_refund')] {'type':'in_refund'} - + diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml index c0aeac66920..97cf55e4ff4 100644 --- a/addons/account/account_menuitem.xml +++ b/addons/account/account_menuitem.xml @@ -12,7 +12,7 @@ - diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 02882fad1e7..cc1f1fcd3b0 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## @@ -46,12 +46,12 @@ class account_move_line(osv.osv): if context.get('date_from', False) and context.get('date_to', False): where_move_lines_by_date = " AND " +obj+".move_id in ( select id from account_move where date >= '" +context['date_from']+"' AND date <= '"+context['date_to']+"')" - + if state: if state.lower() not in ['all']: where_move_state= " AND "+obj+".move_id in (select id from account_move where account_move.state = '"+state+"')" - - + + if context.get('periods', False): ids = ','.join([str(x) for x in context['periods']]) return obj+".state<>'draft' AND "+obj+".period_id in (SELECT id from account_period WHERE fiscalyear_id in (%s) AND id in (%s)) %s %s" % (fiscalyear_clause, ids,where_move_state,where_move_lines_by_date) @@ -292,7 +292,7 @@ class account_move_line(osv.osv): if not len(res): return [('id', '=', '0')] return [('id', 'in', [x[0] for x in res])] - + def _invoice_search(self, cursor, user, obj, name, args): if not len(args): return [] @@ -553,7 +553,7 @@ class account_move_line(osv.osv): def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context={}): id_set = ','.join(map(str, ids)) - + lines = self.browse(cr, uid, ids, context=context) unrec_lines = filter(lambda x: not x['reconcile_id'], lines) credit = debit = 0.0 @@ -829,7 +829,7 @@ class account_move_line(osv.osv): if res: if res[1] != 'draft': raise osv.except_osv(_('UserError'), - _('The account move (%s) for centralisation ' \ + _('The Ledger Posting (%s) for centralisation ' \ 'has been confirmed!') % res[2]) vals['move_id'] = res[0] diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 5cbc8ef8d4a..980912dd936 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -336,7 +336,7 @@ - + @@ -358,7 +358,7 @@ - + @@ -392,7 +392,7 @@ form tree,form [('state','=','draft')] - + @@ -458,7 +458,6 @@ - @@ -657,7 +656,7 @@ - + @@ -1346,7 +1345,7 @@ form tree,form [('state','=','running')] - + diff --git a/addons/account/account_wizard.xml b/addons/account/account_wizard.xml index 9e06d1dd788..2c91c8c53c2 100644 --- a/addons/account/account_wizard.xml +++ b/addons/account/account_wizard.xml @@ -85,10 +85,10 @@ - + - + diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 7c6dd6cf957..e12e8ae07a0 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## @@ -128,7 +128,7 @@ class account_invoice(osv.osv): else: debit+=debit_tmp credit+=credit_tmp - + if not inv.amount_total: result = 0.0 elif inv.type in ('out_invoice','in_refund'): @@ -139,7 +139,7 @@ class account_invoice(osv.osv): result = inv.amount_total - amount # Use is_zero function to avoid rounding trouble => should be fixed into ORM res[inv.id] = not self.pool.get('res.currency').is_zero(cr, uid, inv.company_id.currency_id,result) and result or 0.0 - + return res def _get_lines(self, cr, uid, ids, name, arg, context=None): @@ -209,7 +209,7 @@ class account_invoice(osv.osv): move[line.move_id.id] = True for line in r.line_id: move[line.move_id.id] = True - + invoice_ids = [] if move: invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context) @@ -260,7 +260,7 @@ class account_invoice(osv.osv): 'invoice_line': fields.one2many('account.invoice.line', 'invoice_id', 'Invoice Lines', readonly=True, states={'draft':[('readonly',False)]}), 'tax_line': fields.one2many('account.invoice.tax', 'invoice_id', 'Tax Lines', readonly=True, states={'draft':[('readonly',False)]}), - 'move_id': fields.many2one('account.move', 'Invoice Movement', readonly=True, help="Link to the automatically generated account moves."), + 'move_id': fields.many2one('account.move', 'Invoice Movement', readonly=True, help="Link to the automatically generated Ledger Postings."), 'amount_untaxed': fields.function(_amount_all, method=True, digits=(16, int(config['price_accuracy'])),string='Untaxed', store={ 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20), @@ -291,10 +291,10 @@ class account_invoice(osv.osv): 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, None, 50), # Check if we can remove ? 'account.move.line': (_get_invoice_from_line, None, 50), 'account.move.reconcile': (_get_invoice_from_reconcile, None, 50), - }, help="The account moves of the invoice have been reconciled with account moves of the payment(s)."), + }, help="The Ledger Postings of the invoice have been reconciled with Ledger Postings of the payment(s)."), 'partner_bank': fields.many2one('res.partner.bank', 'Bank Account', help='The bank account to pay to or to be paid from'), - 'move_lines':fields.function(_get_lines , method=True,type='many2many' , relation='account.move.line',string='Move Lines'), + 'move_lines':fields.function(_get_lines , method=True,type='many2many' , relation='account.move.line',string='Entry Lines'), 'residual': fields.function(_amount_residual, method=True, digits=(16, int(config['price_accuracy'])),string='Residual', store={ 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 50), @@ -305,7 +305,7 @@ class account_invoice(osv.osv): }, help="Remaining amount due."), 'payment_ids': fields.function(_compute_lines, method=True, relation='account.move.line', type="many2many", string='Payments'), - 'move_name': fields.char('Account Move', size=64), + 'move_name': fields.char('Ledger Posting', size=64), 'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position') } _defaults = { @@ -545,7 +545,7 @@ class account_invoice(osv.osv): for taxe in ait_obj.compute(cr, uid, id, context=context).values(): ait_obj.create(cr, uid, taxe) # Update the stored value (fields.function), so we write to trigger recompute - self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=context) + self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=context) # self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context) return True @@ -730,7 +730,7 @@ class account_invoice(osv.osv): tmp += '-'+str(l.get('product_id',"False")) tmp += '-'+str(l.get('analytic_account_id',"False")) tmp += '-'+str(l.get('date_maturity',"False")) - + if tmp in line2: am = line2[tmp]['debit'] - line2[tmp]['credit'] + (l['debit'] - l['credit']) line2[tmp]['debit'] = (am > 0) and am or 0.0 @@ -971,7 +971,7 @@ class account_invoice(osv.osv): date=context['date_p'] else: date=time.strftime('%Y-%m-%d') - + # Take the amount in currency and the currency of the payment if 'amount_currency' in context and context['amount_currency'] and 'currency_id' in context and context['currency_id']: amount_currency = context['amount_currency'] @@ -979,7 +979,7 @@ class account_invoice(osv.osv): else: amount_currency = False currency_id = False - + # Pay attention to the sign for both debit/credit AND amount_currency l1 = { 'debit': direction * pay_amount>0 and direction * pay_amount, @@ -1294,12 +1294,12 @@ class account_invoice_tax(osv.osv): 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."), 'tax_amount': fields.float('Tax Code Amount', digits=(16,int(config['price_accuracy']))), } - + def base_change(self, cr, uid, ids, base,currency_id=False,company_id=False,date_invoice=False): cur_obj = self.pool.get('res.currency') company_obj = self.pool.get('res.company') company_currency=False - if company_id: + if company_id: company_currency = company_obj.read(cr,uid,[company_id],['currency_id'])[0]['currency_id'][0] if currency_id and company_currency: base = cur_obj.compute(cr, uid, currency_id, company_currency, base, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False) @@ -1314,7 +1314,7 @@ class account_invoice_tax(osv.osv): if currency_id and company_currency: amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False) return {'value': {'tax_amount':amount}} - + _order = 'sequence' _defaults = { 'manual': lambda *a: 1, diff --git a/addons/account/process/statement_process.xml b/addons/account/process/statement_process.xml index dca17833a54..704f9f47025 100755 --- a/addons/account/process/statement_process.xml +++ b/addons/account/process/statement_process.xml @@ -1,21 +1,21 @@ - + - + - + - + @@ -26,7 +26,7 @@ - + @@ -37,7 +37,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -72,16 +72,17 @@ - + - + + - + @@ -90,6 +91,6 @@ - + \ No newline at end of file diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 7a963c73bf6..716f182c948 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -80,7 +80,7 @@ - + Accounts to Renew ir.actions.act_window @@ -88,7 +88,7 @@ form tree,form [('date','<',time.strftime('%Y-%m-%d %H:%M:%S'))] - + @@ -105,10 +105,10 @@ id="account_analytic_def_chart" parent="account_analytic_def_account"/> - + - + New Analytic Account account.analytic.account @@ -182,7 +182,7 @@ form - + diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml index a2eba871db4..396e195ac5a 100644 --- a/addons/account/security/account_security.xml +++ b/addons/account/security/account_security.xml @@ -38,7 +38,7 @@ Account Entry - + @@ -51,7 +51,7 @@ Entry lines - + diff --git a/addons/account/wizard/wizard_use_model.py b/addons/account/wizard/wizard_use_model.py index 19594fe0b21..7d8b9cad12e 100644 --- a/addons/account/wizard/wizard_use_model.py +++ b/addons/account/wizard/wizard_use_model.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## @@ -36,7 +36,7 @@ model_fields = { form = """
-
- + Production Dashboard board.board diff --git a/addons/crm_configuration/crm_config.py b/addons/crm_configuration/crm_config.py index f4873bb1735..326e360c5e5 100644 --- a/addons/crm_configuration/crm_config.py +++ b/addons/crm_configuration/crm_config.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## @@ -75,7 +75,7 @@ class crm_cases(osv.osv): 'partner_name2': fields.char('Employee Email', size=64), 'partner_phone': fields.char('Phone', size=32), 'partner_mobile': fields.char('Mobile', size=32), - 'child_ids': fields.one2many('crm.case', 'case_id', 'Events'), + 'child_ids': fields.one2many('crm.case', 'case_id', 'Events'), } def stage_next(self, cr, uid, ids, context={}): @@ -125,11 +125,11 @@ class crm_menu_config_wizard(osv.osv_memory): 'opportunity': fields.boolean('Business Opportunities', help="Tracks identified business opportunities for your sales pipeline."), 'jobs': fields.boolean('Jobs Hiring Process', help="Help you to organise the jobs hiring process: evaluation, meetings, email integration..."), 'document_ics': fields.boolean('Shared Calendar', help=" Will allow you to synchronise your Open ERP calendars with your phone, outlook, Sunbird, ical, ..."), - 'bugs': fields.boolean('Bug Tracking', help="Used by companies to track bugs and support requests on softwares"), + 'bugs': fields.boolean('Bug Tracking', help="Used by companies to track bugs and support requests on software"), 'helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."), 'fund': fields.boolean('Fund Raising Operations', help="This may help associations in their fund raising process and tracking."), 'claims': fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."), - 'phonecall': fields.boolean('Phone Calls', help="Help you to encode the result of a phone call or to planify a list of phone calls to process."), + 'phonecall': fields.boolean('Phone Calls', help="Help you to encode the result of a phone call or to plan a list of phone calls to process."), } _defaults = { 'meeting': lambda *args: True, @@ -190,42 +190,42 @@ crm_menu_config_wizard() class crm_generic_wizard(osv.osv_memory): _name = 'crm.generic_wizard' - - _columns = { + + _columns = { 'section_id': fields.many2one('crm.case.section', 'Section', required=True), 'user_id': fields.many2one('res.users', 'Responsible'), } - + def _get_default_section(self, cr, uid, context): case_id = context.get('active_id',False) if not case_id: return False - case_obj = self.pool.get('crm.case') + case_obj = self.pool.get('crm.case') case = case_obj.read(cr, uid, case_id, ['state','section_id']) if case['state'] in ('done'): - raise osv.except_osv(_('Error !'), _('You can not assign Closed Case.')) + raise osv.except_osv(_('Error !'), _('You can not assign Closed Case.')) return case['section_id'] - - + + _defaults = { 'section_id': _get_default_section - } + } def action_create(self, cr, uid, ids, context=None): - case_obj = self.pool.get('crm.case') + case_obj = self.pool.get('crm.case') case_id = context.get('active_id',[]) res = self.read(cr, uid, ids)[0] case = case_obj.read(cr, uid, case_id, ['state']) if case['state'] in ('done'): - raise osv.except_osv(_('Error !'), _('You can not assign Closed Case.')) + raise osv.except_osv(_('Error !'), _('You can not assign Closed Case.')) new_case_id = case_obj.copy(cr, uid, case_id, default= { 'section_id':res.get('section_id',False), 'user_id':res.get('user_id',False) }, context=context) - case_obj.write(cr, uid, case_id, {'case_id':new_case_id}, context=context) - case_obj.case_close(cr, uid, [case_id]) - return {} - + case_obj.write(cr, uid, case_id, {'case_id':new_case_id}, context=context) + case_obj.case_close(cr, uid, [case_id]) + return {} + crm_generic_wizard() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_configuration/wizard/meeting_planify.py b/addons/crm_configuration/wizard/meeting_planify.py index 50f897983b8..e6b93d11e8f 100644 --- a/addons/crm_configuration/wizard/meeting_planify.py +++ b/addons/crm_configuration/wizard/meeting_planify.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## @@ -29,7 +29,7 @@ import pooler from tools.translate import _ case_form = """ -
+