diff --git a/addons/account/account.py b/addons/account/account.py index f946723e350..06060f59e28 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -616,17 +616,17 @@ class account_journal(osv.osv): 'type_control_ids': fields.many2many('account.account.type', 'account_journal_type_rel', 'journal_id','type_id', 'Type Controls', domain=[('code','<>','view'), ('code', '<>', 'closed')]), 'account_control_ids': fields.many2many('account.account', 'account_account_type_rel', 'journal_id','account_id', 'Account', domain=[('type','<>','view'), ('type', '<>', 'closed')]), 'view_id': fields.many2one('account.journal.view', 'Display Mode', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."), - 'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]",help="It acts as a default account for credit amount"), - 'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]",help="It acts as a default account for debit amount"), + 'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]", help="It acts as a default account for credit amount"), + 'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]", help="It acts as a default account for debit amount"), 'centralisation': fields.boolean('Centralised counterpart', help="Check this box to determine that each entry of this journal won't create a new counterpart but will share the same counterpart. This is used in fiscal year closing."), - 'update_posted': fields.boolean('Allow Cancelling Entries',help="Check this box if you want to cancel the entries related to this journal or want to cancel the invoice related to this journal"), + 'update_posted': fields.boolean('Allow Cancelling Entries', help="Check this box if you want to allow the cancellation the entries related to this journal or of the invoice related to this journal"), 'group_invoice_lines': fields.boolean('Group invoice lines', help="If this box is checked, the system will try to group the accounting lines when generating them from invoices."), 'sequence_id': fields.many2one('ir.sequence', 'Entry Sequence', help="The sequence gives the display order for a list of journals", required=True), 'user_id': fields.many2one('res.users', 'User', help="The user responsible for this journal"), 'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'), 'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'), 'entry_posted': fields.boolean('Skip \'Draft\' State for Created Entries', help='Check this box if you don\'t want new account moves to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation.'), - 'company_id': fields.many2one('res.company', 'Company', required=True,select=1,help="Company associated with a journal"), + 'company_id': fields.many2one('res.company', 'Company', required=True, select=1, help="Company related to this journal"), 'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \ help="The sequence used for invoice numbers in this journal."), 'allow_date':fields.boolean('Check Date not in the Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'), @@ -678,7 +678,6 @@ class account_journal(osv.osv): res= {'value':{'centralisation': False}} return res - account_journal() class account_fiscalyear(osv.osv): @@ -772,7 +771,7 @@ class account_period(osv.osv): 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True), 'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True, help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'), - 'company_id': fields.related('fiscalyear_id','company_id',type='many2one',relation='res.company',string='Company',store=True) + 'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True) } _defaults = { 'state': lambda *a: 'draft', @@ -878,7 +877,7 @@ class account_journal_period(osv.osv): 'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'State', required=True, readonly=True, help='When journal period is created. The state is \'Draft\'. If a report is printed it comes to \'Printed\' state. When all transactions are done, it comes in \'Done\' state.'), 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'), - 'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company') + 'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company') } def _check(self, cr, uid, ids, context={}): diff --git a/addons/account/company.py b/addons/account/company.py index 8aa41dc47c6..8ea9c80f694 100644 --- a/addons/account/company.py +++ b/addons/account/company.py @@ -34,4 +34,4 @@ void. Do not hesitate to contact our accounting department' } res_company() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account/installer.py b/addons/account/installer.py index b1ba6221fff..45ea43040a4 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -23,7 +23,6 @@ import datetime from dateutil.relativedelta import relativedelta from os.path import join as opj from operator import itemgetter - from tools.translate import _ from osv import fields, osv import netsvc diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 3871d089db7..f478881ac7c 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -932,13 +932,13 @@ class account_invoice(osv.osv): account_move_obj = self.pool.get('account.move') invoices = self.read(cr, uid, ids, ['move_id', 'payment_ids']) for i in invoices: - if i['move_id']: + if i['move_id']: account_move_obj.button_cancel(cr, uid, [i['move_id'][0]]) # delete the move this invoice was pointing to # Note that the corresponding move_lines and move_reconciles # will be automatically deleted too account_move_obj.unlink(cr, uid, [i['move_id'][0]]) - if i['payment_ids']: + if i['payment_ids']: account_move_line_obj = self.pool.get('account.move.line') pay_ids = account_move_line_obj.browse(cr, uid , i['payment_ids']) for move_line in pay_ids: diff --git a/addons/account/partner.py b/addons/account/partner.py index c4faf780886..bfd74889c1c 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -187,7 +187,7 @@ class res_partner(osv.osv): help="This payment term will be used instead of the default one for the current partner"), 'ref_companies': fields.one2many('res.company', 'partner_id', 'Companies that refers to partner'), - 'last_reconciliation_date': fields.datetime('Last Reconcilation Date', help='Date on which partner account entries reconciled last time') + 'last_reconciliation_date': fields.datetime('Last Reconciliation Date', help='Date on which partner account entries reconciled last time') } res_partner() diff --git a/addons/account/product.py b/addons/account/product.py index 0d17b83ea58..ce91b9b0743 100644 --- a/addons/account/product.py +++ b/addons/account/product.py @@ -20,7 +20,6 @@ ############################################################################## import time - import netsvc from osv import fields, osv diff --git a/addons/account/wizard/account_move_line_select.py b/addons/account/wizard/account_move_line_select.py index 32ecf85f375..546bb08c754 100644 --- a/addons/account/wizard/account_move_line_select.py +++ b/addons/account/wizard/account_move_line_select.py @@ -43,7 +43,6 @@ class account_move_line_select(osv.osv_memory): else: fiscalyear_ids = [context['fiscalyear']] -# fiscalyear_ids = fiscalyear_obj.search(cr, uid, [('state', '=', 'draft')]) fiscalyears = fiscalyear_obj.browse(cr, uid, fiscalyear_ids) period_ids = [] diff --git a/addons/account/wizard/account_reconcile_partner_process_view.xml b/addons/account/wizard/account_reconcile_partner_process_view.xml index cd296759752..4c5bcf840ab 100644 --- a/addons/account/wizard/account_reconcile_partner_process_view.xml +++ b/addons/account/wizard/account_reconcile_partner_process_view.xml @@ -4,7 +4,7 @@ - Account Partner Reconcile + Partner Reconcilation Process account.partner.reconcile.process form @@ -24,7 +24,7 @@ - Manual Reconciliation + Reconciliation: Go to Next Partner account.partner.reconcile.process ir.actions.act_window form diff --git a/addons/account_coda/wizard/coda_import.py b/addons/account_coda/wizard/coda_import.py index 34054bc5009..82fc7bf877c 100644 --- a/addons/account_coda/wizard/coda_import.py +++ b/addons/account_coda/wizard/coda_import.py @@ -221,7 +221,7 @@ def _coda_parsing(self, cr, uid, data, context): bk_st_id = pool.get('account.bank.statement').create(cr,uid,{ 'journal_id': statement['journal_id'], 'date':time.strftime('%Y-%m-%d',time.strptime(statement['date'],"%y/%m/%d")), -# 'period_id':statement['period_id'], + 'period_id':statement['period_id'], 'balance_start': statement["balance_start"], 'balance_end_real': statement["balance_end_real"], 'state': 'draft', diff --git a/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py b/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py index f919299e583..d40829cf120 100644 --- a/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py +++ b/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py @@ -164,7 +164,6 @@ class hr_sign_in_out(osv.osv_memory): return {} # To do: Return Success message def sign_out(self, cr, uid, data, context=None): - emp_id = data['emp_id'] if 'last_time' in data: if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'): diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py index 1a110d21151..e619df22683 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py @@ -72,7 +72,6 @@ class hr_timesheet_invoice_create(osv.osv_memory): result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter') res = mod_obj.read(cr, uid, result, ['res_id']) data = self.read(cr, uid, ids, [], context)[0] - account_ids = data['accounts'] for account in analytic_account_obj.browse(cr, uid, account_ids, context): partner = account.partner_id diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 94d0e912bcf..2eb352974d7 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -151,16 +151,13 @@ class hr_timesheet_sheet(osv.osv): raise osv.except_osv(_('Error !'), _('You can not duplicate a timesheet !')) def button_confirm(self, cr, uid, ids, context=None): - if context is None: context = {} for sheet in self.browse(cr, uid, ids, context=context): di = sheet.user_id.company_id.timesheet_max_difference - if (abs(sheet.total_difference) < di) or not di: wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'hr_timesheet_sheet.sheet', sheet.id, 'confirm', cr) - else: raise osv.except_osv(_('Warning !'), _('Please verify that the total difference of the sheet is lower than %.2f !') %(di,)) return True