diff --git a/addons/account/account.py b/addons/account/account.py index 8c7f058acc6..3959799f1bb 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -25,8 +25,9 @@ from dateutil.relativedelta import relativedelta from operator import itemgetter import time +import openerp from openerp import SUPERUSER_ID -from openerp import pooler, tools +from openerp import tools from openerp.osv import fields, osv from openerp.tools.translate import _ from openerp.tools.float_utils import float_round @@ -131,7 +132,6 @@ class account_payment_term_line(osv.osv): (_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2%.', ['value_amount']), ] -account_payment_term_line() class account_account_type(osv.osv): _name = "account.account.type" @@ -197,7 +197,6 @@ class account_account_type(osv.osv): } _order = "code" -account_account_type() def _code_get(self, cr, uid, context=None): acc_type_obj = self.pool.get('account.account.type') @@ -211,7 +210,6 @@ def _code_get(self, cr, uid, context=None): class account_tax(osv.osv): _name = 'account.tax' -account_tax() class account_account(osv.osv): _order = "parent_left" @@ -696,7 +694,6 @@ class account_account(osv.osv): self._check_moves(cr, uid, ids, "unlink", context=context) return super(account_account, self).unlink(cr, uid, ids, context=context) -account_account() class account_journal(osv.osv): _name = "account.journal" @@ -848,7 +845,6 @@ class account_journal(osv.osv): return self.name_get(cr, user, ids, context=context) -account_journal() class account_fiscalyear(osv.osv): _name = "account.fiscalyear" @@ -944,7 +940,6 @@ class account_fiscalyear(osv.osv): ids = self.search(cr, user, [('name', operator, name)]+ args, limit=limit) return self.name_get(cr, user, ids, context=context) -account_fiscalyear() class account_period(osv.osv): _name = "account.period" @@ -1006,8 +1001,7 @@ class account_period(osv.osv): def find(self, cr, uid, dt=None, context=None): if context is None: context = {} if not dt: - dt = fields.date.context_today(self,cr,uid,context=context) -#CHECKME: shouldn't we check the state of the period? + dt = fields.date.context_today(self, cr, uid, context=context) args = [('date_start', '<=' ,dt), ('date_stop', '>=', dt)] if context.get('company_id', False): args.append(('company_id', '=', context['company_id'])) @@ -1015,7 +1009,7 @@ class account_period(osv.osv): company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id args.append(('company_id', '=', company_id)) result = [] - if context.get('account_period_prefer_normal'): + if context.get('account_period_prefer_normal', True): # look for non-special periods first, and fallback to all if no result is found result = self.search(cr, uid, args + [('special', '=', False)], context=context) if not result: @@ -1026,6 +1020,9 @@ class account_period(osv.osv): def action_draft(self, cr, uid, ids, *args): mode = 'draft' + for period in self.browse(cr, uid, ids): + if period.fiscalyear_id.state == 'done': + raise osv.except_osv(_('Warning !'), _('You can not re-open a period which belongs to closed fiscal year')) cr.execute('update account_journal_period set state=%s where period_id in %s', (mode, tuple(ids),)) cr.execute('update account_period set state=%s where id in %s', (mode, tuple(ids),)) return True @@ -1067,7 +1064,6 @@ class account_period(osv.osv): return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)]) return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id), ('special', '=', False)]) -account_period() class account_journal_period(osv.osv): _name = "account.journal.period" @@ -1124,7 +1120,6 @@ class account_journal_period(osv.osv): } _order = "period_id" -account_journal_period() class account_fiscalyear(osv.osv): _inherit = "account.fiscalyear" @@ -1141,7 +1136,6 @@ class account_fiscalyear(osv.osv): }) return super(account_fiscalyear, self).copy(cr, uid, id, default=default, context=context) -account_fiscalyear() #---------------------------------------------------------- # Entries #---------------------------------------------------------- @@ -1219,7 +1213,7 @@ class account_move(osv.osv): return res def _get_period(self, cr, uid, context=None): - ctx = dict(context or {}, account_period_prefer_normal=True) + ctx = dict(context or {}) period_ids = self.pool.get('account.period').find(cr, uid, context=ctx) return period_ids[0] @@ -1380,6 +1374,7 @@ class account_move(osv.osv): 'ref':False, 'balance':False, 'account_tax_id':False, + 'statement_id': False, }) if 'journal_id' in vals and vals.get('journal_id', False): @@ -1416,6 +1411,7 @@ class account_move(osv.osv): context = {} if context is None else context.copy() default.update({ 'state':'draft', + 'ref': False, 'name':'/', }) context.update({ @@ -1637,7 +1633,6 @@ class account_move(osv.osv): valid_moves = [move.id for move in valid_moves] return len(valid_moves) > 0 and valid_moves or False -account_move() class account_move_reconcile(osv.osv): _name = "account.move.reconcile" @@ -1711,7 +1706,6 @@ class account_move_reconcile(osv.osv): result.append((r.id,r.name)) return result -account_move_reconcile() #---------------------------------------------------------- # Tax @@ -1791,7 +1785,7 @@ class account_tax_code(osv.osv): if context.get('period_id', False): period_id = context['period_id'] else: - period_id = self.pool.get('account.period').find(cr, uid) + period_id = self.pool.get('account.period').find(cr, uid, context=context) if not period_id: return dict.fromkeys(ids, 0.0) period_id = period_id[0] @@ -1859,7 +1853,6 @@ class account_tax_code(osv.osv): ] _order = 'code' -account_tax_code() class account_tax(osv.osv): """ @@ -1883,7 +1876,7 @@ class account_tax(osv.osv): def get_precision_tax(): def change_digit_tax(cr): - res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, SUPERUSER_ID, 'Account') + res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account') return (16, res+2) return change_digit_tax @@ -2267,7 +2260,6 @@ class account_tax(osv.osv): total += r['amount'] return res -account_tax() # --------------------------------------------------------- # Account Entries Models @@ -2379,7 +2371,6 @@ class account_model(osv.osv): return {'value': {'company_id': company_id}} -account_model() class account_model_line(osv.osv): _name = "account.model.line" @@ -2403,7 +2394,6 @@ class account_model_line(osv.osv): ('credit_debit1', 'CHECK (credit*debit=0)', 'Wrong credit or debit value in model, they must be positive!'), ('credit_debit2', 'CHECK (credit+debit>=0)', 'Wrong credit or debit value in model, they must be positive!'), ] -account_model_line() # --------------------------------------------------------- # Account Subscription @@ -2477,7 +2467,6 @@ class account_subscription(osv.osv): self.write(cr, uid, ids, {'state':'running'}) return True -account_subscription() class account_subscription_line(osv.osv): _name = "account.subscription.line" @@ -2506,7 +2495,6 @@ class account_subscription_line(osv.osv): _rec_name = 'date' -account_subscription_line() # --------------------------------------------------------------- # Account Templates: Account, Tax, Tax Code and chart. + Wizard @@ -2514,7 +2502,6 @@ account_subscription_line() class account_tax_template(osv.osv): _name = 'account.tax.template' -account_tax_template() class account_account_template(osv.osv): _order = "code" @@ -2642,7 +2629,6 @@ class account_account_template(osv.osv): obj_acc._parent_store_compute(cr) return acc_template_ref -account_account_template() class account_add_tmpl_wizard(osv.osv_memory): """Add one more account from the template. @@ -2696,7 +2682,6 @@ class account_add_tmpl_wizard(osv.osv_memory): def action_cancel(self, cr, uid, ids, context=None): return { 'type': 'state', 'state': 'end' } -account_add_tmpl_wizard() class account_tax_code_template(osv.osv): @@ -2768,7 +2753,6 @@ class account_tax_code_template(osv.osv): (_check_recursion, 'Error!\nYou cannot create recursive Tax Codes.', ['parent_id']) ] _order = 'code,name' -account_tax_code_template() class account_chart_template(osv.osv): @@ -2801,7 +2785,6 @@ class account_chart_template(osv.osv): 'complete_tax_set': True, } -account_chart_template() class account_tax_template(osv.osv): @@ -2931,7 +2914,6 @@ class account_tax_template(osv.osv): res.update({'tax_template_to_tax': tax_template_to_tax, 'account_dict': todo_dict}) return res -account_tax_template() # Fiscal Position Templates @@ -2979,7 +2961,6 @@ class account_fiscal_position_template(osv.osv): }) return True -account_fiscal_position_template() class account_fiscal_position_tax_template(osv.osv): _name = 'account.fiscal.position.tax.template' @@ -2992,7 +2973,6 @@ class account_fiscal_position_tax_template(osv.osv): 'tax_dest_id': fields.many2one('account.tax.template', 'Replacement Tax') } -account_fiscal_position_tax_template() class account_fiscal_position_account_template(osv.osv): _name = 'account.fiscal.position.account.template' @@ -3004,7 +2984,6 @@ class account_fiscal_position_account_template(osv.osv): 'account_dest_id': fields.many2one('account.account.template', 'Account Destination', domain=[('type','<>','view')], required=True) } -account_fiscal_position_account_template() # --------------------------------------------------------- # Account generation from template wizards @@ -3397,7 +3376,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): try: tmp2 = obj_data.get_object_reference(cr, uid, *ref) if tmp2: - self.pool.get(tmp2[0]).write(cr, uid, tmp2[1], { + self.pool[tmp2[0]].write(cr, uid, tmp2[1], { 'currency_id': obj_wizard.currency_id.id }) except ValueError, e: @@ -3544,7 +3523,6 @@ class wizard_multi_charts_accounts(osv.osv_memory): current_num += 1 return True -wizard_multi_charts_accounts() class account_bank_accounts_wizard(osv.osv_memory): _name='account.bank.accounts.wizard' @@ -3556,6 +3534,5 @@ class account_bank_accounts_wizard(osv.osv_memory): 'account_type': fields.selection([('cash','Cash'), ('check','Check'), ('bank','Bank')], 'Account Type', size=32), } -account_bank_accounts_wizard() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index f3617106f28..e141f33b9d1 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -143,7 +143,6 @@ class account_analytic_line(osv.osv): return res return False -account_analytic_line() class res_partner(osv.osv): """ Inherits partner and adds contract information in the partner form """ @@ -154,6 +153,5 @@ class res_partner(osv.osv): 'partner_id', 'Contracts', readonly=True), } -res_partner() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 8e1a5dd26c6..023765d73f0 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -61,7 +61,7 @@ class account_bank_statement(osv.osv): return res def _get_period(self, cr, uid, context=None): - periods = self.pool.get('account.period').find(cr, uid,context=context) + periods = self.pool.get('account.period').find(cr, uid, context=context) if periods: return periods[0] return False @@ -500,7 +500,6 @@ class account_bank_statement(osv.osv): 'context':ctx, } -account_bank_statement() class account_bank_statement_line(osv.osv): @@ -576,6 +575,5 @@ class account_bank_statement_line(osv.osv): 'type': 'general', } -account_bank_statement_line() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 86d3b0d24de..40f0ca80738 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -66,7 +66,6 @@ class account_cashbox_line(osv.osv): 'bank_statement_id' : fields.many2one('account.bank.statement', ondelete='cascade'), } -account_cashbox_line() class account_cash_statement(osv.osv): @@ -316,7 +315,6 @@ class account_cash_statement(osv.osv): return self.write(cr, uid, ids, {'closing_date': time.strftime("%Y-%m-%d %H:%M:%S")}, context=context) -account_cash_statement() class account_journal(osv.osv): _inherit = 'account.journal' @@ -336,7 +334,6 @@ class account_journal(osv.osv): 'cashbox_line_ids' : _default_cashbox_line_ids, } -account_journal() class account_journal_cashbox_line(osv.osv): _name = 'account.journal.cashbox.line' @@ -348,6 +345,5 @@ class account_journal_cashbox_line(osv.osv): _order = 'pieces asc' -account_journal_cashbox_line() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/account_financial_report.py b/addons/account/account_financial_report.py index 1d9a4a794eb..0c2e5845b89 100644 --- a/addons/account/account_financial_report.py +++ b/addons/account/account_financial_report.py @@ -24,8 +24,6 @@ from datetime import datetime from dateutil.relativedelta import relativedelta from operator import itemgetter -from openerp import netsvc -from openerp import pooler from openerp.osv import fields, osv import openerp.addons.decimal_precision as dp from openerp.tools.translate import _ @@ -140,6 +138,5 @@ class account_financial_report(osv.osv): 'style_overwrite': 0, } -account_financial_report() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index af762611ec2..b22afa3f931 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -24,7 +24,6 @@ from lxml import etree import openerp.addons.decimal_precision as dp import openerp.exceptions -from openerp import pooler from openerp.osv import fields, osv, orm from openerp.tools.translate import _ @@ -314,7 +313,7 @@ class account_invoice(osv.osv): context = {} if context.get('active_model', '') in ['res.partner'] and context.get('active_ids', False) and context['active_ids']: - partner = self.pool.get(context['active_model']).read(cr, uid, context['active_ids'], ['supplier','customer'])[0] + partner = self.pool[context['active_model']].read(cr, uid, context['active_ids'], ['supplier','customer'])[0] if not view_type: view_id = self.pool.get('ir.ui.view').search(cr, uid, [('name', '=', 'account.invoice.tree')]) view_type = 'tree' @@ -368,18 +367,6 @@ class account_invoice(osv.osv): context['view_id'] = view_id return context - def create(self, cr, uid, vals, context=None): - if context is None: - context = {} - try: - return super(account_invoice, self).create(cr, uid, vals, context) - except Exception, e: - if '"journal_id" viol' in e.args[0]: - raise orm.except_orm(_('Configuration Error!'), - _('There is no Sale/Purchase Journal(s) defined.')) - else: - raise orm.except_orm(_('Unknown Error!'), str(e)) - def invoice_print(self, cr, uid, ids, context=None): ''' This function prints the invoice and mark it as sent, so that we can see more easily the next step of the workflow @@ -422,6 +409,7 @@ class account_invoice(osv.osv): 'mark_invoice_as_sent': True, }) return { + 'name': _('Compose Email'), 'type': 'ir.actions.act_window', 'view_type': 'form', 'view_mode': 'form', @@ -997,8 +985,7 @@ class account_invoice(osv.osv): 'narration':inv.comment } period_id = inv.period_id and inv.period_id.id or False - ctx.update(company_id=inv.company_id.id, - account_period_prefer_normal=True) + ctx.update(company_id=inv.company_id.id) if not period_id: period_ids = period_obj.find(cr, uid, inv.date_invoice, context=ctx) period_id = period_ids and period_ids[0] or False @@ -1596,7 +1583,6 @@ class account_invoice_line(osv.osv): unique_tax_ids = product_change_result['value']['invoice_line_tax_id'] return {'value':{'invoice_line_tax_id': unique_tax_ids}} -account_invoice_line() class account_invoice_tax(osv.osv): _name = "account.invoice.tax" diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 8c0854bd6c6..379fc72a953 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -453,10 +453,11 @@ - + + @@ -621,8 +622,6 @@ - - 0 AND credit > 0 AND (last_reconciliation_date IS NULL OR max_date > last_reconciliation_date) ORDER BY last_reconciliation_date""") - ids = cr.fetchall() - ids = len(ids) and [x[0] for x in ids] or [] - return self.pool.get('res.partner').name_get(cr, uid, ids, context=context) + ids = [x[0] for x in cr.fetchall()] + if not ids: + return [] + + # To apply the ir_rules + partner_obj = self.pool.get('res.partner') + ids = partner_obj.search(cr, uid, [('id', 'in', ids)], context=context) + return partner_obj.name_get(cr, uid, ids, context=context) def reconcile_partial(self, cr, uid, ids, type='auto', context=None, writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False): move_rec_obj = self.pool.get('account.move.reconcile') @@ -980,8 +986,7 @@ class account_move_line(osv.osv): if context is None: context = {} period_pool = self.pool.get('account.period') - ctx = dict(context, account_period_prefer_normal=True) - pids = period_pool.find(cr, user, date, context=ctx) + pids = period_pool.find(cr, user, date, context=context) if pids: res.update({ 'period_id':pids[0] @@ -1303,6 +1308,5 @@ class account_move_line(osv.osv): bool(journal.currency),bool(journal.analytic_journal_id))) return result -account_move_line() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index 0017409f416..6e121c9f5a5 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -11,7 +11,7 @@ - + - + + Journal Items + account.move.line + {'search_default_partner_id': [active_id], 'default_partner_id': active_id} + + account.move.line @@ -1771,23 +1776,6 @@ - - - - - , 2012. +# Els Van Vossel , 2012, 2013. msgid "" msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2012-12-19 18:03+0000\n" +"PO-Revision-Date: 2013-04-15 23:02+0000\n" "Last-Translator: Els Van Vossel (Agaplan) \n" "Language-Team: Els Van Vossel\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:20+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-04-17 05:15+0000\n" +"X-Generator: Launchpad (build 16567)\n" "Language: nl\n" #. module: account @@ -258,7 +258,7 @@ msgstr "Belgische rapporten" #. module: account #: model:mail.message.subtype,name:account.mt_invoice_validated msgid "Validated" -msgstr "" +msgstr "Goedgekeurd" #. module: account #: model:account.account.type,name:account.account_type_income_view1 @@ -473,14 +473,14 @@ msgstr "" #. module: account #: help:account.bank.statement.line,name:0 msgid "Originator to Beneficiary Information" -msgstr "" +msgstr "Informatie Afzender naar Begunstigde" #. module: account #. openerp-web #: code:addons/account/static/src/xml/account_move_line_quickadd.xml:8 #, python-format msgid "Period :" -msgstr "" +msgstr "Periode:" #. module: account #: field:account.account.template,chart_template_id:0 @@ -494,6 +494,7 @@ msgstr "Boekhoudplansjabloon" #: selection:account.invoice.refund,filter_refund:0 msgid "Modify: create refund, reconcile and create a new draft invoice" msgstr "" +"Wijzigen: factuur crediteren, afpunten en een nieuwe conceptfactuur maken" #. module: account #: help:account.config.settings,tax_calculation_rounding_method:0 @@ -803,7 +804,7 @@ msgstr "Stel de bankrekeningen van uw bedrijf in" #. module: account #: view:account.invoice.refund:0 msgid "Create Refund" -msgstr "" +msgstr "Creditnota maken" #. module: account #: constraint:account.move.line:0 @@ -833,7 +834,7 @@ msgstr "Bent u zeker dat u de boeking wilt uitvoeren?" #: code:addons/account/account_invoice.py:1330 #, python-format msgid "Invoice partially paid: %s%s of %s%s (%s%s remaining)." -msgstr "" +msgstr "Factuur is gedeeltelijk betaald: %s%s of %s%s (%s%s blijft open)" #. module: account #: view:account.invoice:0 @@ -1010,6 +1011,8 @@ msgid "" " opening/closing fiscal " "year process." msgstr "" +"U kunt geen afpunting ongedaan maken als deze afpunting voortkomt uit een " +"heropening." #. module: account #: model:ir.actions.act_window,name:account.action_subscription_form_new @@ -1052,7 +1055,7 @@ msgstr "Aankoopjournaal" #. module: account #: model:mail.message.subtype,description:account.mt_invoice_paid msgid "Invoice paid" -msgstr "" +msgstr "Factuur betaald" #. module: account #: view:validate.account.move:0 @@ -1375,6 +1378,8 @@ msgid "" "The amount expressed in the secondary currency must be positif when journal " "item are debit and negatif when journal item are credit." msgstr "" +"Het bedrag in secundaire munt moet positief zijn als de boekingslijn debet " +"is en negatief bij een creditbedrag." #. module: account #: view:account.invoice.cancel:0 @@ -1940,7 +1945,7 @@ msgstr "Verkopen per rekeningtype" #: model:account.payment.term,name:account.account_payment_term_15days #: model:account.payment.term,note:account.account_payment_term_15days msgid "15 Days" -msgstr "" +msgstr "15 dagen" #. module: account #: model:ir.ui.menu,name:account.periodical_processing_invoicing @@ -2084,7 +2089,7 @@ msgstr "Voorlopig rekeninguittreksel" #. module: account #: model:mail.message.subtype,description:account.mt_invoice_validated msgid "Invoice validated" -msgstr "" +msgstr "Factuur goedgekeurd" #. module: account #: field:account.config.settings,module_account_check_writing:0 @@ -2342,6 +2347,7 @@ msgid "" "You cannot change the type of account to '%s' type as it contains journal " "items!" msgstr "" +"U kunt het rekeningtype niet wijzigen in '%s' omdat er al boekingen zijn." #. module: account #: model:ir.model,name:account.model_account_aged_trial_balance @@ -2358,7 +2364,7 @@ msgstr "Boekjaar afsluiten" #: code:addons/account/static/src/xml/account_move_line_quickadd.xml:14 #, python-format msgid "Journal :" -msgstr "" +msgstr "Journaal:" #. module: account #: sql_constraint:account.fiscal.position.tax:0 @@ -2718,6 +2724,8 @@ msgid "" "You cannot change the type of account from 'Closed' to any other type as it " "contains journal items!" msgstr "" +"U kunt het rekeningtype niet wijzigen van 'Afgesloten' in een ander type als " +"er boekingen zijn." #. module: account #: field:account.invoice.report,account_line_id:0 @@ -2811,7 +2819,7 @@ msgstr "Rekeningeigenschappen" #. module: account #: selection:account.invoice.refund,filter_refund:0 msgid "Create a draft refund" -msgstr "" +msgstr "Maak een voorlopige creditnota" #. module: account #: view:account.partner.reconcile.process:0 @@ -3360,7 +3368,7 @@ msgstr "" #: view:account.unreconcile:0 #: view:account.unreconcile.reconcile:0 msgid "Unreconcile Transactions" -msgstr "" +msgstr "Afpuntingen ongedaan maken" #. module: account #: field:wizard.multi.charts.accounts,only_one_chart_template:0 @@ -3558,7 +3566,7 @@ msgstr "Aantal cijfers voor de rekeningcode" #. module: account #: field:res.partner,property_supplier_payment_term:0 msgid "Supplier Payment Term" -msgstr "" +msgstr "Betaaltermijn leverancier" #. module: account #: view:account.fiscalyear:0 @@ -3633,7 +3641,7 @@ msgstr "Elektronisch bestand" #. module: account #: field:account.move.line,reconcile:0 msgid "Reconcile Ref" -msgstr "" +msgstr "Afpuntingsreferentie" #. module: account #: field:account.config.settings,has_chart_of_accounts:0 @@ -3734,6 +3742,88 @@ msgid "" "\n" " " msgstr "" +"\n" +"
\n" +"\n" +"

Hallo ${object.partner_id.name},

\n" +"\n" +"

Er is een nieuwe factuur voor u:

\n" +" \n" +"

\n" +"   REFERENTIE
\n" +"   Factuurnummer: ${object.number}
\n" +"   Totaal: ${object.amount_total} " +"${object.currency_id.name}
\n" +"   Datum: ${object.date_invoice}
\n" +" % if object.origin:\n" +"   Referentie: ${object.origin}
\n" +" % endif\n" +" % if object.user_id:\n" +"   Uw contactpersoon: ${object.user_id.name}\n" +" % endif\n" +"

\n" +" \n" +" % if object.paypal_url:\n" +"
\n" +"

U kunt ook onmiddellijk betalen via Paypal:

\n" +" \n" +" \n" +" \n" +" % endif\n" +" \n" +"
\n" +"

Neem gerust contact met ons op als u vragen heeft.

\n" +"

Bedankt dat u hebt gekozen voor ${object.company_id.name or " +"'ons'}!

\n" +"
\n" +"
\n" +"
\n" +"

\n" +" ${object.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" % if object.company_id.street:\n" +" ${object.company_id.street}
\n" +" % endif\n" +" % if object.company_id.street2:\n" +" ${object.company_id.street2}
\n" +" % endif\n" +" % if object.company_id.city or object.company_id.zip:\n" +" ${object.company_id.zip} ${object.company_id.city}
\n" +" % endif\n" +" % if object.company_id.country_id:\n" +" ${object.company_id.state_id and ('%s, ' % " +"object.company_id.state_id.name) or ''} ${object.company_id.country_id.name " +"or ''}
\n" +" % endif\n" +"
\n" +" % if object.company_id.phone:\n" +"
\n" +" Tel.:  ${object.company_id.phone}\n" +"
\n" +" % endif\n" +" % if object.company_id.website:\n" +"
\n" +" Web: ${object.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " #. module: account #: view:account.period:0 @@ -3922,6 +4012,8 @@ msgid "" "You cannot create journal items with a secondary currency without recording " "both 'currency' and 'amount currency' field." msgstr "" +"U kunt geen boekingslijnen in een secundaire munt maken zonder beide velden " +"'valuta' en 'bedrag valuta' in te vullen." #. module: account #: field:account.financial.report,display_detail:0 @@ -4224,7 +4316,7 @@ msgstr "" #. module: account #: model:ir.model,name:account.model_account_journal_cashbox_line msgid "account.journal.cashbox.line" -msgstr "" +msgstr "account.journal.cashbox.line" #. module: account #: model:ir.model,name:account.model_account_partner_reconcile_process @@ -4498,7 +4590,7 @@ msgstr "Uw bankrekeningen instellen" #. module: account #: xsl:account.transfer:0 msgid "Partner ID" -msgstr "" +msgstr "Relatie-ID" #. module: account #: help:account.bank.statement,message_ids:0 @@ -4704,6 +4796,8 @@ msgid "" "This payment term will be used instead of the default one for sale orders " "and customer invoices" msgstr "" +"Deze betalingsvoorwaarde vervangt de standaardvoorwaarde van de huidige " +"relatie." #. module: account #: view:account.config.settings:0 @@ -4731,7 +4825,7 @@ msgstr "Geboekte lijnen" #. module: account #: field:account.move.line,blocked:0 msgid "No Follow-up" -msgstr "" +msgstr "Geen aanmaning" #. module: account #: view:account.tax.template:0 @@ -4858,6 +4952,7 @@ msgstr "Maand" #, python-format msgid "You cannot change the code of account which contains journal items!" msgstr "" +"U kunt de code van een rekening niet wijzigen als er al boekingen zijn." #. module: account #: field:account.config.settings,purchase_sequence_prefix:0 @@ -4895,7 +4990,7 @@ msgstr "Rek.type" #. module: account #: selection:account.journal,type:0 msgid "Bank and Checks" -msgstr "" +msgstr "Bank en cheques" #. module: account #: field:account.account.template,note:0 @@ -4977,7 +5072,7 @@ msgstr "Schakel dit in als u ook rekeningen met een nulsaldo wilt weergeven." #. module: account #: field:account.move.reconcile,opening_reconciliation:0 msgid "Opening Entries Reconciliation" -msgstr "" +msgstr "Afpunting openingsboekingen" #. module: account #. openerp-web @@ -5018,7 +5113,7 @@ msgstr "Boekhoudplan" #. module: account #: field:account.invoice,reference_type:0 msgid "Payment Reference" -msgstr "" +msgstr "Betaalreferentie" #. module: account #: selection:account.financial.report,style_overwrite:0 @@ -5092,7 +5187,7 @@ msgstr "Af te punten boekingen" #. module: account #: model:ir.model,name:account.model_account_tax_template msgid "Templates for Taxes" -msgstr "" +msgstr "Btw-sjablonen" #. module: account #: sql_constraint:account.period:0 @@ -5667,6 +5762,8 @@ msgstr "Doelbewegingen" msgid "" "Move cannot be deleted if linked to an invoice. (Invoice: %s - Move ID:%s)" msgstr "" +"Boeking kan niet worden verwijderd als deze is gekoppeld aan een factuur " +"(Factuur: %s - boeking: %s)" #. module: account #: view:account.bank.statement:0 @@ -6225,6 +6322,8 @@ msgid "" "This payment term will be used instead of the default one for purchase " "orders and supplier invoices" msgstr "" +"Deze betalingsvoorwaarde vervangt de standaardvoorwaarde van de huidige " +"relatie voor aankooporders en aankoopfacturen." #. module: account #: help:account.automatic.reconcile,power:0 @@ -6734,7 +6833,7 @@ msgstr "Analytische lijn" #. module: account #: model:ir.ui.menu,name:account.menu_action_model_form msgid "Models" -msgstr "" +msgstr "Modellen" #. module: account #: code:addons/account/account_invoice.py:1091 @@ -7055,6 +7154,12 @@ msgid "" "due date, make sure that the payment term is not set on the invoice. If you " "keep the payment term and the due date empty, it means direct payment." msgstr "" +"Als u betalingstermijnen gebruikt, wordt de vervaldatum automatisch berekend " +"bij het maken van de boekingen. De betalingsvoorwaarde kan verschillende " +"vervaldatums berekenen, vb. 50% nu en 50% binnen een maand. Als u een " +"specifieke vervaldatum wilt instellen, gebruikt u beter geen " +"betalingstermijn. Als u zowel betalingstermijn als vervaldatum leeglaat, " +"gaat het om een contante betaling." #. module: account #: code:addons/account/account.py:414 @@ -7296,6 +7401,8 @@ msgid "" "If you unreconcile transactions, you must also verify all the actions that " "are linked to those transactions because they will not be disabled" msgstr "" +"Als u afgepunte transacties ongedaan maakt, moet u alle gekoppelde acties " +"nakijken, want deze worden niet ongedaan gemaakt." #. module: account #: view:account.account.template:0 @@ -7330,6 +7437,7 @@ msgid "" "You cannot provide a secondary currency if it is the same than the company " "one." msgstr "" +"U kunt geen secundaire munt ingeven die identiek is aan de firmamunt." #. module: account #: selection:account.tax.template,applicable_type:0 @@ -7467,7 +7575,7 @@ msgstr "Manueel" #. module: account #: selection:account.invoice.refund,filter_refund:0 msgid "Cancel: create refund and reconcile" -msgstr "" +msgstr "Annuleren: maak een creditnota en punt af" #. module: account #: code:addons/account/wizard/account_report_aged_partner_balance.py:58 @@ -7564,7 +7672,7 @@ msgstr "Alle boekingen" #. module: account #: constraint:account.move.reconcile:0 msgid "You can only reconcile journal items with the same partner." -msgstr "" +msgstr "U kunt enkel boekingen met dezelfde relatie afpunten." #. module: account #: view:account.journal.select:0 @@ -7682,7 +7790,7 @@ msgstr "" #. module: account #: field:account.invoice,paypal_url:0 msgid "Paypal Url" -msgstr "" +msgstr "Paypal-url" #. module: account #: field:account.config.settings,module_account_voucher:0 @@ -8390,7 +8498,7 @@ msgstr "" #. module: account #: field:account.move.line,amount_residual_currency:0 msgid "Residual Amount in Currency" -msgstr "" +msgstr "Restbedrag in valuta" #. module: account #: field:account.config.settings,sale_refund_sequence_prefix:0 @@ -8444,6 +8552,8 @@ msgid "" "Refund base on this type. You can not Modify and Cancel if the invoice is " "already reconciled" msgstr "" +"Creditnota voor dit type. U kunt niet wijzigen of annuleren als de factuur " +"al is afgepunt." #. module: account #: field:account.bank.statement.line,sequence:0 @@ -8461,7 +8571,7 @@ msgstr "Volgorde" #. module: account #: field:account.config.settings,paypal_account:0 msgid "Paypal account" -msgstr "" +msgstr "Paypal-rekening" #. module: account #: selection:account.print.journal,sort_selection:0 @@ -8730,7 +8840,7 @@ msgstr "Omgekeerde analytische balans -" #: help:account.move.reconcile,opening_reconciliation:0 msgid "" "Is this reconciliation produced by the opening of a new fiscal year ?." -msgstr "" +msgstr "Komt deze afpunting van een openingsboeking?" #. module: account #: view:account.analytic.line:0 @@ -9011,7 +9121,7 @@ msgstr "Eindbalans" #. module: account #: field:account.journal,centralisation:0 msgid "Centralized Counterpart" -msgstr "" +msgstr "Gecentraliseerde tegenboeking" #. module: account #: help:account.move.line,blocked:0 @@ -9047,6 +9157,12 @@ msgid "" "invoice will be created \n" " so that you can edit it." msgstr "" +"Gebruik deze optie als u een factuur wilt annuleren en een nieuwe maken.\n" +" De creditnota wordt gemaakt, goedgekeurd " +"en afgepunt\n" +" met de huidige factuur. Een nieuwe, " +"voorlopige factuur wordt gemaakt\n" +" die u kunt bewerken." #. module: account #: model:process.transition,name:account.process_transition_filestatement0 @@ -9079,7 +9195,7 @@ msgstr "Rekeningtypen" #. module: account #: model:email.template,subject:account.email_template_edi_invoice msgid "${object.company_id.name} Invoice (Ref ${object.number or 'n/a'})" -msgstr "" +msgstr "${object.company_id.name} Factuur (Ref. ${object.number or 'nvt' })" #. module: account #: code:addons/account/account_move_line.py:1213 @@ -9149,6 +9265,19 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" Klik om een journaal toe te voegen.\n" +"

\n" +" Een journaal groepeert boekingen in functie\n" +" van de dagelijkse bezigheden.\n" +"

\n" +" Een firma geruikt doorgaans een journaal per betaalmethode " +"(kas,\n" +" bankrekeningen, cheques), een aankoopdagboek, een " +"verkoopdagboek\n" +" en een diversendagboek.\n" +"

\n" +" " #. module: account #: model:ir.model,name:account.model_account_fiscalyear_close_state @@ -9276,6 +9405,9 @@ msgid "" "computed. Because it is space consuming, we do not allow to use it while " "doing a comparison." msgstr "" +"Met deze optie krijgt u meer details over de manier waarop de saldi worden " +"berekend. Omdat dit ruimte inneemt, is deze optie niet mogelijk bij " +"vergelijkingen." #. module: account #: model:ir.model,name:account.model_account_fiscalyear_close @@ -9292,6 +9424,8 @@ msgstr "De code van de rekening moet uniek zijn per firma." #: help:product.template,property_account_expense:0 msgid "This account will be used to value outgoing stock using cost price." msgstr "" +"Deze rekening dient voor de voorraadwaardering van de uitgaande voorraad op " +"basis van de kostprijs." #. module: account #: view:account.invoice:0 @@ -9354,6 +9488,17 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" Klik als u een nieuwe recurrente boeking wilt maken.\n" +"

\n" +" Een terugkerende boeking wordt regelmatig op een bepaald " +"tijdstip herhaald,\n" +" vb. bij vervallen van een contract of overeenkomst met een\n" +" klant of een leverancier. U kunt dergelijke boekingen " +"voorbereiden\n" +" zodat deze automatisch worden geboekt.\n" +"

\n" +" " #. module: account #: view:account.journal:0 @@ -9396,6 +9541,8 @@ msgid "" "This allows you to check writing and printing.\n" " This installs the module account_check_writing." msgstr "" +"Hiermee kunt u cheques schrijven en afdrukken.\n" +" Hiermee wordt de module account_check_writing geïnstalleerd." #. module: account #: model:res.groups,name:account.group_account_invoice @@ -9681,6 +9828,9 @@ msgid "" "chart\n" " of accounts." msgstr "" +"Bevestigde facturen kunnen niet meer\n" +" worden gewijzigd. Facturen krijgen een uniek nummer\n" +" en de boekingen worden gemaakt." #. module: account #: model:process.node,note:account.process_node_bankstatement0 @@ -9906,11 +10056,15 @@ msgid "" "payments.\n" " This installs the module account_payment." msgstr "" +"Hiermee kunt u betaalopdrachten maken\n" +" * die als basis dienen voor verdere automatisering,\n" +" * om efficiënter betalingen te kunnen uitvoeren.\n" +" Hiermee wordt de module account_payment geïnstalleerd." #. module: account #: xsl:account.transfer:0 msgid "Document" -msgstr "" +msgstr "Document" #. module: account #: view:account.chart.template:0 @@ -10132,7 +10286,7 @@ msgstr "Kan geen boekingen maken tussen verschillende firma's." #. module: account #: model:ir.ui.menu,name:account.menu_finance_periodical_processing msgid "Periodic Processing" -msgstr "" +msgstr "Periodieke verwerking" #. module: account #: view:account.invoice.report:0 @@ -10212,7 +10366,7 @@ msgstr "Vervaldatum" #: model:account.payment.term,name:account.account_payment_term_immediate #: model:account.payment.term,note:account.account_payment_term_immediate msgid "Immediate Payment" -msgstr "" +msgstr "Contante betaling" #. module: account #: code:addons/account/account.py:1464 @@ -10424,11 +10578,16 @@ msgid "" "analytic account.\n" " This installs the module account_budget." msgstr "" +"Hiermee kunnen accountants budgetten beheren.\n" +" Als de hoofdbudgetten zijn ingesteld, kunnen de " +"projectleiders\n" +" het geplande bedrag instellen per analytische rekening.\n" +" Hiermee wordt de module account_budget geïnstalleerd." #. module: account #: field:account.bank.statement.line,name:0 msgid "OBI" -msgstr "" +msgstr "Omschrijving" #. module: account #: help:res.partner,property_account_payable:0 @@ -10915,6 +11074,8 @@ msgid "" "If you unreconcile transactions, you must also verify all the actions that " "are linked to those transactions because they will not be disable" msgstr "" +"Als u afgepunte transacties ongedaan maakt, moet u alle gekoppelde acties " +"nakijken, want deze worden niet ongedaan gemaakt." #. module: account #: code:addons/account/account_move_line.py:1059 @@ -10949,6 +11110,9 @@ msgid "" "customer. The tool search can also be used to personalise your Invoices " "reports and so, match this analysis to your needs." msgstr "" +"Dit rapport biedt een overzicht van het bedrag gefactureerd aan uw klant. De " +"zoekfunctie kan worden aangepast om het overzicht van uw facturen te " +"personaliseren, zodat u de gewenste analyse krijgt." #. module: account #: view:account.partner.reconcile.process:0 @@ -11207,6 +11371,16 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" Klik als u een nieuw btw-vak wilt toevoegen.\n" +"

\n" +" Afhankelijk van uw land, dient een btw-vak om uw btw-" +"aangifte in te vullen.\n" +" In OpenERP kunt u een btw-structuur instellen en elke btw-" +"berekening\n" +" kan in een of meer btw-vakken worden opgenomen.\n" +"

\n" +" " #. module: account #: selection:account.entries.report,month:0 @@ -11233,6 +11407,18 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" Selecteer de periode en het journaal.\n" +"

\n" +" Hiermee kan de boekhouder in een sneltempo boekingen " +"invoeren in\n" +" OpenERP. Als u een aankoopfactuur wilt inboeken,\n" +" begint u met de kostenrekening. OpenERP stelt automatisch\n" +" de betrokken btw voor die is gekoppeld aan deze rekening, " +"net\n" +" als de centralisatierekening.\n" +"

\n" +" " #. module: account #: help:account.invoice.line,account_id:0 @@ -11403,7 +11589,7 @@ msgstr "Rekeningmodel" #: code:addons/account/account_cash_statement.py:292 #, python-format msgid "Loss" -msgstr "" +msgstr "Verlies" #. module: account #: selection:account.entries.report,month:0 @@ -11475,7 +11661,7 @@ msgstr "Kostenrekening van productsjabloon" #. module: account #: field:res.partner,property_payment_term:0 msgid "Customer Payment Term" -msgstr "" +msgstr "Betaaltermijn klant" #. module: account #: help:accounting.report,label_filter:0 diff --git a/addons/account/i18n/pt_BR.po b/addons/account/i18n/pt_BR.po index ba985c5e0a8..d1816589139 100644 --- a/addons/account/i18n/pt_BR.po +++ b/addons/account/i18n/pt_BR.po @@ -7,15 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2012-12-22 23:17+0000\n" -"Last-Translator: Fábio Martinelli - http://zupy.com.br " -"\n" +"PO-Revision-Date: 2013-04-18 17:44+0000\n" +"Last-Translator: Thiago Tognoli \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: 2013-03-16 05:19+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-04-19 05:24+0000\n" +"X-Generator: Launchpad (build 16567)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -431,7 +430,7 @@ msgstr "Data de criação" #. module: account #: selection:account.journal,type:0 msgid "Purchase Refund" -msgstr "Devolução da Venda" +msgstr "Devolução de Compra" #. module: account #: selection:account.journal,type:0 @@ -12678,13 +12677,6 @@ msgstr "" #~ msgid "This period is already closed !" #~ msgstr "Este período já está fechado" -#, python-format -#~ msgid "" -#~ "Selected Move lines does not have any account move enties in draft state" -#~ msgstr "" -#~ "As linhas do movimento selecionado nao tem nenhuma conta a ser movida para o " -#~ "estado de esboço" - #~ msgid "Unpaid Customer Refunds" #~ msgstr "Reembolsos a clientes não pagos" @@ -13232,6 +13224,13 @@ msgstr "" #~ msgid "Can not %s draft/proforma/cancel invoice." #~ msgstr "Não pode %s provisório/proforma/cancelar fatura." +#, python-format +#~ msgid "" +#~ "Selected Move lines does not have any account move enties in draft state" +#~ msgstr "" +#~ "As linhas de movimento selecionadas não tem nenhum movimento nesta conta no " +#~ "modo provisório" + #, python-format #~ msgid "Can not pay draft/proforma/cancel invoice." #~ msgstr "Não se pode pagar uma fatura provisória/proforma/cancelada" diff --git a/addons/account/installer.py b/addons/account/installer.py index d02e7196d4d..537371d0f64 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -23,10 +23,16 @@ import datetime from dateutil.relativedelta import relativedelta import logging from operator import itemgetter -from os.path import join as opj import time +import urllib2 +import urlparse -from openerp import netsvc, tools +try: + import simplejson as json +except ImportError: + import json # noqa + +from openerp.release import serie from openerp.tools.translate import _ from openerp.osv import fields, osv @@ -38,13 +44,28 @@ class account_installer(osv.osv_memory): def _get_charts(self, cr, uid, context=None): modules = self.pool.get('ir.module.module') + + # try get the list on apps server + try: + apps_server = self.pool.get('ir.config_parameter').get_param(cr, uid, 'apps.server', 'https://apps.openerp.com') + + up = urlparse.urlparse(apps_server) + url = '{0.scheme}://{0.netloc}/apps/charts?serie={1}'.format(up, serie) + + j = urllib2.urlopen(url, timeout=3).read() + apps_charts = json.loads(j) + + charts = dict(apps_charts) + except Exception: + charts = dict() + # Looking for the module with the 'Account Charts' category category_name, category_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'module_category_localization_account_charts') ids = modules.search(cr, uid, [('category_id', '=', category_id)], context=context) - charts = list( - sorted(((m.name, m.shortdesc) - for m in modules.browse(cr, uid, ids, context=context)), - key=itemgetter(1))) + if ids: + charts.update((m.name, m.shortdesc) for m in modules.browse(cr, uid, ids, context=context)) + + charts = sorted(charts.items(), key=itemgetter(1)) charts.insert(0, ('configurable', _('Custom'))) return charts @@ -57,9 +78,9 @@ class account_installer(osv.osv_memory): "country."), 'date_start': fields.date('Start Date', required=True), 'date_stop': fields.date('End Date', required=True), - 'period': fields.selection([('month', 'Monthly'), ('3months','3 Monthly')], 'Periods', required=True), + 'period': fields.selection([('month', 'Monthly'), ('3months', '3 Monthly')], 'Periods', required=True), 'company_id': fields.many2one('res.company', 'Company', required=True), - 'has_default_company' : fields.boolean('Has Default Company', readonly=True), + 'has_default_company': fields.boolean('Has Default Company', readonly=True), } def _default_company(self, cr, uid, context=None): @@ -78,30 +99,29 @@ class account_installer(osv.osv_memory): 'has_default_company': _default_has_default_company, 'charts': 'configurable' } - + def get_unconfigured_cmp(self, cr, uid, context=None): """ get the list of companies that have not been configured yet but don't care about the demo chart of accounts """ - cmp_select = [] company_ids = self.pool.get('res.company').search(cr, uid, [], context=context) cr.execute("SELECT company_id FROM account_account WHERE active = 't' AND account_account.parent_id IS NULL AND name != %s", ("Chart For Automated Tests",)) configured_cmp = [r[0] for r in cr.fetchall()] return list(set(company_ids)-set(configured_cmp)) - + def check_unconfigured_cmp(self, cr, uid, context=None): """ check if there are still unconfigured companies """ if not self.get_unconfigured_cmp(cr, uid, context=context): raise osv.except_osv(_('No unconfigured company !'), _("There is currently no company without chart of account. The wizard will therefore not be executed.")) - + def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): - if context is None:context = {} - res = super(account_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) + if context is None: context = {} + res = super(account_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False) cmp_select = [] # display in the widget selection only the companies that haven't been configured yet unconfigured_cmp = self.get_unconfigured_cmp(cr, uid, context=context) for field in res['fields']: if field == 'company_id': - res['fields'][field]['domain'] = [('id','in',unconfigured_cmp)] + res['fields'][field]['domain'] = [('id', 'in', unconfigured_cmp)] res['fields'][field]['selection'] = [('', '')] if unconfigured_cmp: cmp_select = [(line.id, line.name) for line in self.pool.get('res.company').browse(cr, uid, unconfigured_cmp)] @@ -117,7 +137,7 @@ class account_installer(osv.osv_memory): def execute(self, cr, uid, ids, context=None): self.execute_simple(cr, uid, ids, context) - super(account_installer, self).execute(cr, uid, ids, context=context) + return super(account_installer, self).execute(cr, uid, ids, context=context) def execute_simple(self, cr, uid, ids, context=None): if context is None: @@ -129,8 +149,8 @@ class account_installer(osv.osv_memory): if not f_ids: name = code = res['date_start'][:4] if int(name) != int(res['date_stop'][:4]): - name = res['date_start'][:4] +'-'+ res['date_stop'][:4] - code = res['date_start'][2:4] +'-'+ res['date_stop'][2:4] + name = res['date_start'][:4] + '-' + res['date_stop'][:4] + code = res['date_start'][2:4] + '-' + res['date_stop'][2:4] vals = { 'name': name, 'code': code, @@ -150,8 +170,7 @@ class account_installer(osv.osv_memory): chart = self.read(cr, uid, ids, ['charts'], context=context)[0]['charts'] _logger.debug('Installing chart of accounts %s', chart) - return modules | set([chart]) + return (modules | set([chart])) - set(['has_default_company', 'configurable']) -account_installer() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/ir_sequence.py b/addons/account/ir_sequence.py index 56e1a4d0367..d3615a847b7 100644 --- a/addons/account/ir_sequence.py +++ b/addons/account/ir_sequence.py @@ -38,7 +38,6 @@ class ir_sequence_fiscalyear(osv.osv): 'Main Sequence must be different from current !'), ] -ir_sequence_fiscalyear() class ir_sequence(osv.osv): _inherit = 'ir.sequence' @@ -56,6 +55,5 @@ class ir_sequence(osv.osv): return super(ir_sequence, self)._next(cr, uid, [line.sequence_id.id], context) return super(ir_sequence, self)._next(cr, uid, seq_ids, context) -ir_sequence() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/partner.py b/addons/account/partner.py index ae8d2fc1871..50addd88942 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -66,7 +66,6 @@ class account_fiscal_position(osv.osv): break return account_id -account_fiscal_position() class account_fiscal_position_tax(osv.osv): _name = 'account.fiscal.position.tax' @@ -84,7 +83,6 @@ class account_fiscal_position_tax(osv.osv): 'A tax fiscal position could be defined only once time on same taxes.') ] -account_fiscal_position_tax() class account_fiscal_position_account(osv.osv): _name = 'account.fiscal.position.account' @@ -102,7 +100,6 @@ class account_fiscal_position_account(osv.osv): 'An account fiscal position could be defined only once time on same accounts.') ] -account_fiscal_position_account() class res_partner(osv.osv): _name = 'res.partner' @@ -236,6 +233,5 @@ class res_partner(osv.osv): 'last_reconciliation_date': fields.datetime('Latest Full Reconciliation Date', help='Date on which the partner accounting entries were fully reconciled last time. It differs from the last date where a reconciliation has been made for this partner, as here we depict the fact that nothing more was to be reconciled at this date. This can be achieved in 2 different ways: either the last unreconciled debit/credit entry of this partner was reconciled, either the user pressed the button "Nothing more to reconcile" during the manual reconciliation process.') } -res_partner() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index 1267e20165b..76e94fdfef4 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -50,6 +50,29 @@
+ + {'search_default_partner_id': [active_id], 'default_partner_id': active_id} + Contracts/Analytic Accounts + account.analytic.account + tree,form + + + partner.view.buttons + res.partner + + + + +