diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index c538614fd0f..019af2cdef5 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -73,7 +73,6 @@ for a particular financial year and for preparation of vouchers there is a modul 'wizard/account_fiscalyear_close_state.xml', 'wizard/account_chart_view.xml', 'wizard/account_tax_chart_view.xml', - 'wizard/account_move_journal_view.xml', 'wizard/account_move_line_reconcile_select_view.xml', 'wizard/account_open_closed_fiscalyear_view.xml', 'wizard/account_move_line_unreconcile_select_view.xml', @@ -128,9 +127,11 @@ for a particular financial year and for preparation of vouchers there is a modul ], 'js': [ 'static/src/js/account_move_reconciliation.js', + 'static/src/js/account_move_line_quickadd.js', ], 'qweb' : [ "static/src/xml/account_move_reconciliation.xml", + "static/src/xml/account_move_line_quickadd.xml", ], 'css':['static/src/css/account_move_reconciliation.css' ], diff --git a/addons/account/account.py b/addons/account/account.py index cfba30856a9..438dff47aae 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -641,8 +641,7 @@ class account_account(osv.osv): return True def _check_allow_type_change(self, cr, uid, ids, new_type, context=None): - group1 = ['payable', 'receivable', 'other'] - group2 = ['consolidation','view'] + restricted_groups = ['consolidation','view'] line_obj = self.pool.get('account.move.line') for account in self.browse(cr, uid, ids, context=context): old_type = account.type @@ -650,14 +649,25 @@ class account_account(osv.osv): if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]): #Check for 'Closed' type if old_type == 'closed' and new_type !='closed': - raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from 'Closed' to any other type which contains journal items!")) - #Check for change From group1 to group2 and vice versa - if (old_type in group1 and new_type in group2) or (old_type in group2 and new_type in group1): - raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from '%s' to '%s' type as it contains journal items!") % (old_type,new_type,)) + raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!")) + # Forbid to change an account type for restricted_groups as it contains journal items (or if one of its children does) + if (new_type in restricted_groups): + raise osv.except_osv(_('Warning !'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,)) + + return True + + # For legal reason (forbiden to modify journal entries which belongs to a closed fy or period), Forbid to modify + # the code of an account if journal entries have been already posted on this account. This cannot be simply + # 'configurable' since it can lead to a lack of confidence in OpenERP and this is what we want to change. + def _check_allow_code_change(self, cr, uid, ids, context=None): + line_obj = self.pool.get('account.move.line') + for account in self.browse(cr, uid, ids, context=context): + account_ids = self.search(cr, uid, [('id', 'child_of', [account.id])], context=context) + if line_obj.search(cr, uid, [('account_id', 'in', account_ids)], context=context): + raise osv.except_osv(_('Warning !'), _("You cannot change the code of account which contains journal items!")) return True def write(self, cr, uid, ids, vals, context=None): - if context is None: context = {} if not ids: @@ -677,6 +687,8 @@ class account_account(osv.osv): self._check_moves(cr, uid, ids, "write", context=context) if 'type' in vals.keys(): self._check_allow_type_change(cr, uid, ids, vals['type'], context=context) + if 'code' in vals.keys(): + self._check_allow_code_change(cr, uid, ids, context=context) return super(account_account, self).write(cr, uid, ids, vals, context=context) def unlink(self, cr, uid, ids, context=None): @@ -685,44 +697,6 @@ class account_account(osv.osv): account_account() -class account_journal_view(osv.osv): - _name = "account.journal.view" - _description = "Journal View" - _columns = { - 'name': fields.char('Journal View', size=64, required=True, translate=True), - 'columns_id': fields.one2many('account.journal.column', 'view_id', 'Columns') - } - _order = "name" - -account_journal_view() - - -class account_journal_column(osv.osv): - - def _col_get(self, cr, user, context=None): - result = [] - cols = self.pool.get('account.move.line')._columns - for col in cols: - if col in ('period_id', 'journal_id'): - continue - result.append( (col, cols[col].string) ) - result.sort() - return result - - _name = "account.journal.column" - _description = "Journal Column" - _columns = { - 'name': fields.char('Column Name', size=64, required=True), - 'field': fields.selection(_col_get, 'Field Name', required=True, size=32), - 'view_id': fields.many2one('account.journal.view', 'Journal View', select=True), - 'sequence': fields.integer('Sequence', help="Gives the sequence order to journal column.", readonly=True), - 'required': fields.boolean('Required'), - 'readonly': fields.boolean('Readonly'), - } - _order = "view_id, sequence" - -account_journal_column() - class account_journal(osv.osv): _name = "account.journal" _description = "Journal" @@ -738,7 +712,6 @@ class account_journal(osv.osv): " Select 'Opening/Closing Situation' for entries generated for new fiscal years."), '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 OpenERP 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"), '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."), @@ -874,37 +847,6 @@ class account_journal(osv.osv): return self.name_get(cr, user, ids, context=context) - def onchange_type(self, cr, uid, ids, type, currency, context=None): - obj_data = self.pool.get('ir.model.data') - user_pool = self.pool.get('res.users') - - type_map = { - 'sale':'account_sp_journal_view', - 'sale_refund':'account_sp_refund_journal_view', - 'purchase':'account_sp_journal_view', - 'purchase_refund':'account_sp_refund_journal_view', - 'cash':'account_journal_bank_view', - 'bank':'account_journal_bank_view', - 'general':'account_journal_view', - 'situation':'account_journal_view' - } - - res = {} - view_id = type_map.get(type, 'account_journal_view') - user = user_pool.browse(cr, uid, uid) - if type in ('cash', 'bank') and currency and user.company_id.currency_id.id != currency: - view_id = 'account_journal_bank_view_multi' - data_id = obj_data.search(cr, uid, [('model','=','account.journal.view'), ('name','=',view_id)]) - data = obj_data.browse(cr, uid, data_id[0], context=context) - - res.update({ - 'centralisation':type == 'situation', - 'view_id':data.res_id, - }) - return { - 'value':res - } - account_journal() class account_fiscalyear(osv.osv): @@ -1384,13 +1326,6 @@ class account_move(osv.osv): 'WHERE id IN %s', ('draft', tuple(ids),)) return True - def onchange_line_id(self, cr, uid, ids, line_ids, context=None): - balance = 0.0 - for line in line_ids: - if line[2]: - balance += (line[2].get('debit',0.00)- (line[2].get('credit',0.00))) - return {'value': {'balance': balance}} - def write(self, cr, uid, ids, vals, context=None): if context is None: context = {} @@ -1470,6 +1405,11 @@ class account_move(osv.osv): raise osv.except_osv(_('User Error!'), _('You cannot delete a posted journal entry "%s".') % \ move['name']) + for line in move.line_id: + if line.invoice: + raise osv.except_osv(_('User Error!'), + _("Move cannot be deleted if linked to an invoice. (Invoice: %s - Move ID:%s)") % \ + (line.invoice.number,move.name)) line_ids = map(lambda x: x.id, move.line_id) context['journal_id'] = move.journal_id.id context['period_id'] = move.period_id.id @@ -1678,11 +1618,41 @@ class account_move_reconcile(osv.osv): 'line_id': fields.one2many('account.move.line', 'reconcile_id', 'Entry Lines'), 'line_partial_ids': fields.one2many('account.move.line', 'reconcile_partial_id', 'Partial Entry lines'), 'create_date': fields.date('Creation date', readonly=True), + 'opening_reconciliation': fields.boolean('Opening Entries Reconciliation', help="Is this reconciliation produced by the opening of a new fiscal year ?."), } _defaults = { 'name': lambda self,cr,uid,ctx=None: self.pool.get('ir.sequence').get(cr, uid, 'account.reconcile', context=ctx) or '/', } + + # You cannot unlink a reconciliation if it is a opening_reconciliation one, + # you should use the generate opening entries wizard for that + def unlink(self, cr, uid, ids, context=None): + for move_rec in self.browse(cr, uid, ids, context=context): + if move_rec.opening_reconciliation: + raise osv.except_osv(_('Error!'), _('You cannot unreconcile journal items if they has been generated by the \ + opening/closing fiscal year process.')) + return super(account_move_reconcile, self).unlink(cr, uid, ids, context=context) + + # Look in the line_id and line_partial_ids to ensure the partner is the same or empty + # on all lines. We allow that only for opening/closing period + def _check_same_partner(self, cr, uid, ids, context=None): + for reconcile in self.browse(cr, uid, ids, context=context): + move_lines = [] + if not reconcile.opening_reconciliation: + if reconcile.line_id: + first_partner = reconcile.line_id[0].partner_id.id + move_lines = reconcile.line_id + elif reconcile.line_partial_ids: + first_partner = reconcile.line_partial_ids[0].partner_id.id + move_lines = reconcile.line_partial_ids + if any([line.partner_id.id != first_partner for line in move_lines]): + return False + return True + _constraints = [ + (_check_same_partner, 'You can only reconcile journal items with the same partner.', ['line_id']), + ] + def reconcile_partial_check(self, cr, uid, ids, type='auto', context=None): total = 0.0 for rec in self.browse(cr, uid, ids, context=context): @@ -3161,16 +3131,6 @@ class wizard_multi_charts_accounts(osv.osv_memory): default_account = acc_template_ref.get(template.property_account_income_opening.id) return default_account - def _get_view_id(journal_type): - # Get the journal views - if journal_type in ('general', 'situation'): - data = obj_data.get_object_reference(cr, uid, 'account', 'account_journal_view') - elif journal_type in ('sale_refund', 'purchase_refund'): - data = obj_data.get_object_reference(cr, uid, 'account', 'account_sp_refund_journal_view') - else: - data = obj_data.get_object_reference(cr, uid, 'account', 'account_sp_journal_view') - return data and data[1] or False - journal_names = { 'sale': _('Sales Journal'), 'purchase': _('Purchase Journal'), @@ -3200,7 +3160,6 @@ class wizard_multi_charts_accounts(osv.osv_memory): 'code': journal_codes[journal_type], 'company_id': company_id, 'centralisation': journal_type == 'situation', - 'view_id': _get_view_id(journal_type), 'analytic_journal_id': _get_analytic_journal(journal_type), 'default_credit_account_id': _get_default_account(journal_type, 'credit'), 'default_debit_account_id': _get_default_account(journal_type, 'debit'), @@ -3417,11 +3376,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): ''' obj_data = self.pool.get('ir.model.data') obj_journal = self.pool.get('account.journal') - # Get the id of journal views - tmp = obj_data.get_object_reference(cr, uid, 'account', 'account_journal_bank_view_multi') - view_id_cur = tmp and tmp[1] or False - tmp = obj_data.get_object_reference(cr, uid, 'account', 'account_journal_bank_view') - view_id_cash = tmp and tmp[1] or False + # we need to loop again to find next number for journal code # because we can't rely on the value current_num as, @@ -3447,10 +3402,8 @@ class wizard_multi_charts_accounts(osv.osv_memory): 'default_debit_account_id': default_account_id, } if line['currency_id']: - vals['view_id'] = view_id_cur vals['currency'] = line['currency_id'] - else: - vals['view_id'] = view_id_cash + return vals def _prepare_bank_account(self, cr, uid, line, new_code, acc_template_ref, ref_acc_bank, company_id, context=None): diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py index c836600d866..f0da630ec1d 100644 --- a/addons/account/account_bank.py +++ b/addons/account/account_bank.py @@ -89,11 +89,6 @@ class bank(osv.osv): } acc_bank_id = obj_acc.create(cr,uid,acc,context=context) - # Get the journal view id - data_id = obj_data.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view')]) - data = obj_data.browse(cr, uid, data_id[0], context=context) - view_id_cash = data.res_id - jour_obj = self.pool.get('account.journal') new_code = 1 while True: @@ -112,7 +107,6 @@ class bank(osv.osv): 'analytic_journal_id': False, 'default_credit_account_id': acc_bank_id, 'default_debit_account_id': acc_bank_id, - 'view_id': view_id_cash } journal_id = jour_obj.create(cr, uid, vals_journal, context=context) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 4422537007f..e7e3f740067 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -311,7 +311,7 @@ class account_bank_statement(osv.osv): 'statement_id': st_line.statement_id.id, 'journal_id': st_line.statement_id.journal_id.id, 'period_id': st_line.statement_id.period_id.id, - 'currency_id': cur_id, + 'currency_id': amount_currency and cur_id, 'amount_currency': amount_currency, 'analytic_account_id': analytic_id, } diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 80a406bb0b7..8d13ec9dc8f 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1073,8 +1073,9 @@ class account_invoice(osv.osv): self.message_post(cr, uid, [inv_id], body=message, context=context) return True - def action_cancel(self, cr, uid, ids, *args): - context = {} # TODO: Use context from arguments + def action_cancel(self, cr, uid, ids, context=None): + if context is None: + context = {} account_move_obj = self.pool.get('account.move') invoices = self.read(cr, uid, ids, ['move_id', 'payment_ids']) move_ids = [] # ones that we will need to remove @@ -1244,12 +1245,15 @@ class account_invoice(osv.osv): ref = invoice.reference else: ref = self._convert_ref(cr, uid, invoice.number) + partner = invoice.partner_id + if partner.parent_id and not partner.is_company: + partner = partner.parent_id # Pay attention to the sign for both debit/credit AND amount_currency l1 = { 'debit': direction * pay_amount>0 and direction * pay_amount, 'credit': direction * pay_amount<0 and - direction * pay_amount, 'account_id': src_account_id, - 'partner_id': invoice.partner_id.id, + 'partner_id': partner.id, 'ref':ref, 'date': date, 'currency_id':currency_id, @@ -1260,7 +1264,7 @@ class account_invoice(osv.osv): 'debit': direction * pay_amount<0 and - direction * pay_amount, 'credit': direction * pay_amount>0 and direction * pay_amount, 'account_id': pay_account_id, - 'partner_id': invoice.partner_id.id, + 'partner_id': partner.id, 'ref':ref, 'date': date, 'currency_id':currency_id, @@ -1377,8 +1381,8 @@ class account_invoice_line(osv.osv): 'origin': fields.char('Source Document', size=256, help="Reference of the document that produced this invoice."), 'sequence': fields.integer('Sequence', help="Gives the sequence of this line when displaying the invoice."), 'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True), - 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'), - 'product_id': fields.many2one('product.product', 'Product', ondelete='set null'), + 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null', select=True), + 'product_id': fields.many2one('product.product', 'Product', ondelete='set null', select=True), 'account_id': fields.many2one('account.account', 'Account', required=True, domain=[('type','<>','view'), ('type', '<>', 'closed')], help="The income or expense account related to the selected product."), 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')), 'price_subtotal': fields.function(_amount_line, string='Subtotal', type="float", diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 5c5a25880cb..48fec608195 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -435,7 +435,7 @@
- +
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 00fad390282..7cc9768f00e 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -220,12 +220,11 @@ class account_move_line(osv.osv): return context def _default_get(self, cr, uid, fields, context=None): + #default_get should only do the following: + # -propose the next amount in debit/credit in order to balance the move + # -propose the next account from the journal (default debit/credit account) accordingly if context is None: context = {} - if not context.get('journal_id', False): - context['journal_id'] = context.get('search_default_journal_id') - if not context.get('period_id', False): - context['period_id'] = context.get('search_default_period_id') account_obj = self.pool.get('account.account') period_obj = self.pool.get('account.period') journal_obj = self.pool.get('account.journal') @@ -234,134 +233,71 @@ class account_move_line(osv.osv): fiscal_pos_obj = self.pool.get('account.fiscal.position') partner_obj = self.pool.get('res.partner') currency_obj = self.pool.get('res.currency') + + if not context.get('journal_id', False): + context['journal_id'] = context.get('search_default_journal_id', False) + if not context.get('period_id', False): + context['period_id'] = context.get('search_default_period_id', False) context = self.convert_to_period(cr, uid, context) - #pass the right context when search_defaul_journal_id - if context.get('search_default_journal_id',False): - context['journal_id'] = context.get('search_default_journal_id') + # Compute simple values data = super(account_move_line, self).default_get(cr, uid, fields, context=context) - # Starts: Manual entry from account.move form - if context.get('lines'): - total_new = context.get('balance', 0.00) - if context['journal']: - journal_data = journal_obj.browse(cr, uid, context['journal'], context=context) - if journal_data.type == 'purchase': - if total_new > 0: - account = journal_data.default_credit_account_id - else: - account = journal_data.default_debit_account_id - else: - if total_new > 0: - account = journal_data.default_credit_account_id - else: - account = journal_data.default_debit_account_id - if account and ((not fields) or ('debit' in fields) or ('credit' in fields)) and 'partner_id' in data and (data['partner_id']): - part = partner_obj.browse(cr, uid, data['partner_id'], context=context) - account = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, account.id) - account = account_obj.browse(cr, uid, account, context=context) - data['account_id'] = account.id - - s = -total_new - data['debit'] = s > 0 and s or 0.0 - data['credit'] = s < 0 and -s or 0.0 - data = self._default_get_move_form_hook(cr, uid, data) - return data - # Ends: Manual entry from account.move form - if not 'move_id' in fields: #we are not in manual entry - return data - # Compute the current move - move_id = False - partner_id = False - if context.get('journal_id', False) and context.get('period_id', False): - if 'move_id' in fields: - cr.execute('SELECT move_id \ - FROM \ - account_move_line \ - WHERE \ - journal_id = %s and period_id = %s AND create_uid = %s AND state = %s \ - ORDER BY id DESC limit 1', - (context['journal_id'], context['period_id'], uid, 'draft')) + if context.get('journal_id'): + total = 0.0 + #in account.move form view, it is not possible to compute total debit and credit using + #a browse record. So we must use the context to pass the whole one2many field and compute the total + if context.get('line_id'): + for move_line_dict in move_obj.resolve_2many_commands(cr, uid, 'line_id', context.get('line_id'), context=context): + data['name'] = data.get('name') or move_line_dict.get('name') + data['partner_id'] = data.get('partner_id') or move_line_dict.get('partner_id') + total += move_line_dict.get('debit', 0.0) - move_line_dict.get('credit', 0.0) + elif context.get('period_id'): + #find the date and the ID of the last unbalanced account.move encoded by the current user in that journal and period + move_id = False + cr.execute('''SELECT move_id, date FROM account_move_line + WHERE journal_id = %s AND period_id = %s AND create_uid = %s AND state = %s + ORDER BY id DESC limit 1''', (context['journal_id'], context['period_id'], uid, 'draft')) res = cr.fetchone() - move_id = (res and res[0]) or False - if not move_id: - return data - else: - data['move_id'] = move_id - if 'date' in fields: - cr.execute('SELECT date \ - FROM \ - account_move_line \ - WHERE \ - journal_id = %s AND period_id = %s AND create_uid = %s \ - ORDER BY id DESC', - (context['journal_id'], context['period_id'], uid)) - res = cr.fetchone() - if res: - data['date'] = res[0] - else: - period = period_obj.browse(cr, uid, context['period_id'], - context=context) - data['date'] = period.date_start - if not move_id: - return data - total = 0 - ref_id = False - move = move_obj.browse(cr, uid, move_id, context=context) - if 'name' in fields: - data.setdefault('name', move.line_id[-1].name) - acc1 = False - for l in move.line_id: - acc1 = l.account_id - partner_id = partner_id or l.partner_id.id - ref_id = ref_id or l.ref - total += (l.debit or 0.0) - (l.credit or 0.0) + move_id = res and res[0] or False + data['date'] = res and res[1] or period_obj.browse(cr, uid, context['period_id'], context=context).date_start + data['move_id'] = move_id + if move_id: + #if there exist some unbalanced accounting entries that match the journal and the period, + #we propose to continue the same move by copying the ref, the name, the partner... + move = move_obj.browse(cr, uid, move_id, context=context) + data.setdefault('name', move.line_id[-1].name) + for l in move.line_id: + data['partner_id'] = data.get('partner_id') or l.partner_id.id + data['ref'] = data.get('ref') or l.ref + total += (l.debit or 0.0) - (l.credit or 0.0) - if 'ref' in fields: - data['ref'] = ref_id - if 'partner_id' in fields: - data['partner_id'] = partner_id - - if move.journal_id.type == 'purchase': - if total > 0: - account = move.journal_id.default_credit_account_id - else: - account = move.journal_id.default_debit_account_id - else: - if total > 0: - account = move.journal_id.default_credit_account_id - else: - account = move.journal_id.default_debit_account_id - part = partner_id and partner_obj.browse(cr, uid, partner_id) or False - # part = False is acceptable for fiscal position. - account = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, account.id) - if account: - account = account_obj.browse(cr, uid, account, context=context) - - if account and ((not fields) or ('debit' in fields) or ('credit' in fields)): - data['account_id'] = account.id - # Propose the price Tax excluded, the Tax will be added when confirming line - if account.tax_ids: - taxes = fiscal_pos_obj.map_tax(cr, uid, part and part.property_account_position or False, account.tax_ids) - tax = tax_obj.browse(cr, uid, taxes) - for t in tax_obj.compute_inv(cr, uid, tax, total, 1): - total -= t['amount'] - - s = -total - data['debit'] = s > 0 and s or 0.0 - data['credit'] = s < 0 and -s or 0.0 - - if account and account.currency_id: - data['currency_id'] = account.currency_id.id - acc = account - if s>0: - acc = acc1 - compute_ctx = context.copy() - compute_ctx.update({ - 'res.currency.compute.account': acc, - 'res.currency.compute.account_invert': True, - }) - v = currency_obj.compute(cr, uid, account.company_id.currency_id.id, data['currency_id'], s, context=compute_ctx) - data['amount_currency'] = v + #compute the total of current move + data['debit'] = total < 0 and -total or 0.0 + data['credit'] = total > 0 and total or 0.0 + #pick the good account on the journal accordingly if the next proposed line will be a debit or a credit + journal_data = journal_obj.browse(cr, uid, context['journal_id'], context=context) + account = total > 0 and journal_data.default_credit_account_id or journal_data.default_debit_account_id + #map the account using the fiscal position of the partner, if needed + part = data.get('partner_id') and partner_obj.browse(cr, uid, data['partner_id'], context=context) or False + if account and data.get('partner_id'): + account = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, account.id) + account = account_obj.browse(cr, uid, account, context=context) + data['account_id'] = account and account.id or False + #compute the amount in secondary currency of the account, if needed + if account and account.currency_id: + data['currency_id'] = account.currency_id.id + #set the context for the multi currency change + compute_ctx = context.copy() + compute_ctx.update({ + #the following 2 parameters are used to choose the currency rate, in case where the account + #doesn't work with an outgoing currency rate method 'at date' but 'average' + 'res.currency.compute.account': account, + 'res.currency.compute.account_invert': True, + }) + if data.get('date'): + compute_ctx.update({'date': data['date']}) + data['amount_currency'] = currency_obj.compute(cr, uid, account.company_id.currency_id.id, data['currency_id'], -total, context=compute_ctx) + data = self._default_get_move_form_hook(cr, uid, data) return data def on_create_write(self, cr, uid, id, context=None): @@ -484,6 +420,15 @@ class account_move_line(osv.osv): result.append(line.id) return result + def _get_reconcile(self, cr, uid, ids,name, unknow_none, context=None): + res = dict.fromkeys(ids, False) + for line in self.browse(cr, uid, ids, context=context): + if line.reconcile_id: + res[line.id] = str(line.reconcile_id.name) + elif line.reconcile_partial_id: + res[line.id] = str(line.reconcile_partial_id.name) + return res + _columns = { 'name': fields.char('Name', size=64, required=True), 'quantity': fields.float('Quantity', digits=(16,2), help="The optional quantity expressed by this line, eg: number of product sold. The quantity is not a legal requirement but is very useful for some reports."), @@ -498,15 +443,16 @@ class account_move_line(osv.osv): 'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1), 'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2), 'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2), + 'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile'), 'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')), 'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."), 'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."), 'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."), - 'journal_id': fields.related('move_id', 'journal_id', string='Journal', type='many2one', relation='account.journal', required=True, select=True, readonly=True, + 'journal_id': fields.related('move_id', 'journal_id', string='Journal', type='many2one', relation='account.journal', required=True, select=True, store = { 'account.move': (_get_move_lines, ['journal_id'], 20) }), - 'period_id': fields.related('move_id', 'period_id', string='Period', type='many2one', relation='account.period', required=True, select=True, readonly=True, + 'period_id': fields.related('move_id', 'period_id', string='Period', type='many2one', relation='account.period', required=True, select=True, store = { 'account.move': (_get_move_lines, ['period_id'], 20) }), @@ -537,7 +483,7 @@ class account_move_line(osv.osv): context or {} period_obj = self.pool.get('account.period') dt = time.strftime('%Y-%m-%d') - if ('journal_id' in context) and ('period_id' in context): + if context.get('journal_id') and context.get('period_id'): cr.execute('SELECT date FROM account_move_line ' \ 'WHERE journal_id = %s AND period_id = %s ' \ 'ORDER BY id DESC limit 1', @@ -558,6 +504,38 @@ class account_move_line(osv.osv): cur = self.pool.get('account.journal').browse(cr, uid, context['journal_id']).currency return cur and cur.id or False + def _get_period(self, cr, uid, context=None): + """ + Return default account period value + """ + context = context or {} + if context.get('period_id', False): + return context['period_id'] + account_period_obj = self.pool.get('account.period') + ids = account_period_obj.find(cr, uid, context=context) + period_id = False + if ids: + period_id = ids[0] + return period_id + + def _get_journal(self, cr, uid, context=None): + """ + Return journal based on the journal type + """ + context = context or {} + if context.get('journal_id', False): + return context['journal_id'] + journal_id = False + + journal_pool = self.pool.get('account.journal') + if context.get('journal_type', False): + jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))]) + if not jids: + raise osv.except_osv(_('Configuration Error!'), _('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration/Journals/Journals.') % context.get('journal_type')) + journal_id = jids[0] + return journal_id + + _defaults = { 'blocked': False, 'centralisation': 'normal', @@ -565,12 +543,12 @@ class account_move_line(osv.osv): 'date_created': fields.date.context_today, 'state': 'draft', 'currency_id': _get_currency, - 'journal_id': lambda self, cr, uid, c: c.get('journal_id', False), + 'journal_id': _get_journal, 'credit': 0.0, 'debit': 0.0, 'amount_currency': 0.0, 'account_id': lambda self, cr, uid, c: c.get('account_id', False), - 'period_id': lambda self, cr, uid, c: c.get('period_id', False), + 'period_id': _get_period, 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.move.line', context=c) } _order = "date desc, id desc" @@ -620,12 +598,34 @@ class account_move_line(osv.osv): return False return True + def _check_currency_and_amount(self, cr, uid, ids, context=None): + for l in self.browse(cr, uid, ids, context=context): + if (l.amount_currency and not l.currency_id): + return False + return True + + def _check_currency_amount(self, cr, uid, ids, context=None): + for l in self.browse(cr, uid, ids, context=context): + if l.amount_currency: + if (l.amount_currency > 0.0 and l.credit > 0.0) or (l.amount_currency < 0.0 and l.debit > 0.0): + return False + return True + + def _check_currency_company(self, cr, uid, ids, context=None): + for l in self.browse(cr, uid, ids, context=context): + if l.currency_id.id == l.company_id.currency_id.id: + return False + return True + _constraints = [ (_check_no_view, 'You cannot create journal items on an account of type view.', ['account_id']), (_check_no_closed, 'You cannot create journal items on closed account.', ['account_id']), (_check_company_id, 'Account and Period must belong to the same company.', ['company_id']), (_check_date, 'The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal.', ['date']), (_check_currency, 'The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal.', ['currency_id']), + (_check_currency_and_amount, "You cannot create journal items with a secondary currency without recording both 'currency' and 'amount currency' field.", ['currency_id','amount_currency']), + (_check_currency_amount, 'The amount expressed in the secondary currency must be positif when journal item are debit and negatif when journal item are credit.', ['amount_currency']), + (_check_currency_company, "You cannot provide a secondary currency if it is the same than the company one." , ['currency_id']), ] #TODO: ONCHANGE_ACCOUNT_ID: set account_tax_id @@ -653,6 +653,12 @@ class account_move_line(osv.osv): } return result + def onchange_account_id(self, cr, uid, ids, account_id, context=None): + res = {'value': {}} + if account_id: + res['value']['account_tax_id'] = [x.id for x in self.pool.get('account.account').browse(cr, uid, account_id, context=context).tax_ids] + return res + def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False): partner_obj = self.pool.get('res.partner') payment_term_obj = self.pool.get('account.payment.term') @@ -977,127 +983,6 @@ class account_move_line(osv.osv): 'context':context, } - def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): - journal_pool = self.pool.get('account.journal') - if context is None: - context = {} - result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu) - if (view_type != 'tree') or view_id: - #Remove the toolbar from the form view - if view_type == 'form': - if result.get('toolbar', False): - result['toolbar']['action'] = [] - #Restrict the list of journal view in search view - if view_type == 'search' and result['fields'].get('journal_id', False): - result['fields']['journal_id']['selection'] = journal_pool.name_search(cr, uid, '', [], context=context) - ctx = context.copy() - #we add the refunds journal in the selection field of journal - if context.get('journal_type', False) == 'sale': - ctx.update({'journal_type': 'sale_refund'}) - result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx) - elif context.get('journal_type', False) == 'purchase': - ctx.update({'journal_type': 'purchase_refund'}) - result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx) - return result - if context.get('view_mode', False): - return result - fld = [] - flds = [] - title = _("Accounting Entries") # self.view_header_get(cr, uid, view_id, view_type, context) - - ids = journal_pool.search(cr, uid, [], context=context) - journals = journal_pool.browse(cr, uid, ids, context=context) - for journal in journals: - for field in journal.view_id.columns_id: - # sometimes, it's possible that a defined column is not loaded (the module containing - # this field is not loaded) when we make an update. - if field.field not in self._columns: - continue - - if not field.field in flds: - fld.append((field.field, field.sequence)) - flds.append(field.field) - - default_columns = { - 'period_id': 3, - 'journal_id': 10, - 'state': sys.maxint, - } - for d in default_columns: - if d not in flds: - fld.append((d, default_columns[d])) - flds.append(d) - - fld = sorted(fld, key=itemgetter(1)) - widths = { - 'statement_id': 50, - 'state': 60, - 'tax_code_id': 50, - 'move_id': 40, - } - - document = etree.Element('tree', string=title, editable="top", - on_write="on_create_write", - colors="red:state=='draft';black:state=='valid'") - fields_get = self.fields_get(cr, uid, flds, context) - for field, _seq in fld: - # TODO add string to element - f = etree.SubElement(document, 'field', name=field) - - if field == 'debit': - f.set('sum', _("Total debit")) - - elif field == 'credit': - f.set('sum', _("Total credit")) - - elif field == 'move_id': - f.set('required', 'False') - - elif field == 'account_tax_id': - f.set('domain', "[('parent_id', '=' ,False)]") - f.set('context', "{'journal_id': journal_id}") - - elif field == 'account_id' and journal.id: - f.set('domain', "[('journal_id', '=', journal_id),('type','!=','view'), ('type','!=','closed')]") - f.set('on_change', 'onchange_account_id(account_id, partner_id)') - - elif field == 'partner_id': - f.set('on_change', 'onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)') - - elif field == 'journal_id': - f.set('context', "{'journal_id': journal_id}") - - elif field == 'statement_id': - f.set('domain', "[('state', '!=', 'confirm'),('journal_id.type', '=', 'bank')]") - f.set('invisible', 'True') - - elif field == 'date': - f.set('on_change', 'onchange_date(date)') - - elif field == 'analytic_account_id': - # Currently it is not working due to being executed by superclass's fields_view_get - # f.set('groups', 'analytic.group_analytic_accounting') - pass - - if field in ('amount_currency', 'currency_id'): - f.set('on_change', 'onchange_currency(account_id, amount_currency, currency_id, date, journal_id)') - f.set('attrs', "{'readonly': [('state', '=', 'valid')]}") - - if field in widths: - f.set('width', str(widths[field])) - - if field in ('journal_id',): - f.set("invisible", "context.get('journal_id', False)") - elif field in ('period_id',): - f.set("invisible", "context.get('period_id', False)") - - orm.setup_modifiers(f, fields_get[field], context=context, - in_tree_view=True) - - result['arch'] = etree.tostring(document, pretty_print=True) - result['fields'] = fields_get - return result - def _check_moves(self, cr, uid, context=None): # use the first move ever created for this journal and period if context is None: @@ -1111,7 +996,7 @@ class account_move_line(osv.osv): 'has been confirmed.') % res[2]) return res - def _remove_move_reconcile(self, cr, uid, move_ids=None, context=None): + def _remove_move_reconcile(self, cr, uid, move_ids=None, opening_reconciliation=False, 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') @@ -1126,6 +1011,8 @@ class account_move_line(osv.osv): unlink_ids += rec_ids unlink_ids += part_rec_ids if unlink_ids: + if opening_reconciliation: + obj_move_rec.write(cr, uid, unlink_ids, {'opening_reconciliation': False}) obj_move_rec.unlink(cr, uid, unlink_ids) return True @@ -1390,6 +1277,19 @@ class account_move_line(osv.osv): move_obj.button_validate(cr,uid, [vals['move_id']], context) return result + def list_periods(self, cr, uid, context=None): + ids = self.pool.get('account.period').search(cr,uid,[]) + return self.pool.get('account.period').name_get(cr, uid, ids, context=context) + + def list_journals(self, cr, uid, context=None): + ng = dict(self.pool.get('account.journal').name_search(cr,uid,'',[])) + ids = ng.keys() + result = [] + for journal in self.pool.get('account.journal').browse(cr, uid, ids, context=context): + result.append((journal.id,ng[journal.id],journal.type, + 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_view.xml b/addons/account/account_view.xml index 7732d8d8cb0..e2c45af8cba 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2,10 +2,7 @@ - - + account.fiscalyear.form account.fiscalyear @@ -70,7 +67,7 @@ - + Fiscal Years account.fiscalyear form @@ -90,12 +87,9 @@ - - - + + account.period.form account.period @@ -142,7 +136,6 @@ - account.period.search account.period @@ -153,8 +146,7 @@ - - + Periods account.period form @@ -169,12 +161,9 @@

- + - - + account.account.form account.account @@ -215,25 +204,6 @@ - - - account.account.search - account.account - - - - - - - - - - - - - - - account.account.list account.account @@ -253,6 +223,23 @@ + + account.account.search + account.account + + + + + + + + + + + + + + Accounts account.account @@ -276,6 +263,13 @@ + + account.account.tree account.account @@ -301,7 +295,6 @@ [('parent_id','=',False)] - Unrealized Gain or Loss account.account @@ -321,7 +314,6 @@ - Unrealized Gain or Loss account.account @@ -341,7 +333,6 @@

- - - - - account.journal.column.form - account.journal.column - -
- - - - - -
- - account.journal.column.tree - account.journal.column - - - - - - - - - - account.journal.view.search - account.journal.view - - - - - - - - account.journal.view.tree - account.journal.view - - - - - - - - account.journal.view.form - account.journal.view - -
- - - - -
- - Journal Views - account.journal.view - form - tree,form - - -

- Click to specify lists of columns to display for a type of journal. -

- Journal views determine the way you can record entries in - your journal. Select the fields you want to appear in a journal - and determine the sequence in which they will appear. -

- On the journal definition form, you can select the view you - want to use to display journal items related to this journal. -

-
-
- - - - + + account.journal.tree account.journal @@ -462,7 +379,6 @@ - account.journal.form account.journal @@ -475,7 +391,7 @@ - + @@ -489,7 +405,6 @@ - @@ -529,7 +444,6 @@ - Journals account.journal @@ -550,6 +464,21 @@ + + + + + account.cash.statement.select account.bank.statement @@ -735,9 +664,7 @@ - + account.account.type.search account.account.type @@ -747,7 +674,6 @@ - account.account.type.tree account.account.type @@ -758,7 +684,6 @@ - account.account.type.form account.account.type @@ -798,9 +723,8 @@ - + + account.move.tree account.move @@ -818,10 +742,7 @@ - - + account.move.reconcile.form account.move.reconcile @@ -840,9 +761,7 @@ - + account.tax.code.search account.tax.code @@ -913,13 +832,17 @@

- - + + + - + account.tax.tree account.tax @@ -1041,57 +964,7 @@ - - - - account.move.line - - - - - - - - - - - - - - - - - - - account.move.line.tree - account.move.line - - - - - - - - - - - - - - - - - - - - - - - - - + account.move.line.form account.move.line @@ -1161,7 +1034,6 @@ - account.move.line.form2 account.move.line @@ -1209,7 +1081,35 @@ - + + account.move.line.tree + account.move.line + + + + + + + + + + + + + + + + + + + + + + + + + + account.move.line.graph account.move.line @@ -1221,7 +1121,6 @@ - Journal Items account.move.line @@ -1238,7 +1137,7 @@ - + @@ -1251,17 +1150,15 @@ - + {'journal_type':'general'} Journal Items account.move.line - form - tree,form - {} - + + tree_account_move_line_quickadd

- Click to register a new journal item. + Select the period and the journal you want to fill.

This view can be used by accountants in order to quickly record entries in OpenERP. If you want to record a supplier invoice, @@ -1271,7 +1168,6 @@

- - - Lines to reconcile + + account.move.line + + + + + + + + + + + + + + + + + + {'search_default_unreconciled': 1,'view_mode':True} + Journal Items to Reconcile account.move.line - form - tree,form - [('account_id.reconcile', '=', True),('reconcile_id','=',False)] - - - + + tree_account_reconciliation + +

+ No journal items found. +

+
+ + - - Journal Items - account.move.line - form - tree,form - - - {'search_default_account_id': [active_id]} - - - - tree_but_open - account.account - Open Journal Items - - - - + account.move.tree account.move @@ -1360,10 +1268,8 @@ - + context="{'line_id': line_id , 'journal_id': journal_id }">
@@ -1430,7 +1336,6 @@ - @@ -1455,7 +1360,6 @@
- account.move.select account.move @@ -1480,7 +1384,6 @@ - Journal Entries account.move @@ -1502,7 +1405,6 @@

- - - - Journal Items - account.move.line - form - tree,form - - - - - - tree - - - - - - form - - - - - {'search_default_unreconciled': 1,'view_mode':True} - Journal Items to Reconcile - account.move.line - - tree_account_reconciliation - -

- No journal items found. -

-
-
- - - - - - - - - - - - + account.journal.period.tree account.journal.period @@ -1620,10 +1455,7 @@ tree - - + account.model.line.tree account.model.line @@ -1640,8 +1472,6 @@ - - account.model.line.form account.model.line @@ -1661,7 +1491,6 @@ - account.model.form account.model @@ -1680,7 +1509,6 @@ - account.model.tree account.model @@ -1692,7 +1520,6 @@ - account.model.search account.model @@ -1721,10 +1548,7 @@ action="action_model_form" name="Models" id="menu_action_model_form" sequence="5" parent="account.menu_finance_recurrent_entries"/> - - + account.payment.term.line.tree account.payment.term.line @@ -1739,8 +1563,6 @@ - - account.payment.term.line.form account.payment.term.line @@ -1780,7 +1602,6 @@ - account.payment.term.search account.payment.term @@ -1791,7 +1612,6 @@ - account.payment.term.form account.payment.term @@ -1807,7 +1627,6 @@ - Payment Terms account.payment.term @@ -1818,10 +1637,7 @@ - - + account.subscription.line.form account.subscription.line @@ -1834,7 +1650,6 @@ - account.subscription.line.tree account.subscription.line @@ -1845,7 +1660,6 @@ - account.subscription.tree account.subscription @@ -1859,7 +1673,6 @@ - account.subscription.search account.subscription @@ -1877,7 +1690,6 @@ - account.subscription.form account.subscription @@ -1963,72 +1775,7 @@ - - Journal Items - account.move.line - form - tree,form - [('account_id','child_of', [active_id]),('state','<>','draft')] - {'account_id':active_id} - - - - account.move.line.tax.tree - account.move.line - - - - - - - - - - - - - - - - - - - - - - Journal Items - account.move.line - form - tree,form - - [('tax_code_id','child_of',active_id),('state','<>','draft')] - - - tree_but_open - account.tax.code - Tax Details - - - - - - - - - - + - - - - Create Account - account.addtmpl.wizard - -
-
-
- - - - -
- - + - account.account.template.form account.account.template @@ -2104,7 +1834,6 @@ - account.account.template.tree account.account.template @@ -2117,7 +1846,6 @@ - account.account.template.search account.account.template @@ -2136,7 +1864,6 @@ - Account Templates account.account.template @@ -2144,11 +1871,32 @@ tree,form - - + + Create Account + account.addtmpl.wizard + +
+
+
+ + + + +
+ + + + account.chart.template.form account.chart.template @@ -2221,11 +1969,9 @@ form tree,form - - account.tax.template.form account.tax.template @@ -2304,7 +2050,6 @@ - Tax Templates account.tax.template @@ -2312,7 +2057,6 @@ tree,form - @@ -2328,7 +2072,6 @@
- account.tax.code.template.search account.tax.code.template @@ -2342,7 +2085,6 @@ - account.tax.code.template.form account.tax.code.template @@ -2359,7 +2101,6 @@ - Tax Code Templates account.tax.code.template @@ -2371,7 +2112,6 @@ - Set Your Accounting Options wizard.multi.charts.accounts @@ -2410,7 +2150,6 @@ - Set Your Accounting Options ir.actions.act_window @@ -2516,7 +2255,6 @@ - account.bank.statement.form account.bank.statement @@ -2649,6 +2387,7 @@

+ tree @@ -2678,10 +2417,7 @@ parent="menu_finance_payables" action="base.action_partner_supplier_form" sequence="100"/> - - + account.financial.report.form account.financial.report @@ -2708,7 +2444,6 @@ - account.financial.report.tree account.financial.report @@ -2721,7 +2456,6 @@ - account.financial.report.search account.financial.report @@ -2737,7 +2471,6 @@ - Financial Reports ir.actions.act_window @@ -2747,7 +2480,6 @@ - @@ -2770,7 +2502,6 @@ [('parent_id','=',False)] - diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml index dd27cfbab4e..97bea14c1f2 100644 --- a/addons/account/data/account_data.xml +++ b/addons/account/data/account_data.xml @@ -59,412 +59,6 @@
- - - Bank/Cash Journal View - - - - Date - date - - - - - - Journal Entry - move_id - - - - - - Name - name - - - - - - Statement - statement_id - - - - - Partner - partner_id - - - - - Account - account_id - - - - - - Debit - debit - - - - - Credit - credit - - - - - Ref - ref - - - - - Status - state - - - - - Reconcile - reconcile_id - - - - - - Bank/Cash Journal (Multi-Currency) View - - - - Date - date - - - - - - Journal Entry - move_id - - - - - - Name - name - - - - - - Statement - statement_id - - - - - Partner - partner_id - - - - - Account - account_id - - - - - - Currency Amt. - amount_currency - - - - - Currency - currency_id - - - - - Debit - debit - - - - - Credit - credit - - - - - Ref - ref - - - - - Status - state - - - - - Reconcile - reconcile_id - - - - - - Journal View - - - - Date - date - - - - - - Journal Entry - move_id - - - - - - Ref - ref - - - - - Partner - partner_id - - - - - Account - account_id - - - - - - Name - name - - - - - - Debit - debit - - - - - Credit - credit - - - - - Analytic Account - analytic_account_id - - - - - Status - state - - - - - - Sale/Purchase Journal View - - - - Date - date - - - - - - Journal Entry - move_id - - - - - - Ref - ref - - - - - Account - account_id - - - - - - Partner - partner_id - - - - - Name - name - - - - - - Due Date - date_maturity - - - - - Debit - debit - - - - - Credit - credit - - - - - Tax - account_tax_id - - - - - Analytic Account - analytic_account_id - - - - - Status - state - - - - - Reconcile - reconcile_id - - - - - Sale/Purchase Refund Journal View - - - - Date - date - - - - - - Journal Entry - move_id - - - - - - Ref - ref - - - - - Account - account_id - - - - - - Partner - partner_id - - - - - Name - name - - - - - - Due Date - date_maturity - - - - - Debit - debit - - - - - Credit - credit - - - - - Tax - account_tax_id - - - - - Analytic Account - analytic_account_id - - - - - Status - state - - - - - Reconcile - reconcile_id - - - diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml index 984711eceef..ce9a09def08 100644 --- a/addons/account/demo/account_minimal.xml +++ b/addons/account/demo/account_minimal.xml @@ -312,7 +312,6 @@ Sales Journal - (test) TSAJ sale - @@ -323,7 +322,6 @@ Sales Credit Note Journal - (test) TSCNJ sale_refund - @@ -335,7 +333,6 @@ Expenses Journal - (test) TEXJ purchase - @@ -346,7 +343,6 @@ Expenses Credit Notes Journal - (test) TECNJ purchase_refund - @@ -358,7 +354,6 @@ Bank Journal - (test) TBNK bank - @@ -369,7 +364,6 @@ Checks Journal - (test) TCHK bank - @@ -390,7 +384,6 @@ that test OpenERP arrive directly in the touchscreen UI. --> - @@ -401,7 +394,6 @@ Miscellaneous Journal - (test) TMIS general - @@ -410,7 +402,6 @@ Opening Entries Journal - (test) TOEJ situation - @@ -422,7 +413,6 @@ USD Bank Journal - (test) TUBK bank - diff --git a/addons/account/i18n/es_DO.po b/addons/account/i18n/es_DO.po index d83e259ca9d..d7f826f9459 100644 --- a/addons/account/i18n/es_DO.po +++ b/addons/account/i18n/es_DO.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-11-24 02:52+0000\n" -"PO-Revision-Date: 2012-07-02 15:07+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2012-11-29 20:54+0000\n" +"Last-Translator: Jose Ernesto Mendez \n" "Language-Team: Spanish (Dominican Republic) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-11-25 06:00+0000\n" -"X-Generator: Launchpad (build 16293)\n" +"X-Launchpad-Export-Date: 2012-11-30 05:07+0000\n" +"X-Generator: Launchpad (build 16319)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -3736,7 +3736,7 @@ msgstr "" #. module: account #: report:account.overdue:0 msgid "VAT:" -msgstr "" +msgstr "ITBIS:" #. module: account #: constraint:account.invoice:0 @@ -3979,7 +3979,7 @@ msgstr "" #. module: account #: report:account.invoice:0 msgid "VAT :" -msgstr "" +msgstr "ITBIS:" #. module: account #: report:account.central.journal:0 @@ -5349,7 +5349,7 @@ msgstr "" #. module: account #: model:ir.model,name:account.model_account_vat_declaration msgid "Account Vat Declaration" -msgstr "" +msgstr "Cuenta Declaración de ITBIS" #. module: account #: help:account.config.settings,module_account_accountant:0 diff --git a/addons/account/i18n/fr.po b/addons/account/i18n/fr.po index 66a866c2e40..82b0d21bae0 100644 --- a/addons/account/i18n/fr.po +++ b/addons/account/i18n/fr.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-11-24 02:52+0000\n" -"PO-Revision-Date: 2012-11-26 11:52+0000\n" +"PO-Revision-Date: 2012-11-29 15:44+0000\n" "Last-Translator: Numérigraphe \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-11-27 05:23+0000\n" -"X-Generator: Launchpad (build 16309)\n" +"X-Launchpad-Export-Date: 2012-11-30 05:07+0000\n" +"X-Generator: Launchpad (build 16319)\n" #. module: account #: code:addons/account/wizard/account_fiscalyear_close.py:41 @@ -2428,7 +2428,7 @@ msgstr "Impression de journal comptable" #. module: account #: model:ir.model,name:account.model_product_category msgid "Product Category" -msgstr "Catégorie de produits" +msgstr "Catégorie d'articles" #. module: account #: model:ir.model,name:account.model_account_aged_trial_balance @@ -2719,12 +2719,12 @@ msgstr "Changer en" #. module: account #: view:account.entries.report:0 msgid "# of Products Qty " -msgstr "Qté de produits " +msgstr "Nb de qté. d'articles " #. module: account #: model:ir.model,name:account.model_product_template msgid "Product Template" -msgstr "Modèle de produit" +msgstr "Modèle d'article" #. module: account #: report:account.account.balance:0 @@ -4096,7 +4096,7 @@ msgstr "Continuer" #: view:account.invoice.report:0 #: field:account.invoice.report,categ_id:0 msgid "Category of Product" -msgstr "Catégorie de produits" +msgstr "Catégorie d'article" #. module: account #: code:addons/account/account.py:987 @@ -4142,7 +4142,7 @@ msgstr "Détail" #: help:account.config.settings,default_purchase_tax:0 msgid "This purchase tax will be assigned by default on new products." msgstr "" -"Cette taxe d'achat sera attribuée par défaut à tous les nouveaux produits." +"Cette taxe d'achat sera attribuée par défaut à tous les nouveaux articles." #. module: account #: report:account.invoice:0 diff --git a/addons/account/i18n/it.po b/addons/account/i18n/it.po index 449810103b2..f2ab301b7a8 100644 --- a/addons/account/i18n/it.po +++ b/addons/account/i18n/it.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-11-24 02:52+0000\n" -"PO-Revision-Date: 2012-11-25 23:52+0000\n" +"PO-Revision-Date: 2012-11-29 23:20+0000\n" "Last-Translator: Sergio Corato \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-11-27 05:24+0000\n" -"X-Generator: Launchpad (build 16309)\n" +"X-Launchpad-Export-Date: 2012-11-30 05:07+0000\n" +"X-Generator: Launchpad (build 16319)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -26,6 +26,7 @@ msgstr "Sistema di pagamento" msgid "" "An account fiscal position could be defined only once time on same accounts." msgstr "" +"Una posizione fiscale può essere definita una sola volta per lo stesso conto." #. module: account #: view:account.unreconcile:0 @@ -85,7 +86,7 @@ msgstr "Importa da fatture o pagamenti" #: code:addons/account/account_move_line.py:1303 #, python-format msgid "Bad Account!" -msgstr "" +msgstr "Conto Errato!" #. module: account #: view:account.move:0 @@ -242,7 +243,7 @@ msgstr "Sezionale: %s" #. module: account #: help:account.config.settings,code_digits:0 msgid "No. of digits to use for account code" -msgstr "" +msgstr "N. di cifre da usare per il codice conto" #. module: account #: help:account.analytic.journal,type:0 @@ -262,6 +263,9 @@ msgid "" "lines for invoices. Leave empty if you don't want to use an analytic account " "on the invoice tax lines by default." msgstr "" +"Imposta il conto analitico che sarà usato di default sulle righe imposta " +"delle fatture. Lasciare vuoto per non usare un conto analitico sulle righe " +"imposta delle fatture per default." #. module: account #: model:ir.actions.act_window,name:account.action_account_tax_template_form @@ -297,7 +301,7 @@ msgstr "Reports belgi" #. module: account #: model:account.account.type,name:account.account_type_income_view1 msgid "Income View" -msgstr "" +msgstr "Vista Ricavi" #. module: account #: help:account.account,user_type:0 @@ -394,7 +398,7 @@ msgstr "Annulla Riconciliazione" #. module: account #: field:account.config.settings,module_account_budget:0 msgid "Budget management" -msgstr "" +msgstr "Gestione Budget" #. module: account #: view:product.template:0 @@ -416,7 +420,7 @@ msgstr "" #. module: account #: field:account.config.settings,group_multi_currency:0 msgid "Allow multi currencies" -msgstr "" +msgstr "Consenti valute multiple" #. module: account #: code:addons/account/account_invoice.py:73 @@ -437,12 +441,12 @@ msgstr "Giugno" #: code:addons/account/wizard/account_automatic_reconcile.py:148 #, python-format msgid "You must select accounts to reconcile." -msgstr "" +msgstr "E' necessario selezionare i conti da riconciliare." #. module: account #: help:account.config.settings,group_analytic_accounting:0 msgid "Allows you to use the analytic accounting." -msgstr "" +msgstr "Abilita la contabilità analitica." #. module: account #: model:ir.actions.act_window,help:account.action_account_moves_bank @@ -462,7 +466,7 @@ msgstr "" #: view:account.invoice.report:0 #: field:account.invoice.report,user_id:0 msgid "Salesperson" -msgstr "" +msgstr "Commerciale" #. module: account #: model:ir.model,name:account.model_account_tax_template @@ -685,12 +689,12 @@ msgstr "Il contabile conferma la registrazione" #: code:addons/account/static/src/xml/account_move_reconciliation.xml:31 #, python-format msgid "Nothing to reconcile" -msgstr "" +msgstr "Nulla da riconciliare" #. module: account #: field:account.config.settings,decimal_precision:0 msgid "Decimal precision on journal entries" -msgstr "" +msgstr "Accuratezza decimale nelle registrazioni sezionale" #. module: account #: selection:account.config.settings,period:0 @@ -725,6 +729,8 @@ msgid "" "Specified journal does not have any account move entries in draft state for " "this period." msgstr "" +"Il sezionale specificato non ha registrazioni in stato bozza per questo " +"periodo." #. module: account #: view:account.fiscal.position:0 @@ -1671,6 +1677,9 @@ msgid "" "There is nothing to reconcile. All invoices and payments\n" " have been reconciled, your partner balance is clean." msgstr "" +"Non c'è nulla da riconciliare. Tutte le fatture e i pagamenti\n" +" sono stati riconciliati, il saldo dei clienti/fornitori " +"è a zero." #. module: account #: field:account.chart.template,code_digits:0 @@ -2106,7 +2115,7 @@ msgstr "" #: view:account.bank.statement:0 #: field:account.bank.statement,last_closing_balance:0 msgid "Last Closing Balance" -msgstr "" +msgstr "Ultima Chiusura di Bilancio" #. module: account #: model:ir.model,name:account.model_account_common_journal_report @@ -3474,7 +3483,7 @@ msgstr "Bilancino" #: code:addons/account/account.py:430 #, python-format msgid "Unable to adapt the initial balance (negative value)." -msgstr "" +msgstr "Non è possibile adattare il saldo iniziale (importo negativo)." #. module: account #: selection:account.invoice,type:0 @@ -4881,7 +4890,7 @@ msgstr "Modalità di visualizzazione" #. module: account #: selection:account.move.line,state:0 msgid "Balanced" -msgstr "" +msgstr "Saldato" #. module: account #: model:process.node,note:account.process_node_importinvoice0 @@ -5731,14 +5740,14 @@ msgstr "Conto imposta" #: model:ir.actions.act_window,name:account.action_account_report_bs #: model:ir.ui.menu,name:account.menu_account_report_bs msgid "Balance Sheet" -msgstr "Bilancio" +msgstr "Stato Patrimoniale" #. module: account #: selection:account.account.type,report_type:0 #: code:addons/account/account.py:187 #, python-format msgid "Profit & Loss (Income account)" -msgstr "Utili & Perdite (Conto di Ricavo)" +msgstr "Conto economico" #. module: account #: field:account.journal,allow_date:0 @@ -5983,6 +5992,9 @@ msgid "" "that you should have your last line with the type 'Balance' to ensure that " "the whole amount will be treated." msgstr "" +"Selezionare qui il tipo di riga del pagamento. Notare che l'ultima riga " +"dovrebbe essere di tipo 'Saldo' per assicurarsi che l'intero importo sia " +"saldato." #. module: account #: field:account.partner.ledger,initial_balance:0 @@ -6327,7 +6339,7 @@ msgstr "Totale debito" #: model:account.account.type,name:account.data_account_type_income #: model:account.financial.report,name:account.account_financial_report_income0 msgid "Income" -msgstr "Entrata" +msgstr "Ricavi" #. module: account #: selection:account.bank.statement.line,type:0 @@ -6569,7 +6581,7 @@ msgstr "Note di Credito" #. module: account #: field:account.account,foreign_balance:0 msgid "Foreign Balance" -msgstr "Salso valuta estera" +msgstr "Saldo valuta estera" #. module: account #: field:account.journal.period,name:0 @@ -6988,6 +7000,8 @@ msgid "" "There is no opening/closing period defined, please create one to set the " "initial balance." msgstr "" +"Non ci sono periodi di apertura/chiusura definiti, crearne uno per impostare " +"il saldo iniziale." #. module: account #: help:account.tax.template,sequence:0 @@ -7208,7 +7222,7 @@ msgstr "Nome Modello" #. module: account #: field:account.chart.template,property_account_expense_categ:0 msgid "Expense Category Account" -msgstr "Conto categoria spesa" +msgstr "Conto Categoria Costi" #. module: account #: sql_constraint:account.tax:0 @@ -7666,6 +7680,11 @@ msgid "" "Make sure you have configured payment terms properly.\n" "The latest payment term line should be of the \"Balance\" type." msgstr "" +"Non è possibile validare una voce senza saldo.\n" +"Assicurarsi che siano stati configurati correttamente i termini di " +"pagamento.\n" +"L'ultima riga della condizione di pagamento dovrebbe essere di tipo " +"\"Saldo\"." #. module: account #: model:process.transition,note:account.process_transition_invoicemanually0 @@ -8107,7 +8126,7 @@ msgstr "Pro-Forma" #: view:account.move.line:0 #: selection:account.move.line,state:0 msgid "Unbalanced" -msgstr "Squadrato" +msgstr "Zoppe" #. module: account #: selection:account.move.line,centralisation:0 @@ -8844,7 +8863,7 @@ msgstr "" #. module: account #: field:account.chart.template,property_account_income_categ:0 msgid "Income Category Account" -msgstr "Income Category Account" +msgstr "Conto Categoria Ricavi" #. module: account #: field:account.account,adjusted_balance:0 @@ -8885,6 +8904,8 @@ msgid "" "Error: The default Unit of Measure and the purchase Unit of Measure must be " "in the same category." msgstr "" +"Errore: L'unità di misura di default e l'unità di misura di acquisto devono " +"essere nella stessa categoria." #. module: account #: report:account.invoice:0 @@ -9831,7 +9852,7 @@ msgstr "Documento: Scheda Conto Cliente" #. module: account #: field:account.account.type,report_type:0 msgid "P&L / BS Category" -msgstr "Categoria Utili & Perdite / Bilancio" +msgstr "Categoria CE / SP" #. module: account #: view:account.account.template:0 @@ -11099,6 +11120,7 @@ msgstr "Raggruppa per mese Data Fattura" #, python-format msgid "There is no income account defined for this product: \"%s\" (id:%d)." msgstr "" +"Non c'è un conto di ricavo definito per questo prodotto: \"%s\" (id:%d)." #. module: account #: model:ir.actions.act_window,name:account.action_aged_receivable_graph diff --git a/addons/account/i18n/lt.po b/addons/account/i18n/lt.po index 9671fce77c3..6552391bd16 100644 --- a/addons/account/i18n/lt.po +++ b/addons/account/i18n/lt.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-11-24 02:52+0000\n" -"PO-Revision-Date: 2012-05-10 17:52+0000\n" -"Last-Translator: Raphael Collet (OpenERP) \n" +"PO-Revision-Date: 2012-11-29 13:22+0000\n" +"Last-Translator: Andrius Preimantas \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-11-25 05:56+0000\n" -"X-Generator: Launchpad (build 16293)\n" +"X-Launchpad-Export-Date: 2012-11-30 05:07+0000\n" +"X-Generator: Launchpad (build 16319)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -1750,7 +1750,7 @@ msgstr "Kreditorių sąskaita" #: field:account.tax,account_paid_id:0 #: field:account.tax.template,account_paid_id:0 msgid "Refund Tax Account" -msgstr "Grąžintino mokesčio sąskaita" +msgstr "Grąžinimų mokesčio sąskaita" #. module: account #: model:ir.model,name:account.model_ir_sequence @@ -5832,7 +5832,7 @@ msgstr "" #: field:account.bank.statement.line,name:0 #: field:account.invoice,reference:0 msgid "Communication" -msgstr "" +msgstr "Komunikacija" #. module: account #: view:account.config.settings:0 @@ -6356,7 +6356,7 @@ msgstr "" #: field:account.tax,account_collected_id:0 #: field:account.tax.template,account_collected_id:0 msgid "Invoice Tax Account" -msgstr "Mokėtino mokesčio sąskaita" +msgstr "Sąsk. fakt. mokesčių sąskaitą" #. module: account #: model:ir.actions.act_window,name:account.action_account_general_journal diff --git a/addons/account/i18n/nb.po b/addons/account/i18n/nb.po index 38502ad287f..0a8b6e23ad5 100644 --- a/addons/account/i18n/nb.po +++ b/addons/account/i18n/nb.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-11-24 02:52+0000\n" -"PO-Revision-Date: 2012-11-26 15:09+0000\n" +"PO-Revision-Date: 2012-11-28 13:31+0000\n" "Last-Translator: Kaare Pettersen \n" "Language-Team: Norwegian Bokmal \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-11-27 05:24+0000\n" -"X-Generator: Launchpad (build 16309)\n" +"X-Launchpad-Export-Date: 2012-11-29 05:14+0000\n" +"X-Generator: Launchpad (build 16319)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -2399,7 +2399,7 @@ msgstr "Avgiftsdefinisjon" #: view:account.config.settings:0 #: model:ir.actions.act_window,name:account.action_account_config msgid "Configure Accounting" -msgstr "" +msgstr "konfigurere regnskap." #. module: account #: field:account.invoice.report,uom_name:0 @@ -2420,7 +2420,7 @@ msgstr "" #: code:addons/account/static/src/xml/account_move_reconciliation.xml:8 #, python-format msgid "Good job!" -msgstr "" +msgstr "Bra jobba!" #. module: account #: field:account.config.settings,module_account_asset:0 @@ -2515,7 +2515,7 @@ msgstr "Åpne poster" #. module: account #: field:account.config.settings,purchase_refund_sequence_next:0 msgid "Next supplier credit note number" -msgstr "" +msgstr "Neste leverandør kredit notat nummer." #. module: account #: field:account.automatic.reconcile,account_ids:0 @@ -2555,12 +2555,12 @@ msgstr "Konto for avgifter" #: code:addons/account/account_cash_statement.py:256 #, python-format msgid "You do not have rights to open this %s journal !" -msgstr "" +msgstr "Du har ikke rett til å åpne denne %s journalen !" #. module: account #: model:res.groups,name:account.group_supplier_inv_check_total msgid "Check Total on supplier invoices" -msgstr "" +msgstr "Sjekk total på leverandør fakturaer." #. module: account #: selection:account.invoice,state:0 @@ -2781,7 +2781,7 @@ msgstr "skattemessige posisjoner" #: code:addons/account/account_move_line.py:592 #, python-format msgid "You cannot create journal items on a closed account %s %s." -msgstr "" +msgstr "Du kan ikke opprette journal elementer på en lukket konto% s% s." #. module: account #: field:account.period.close,sure:0 @@ -2816,7 +2816,7 @@ msgstr "Kunde fakturakladd" #. module: account #: view:product.category:0 msgid "Account Properties" -msgstr "" +msgstr "Konto egenskaper." #. module: account #: view:account.partner.reconcile.process:0 @@ -2826,7 +2826,7 @@ msgstr "Avstemming av partner" #. module: account #: view:account.analytic.line:0 msgid "Fin. Account" -msgstr "" +msgstr "Fin. Konto." #. module: account #: field:account.tax,tax_code_id:0 @@ -2903,7 +2903,7 @@ msgstr "EXJ" #. module: account #: view:account.invoice.refund:0 msgid "Create Credit Note" -msgstr "" +msgstr "Opprett kredit notat." #. module: account #: field:product.template,supplier_taxes_id:0 @@ -3001,7 +3001,7 @@ msgstr "Kontodimensjon" #: field:account.config.settings,default_purchase_tax:0 #: field:account.config.settings,purchase_tax:0 msgid "Default purchase tax" -msgstr "" +msgstr "Standard omsetnings skatt." #. module: account #: view:account.account:0 @@ -3175,7 +3175,7 @@ msgstr "Kommuniksjonstype" #. module: account #: constraint:account.move.line:0 msgid "Account and Period must belong to the same company." -msgstr "" +msgstr "Konto og periode må tilhøre samme selskap." #. module: account #: constraint:res.currency:0 @@ -3213,7 +3213,7 @@ msgstr "Avskrivningsbeløp" #: field:account.bank.statement,message_unread:0 #: field:account.invoice,message_unread:0 msgid "Unread Messages" -msgstr "" +msgstr "Uleste meldinger." #. module: account #: code:addons/account/wizard/account_invoice_state.py:44 @@ -3222,12 +3222,14 @@ msgid "" "Selected invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-" "Forma' state." msgstr "" +"Valgt faktura (e) kan ikke bekreftes som de ikke er i \"Kladd\" eller \"pro-" +"forma 'tilstand." #. module: account #: code:addons/account/account.py:1114 #, python-format msgid "You should choose the periods that belong to the same company." -msgstr "" +msgstr "Du bør velge de periodene som tilhører samme selskap." #. module: account #: model:ir.actions.act_window,name:account.action_report_account_sales_tree_all @@ -3240,17 +3242,17 @@ msgstr "Salg pr. konto" #: code:addons/account/account.py:1471 #, python-format msgid "You cannot delete a posted journal entry \"%s\"." -msgstr "" +msgstr "Du kan ikke slette en publisert bilagsregistrering \"% s\"." #. module: account #: view:account.invoice:0 msgid "Accounting Period" -msgstr "" +msgstr "Regnskaps periode." #. module: account #: field:account.config.settings,sale_journal_id:0 msgid "Sale journal" -msgstr "" +msgstr "Salgs journal." #. module: account #: code:addons/account/account.py:2323 @@ -3346,7 +3348,7 @@ msgstr "Obligatorisk" #. module: account #: field:wizard.multi.charts.accounts,only_one_chart_template:0 msgid "Only One Chart Template Available" -msgstr "" +msgstr "Bare en diagram mal tilgjengelig." #. module: account #: view:account.chart.template:0 @@ -3359,7 +3361,7 @@ msgstr "Kostnadskonto" #: field:account.bank.statement,message_summary:0 #: field:account.invoice,message_summary:0 msgid "Summary" -msgstr "" +msgstr "Oppsummering." #. module: account #: help:account.invoice,period_id:0 @@ -3481,7 +3483,7 @@ msgstr "Velg regnskapsår" #: view:account.config.settings:0 #: view:account.installer:0 msgid "Date Range" -msgstr "" +msgstr "Dato område." #. module: account #: view:account.period:0 @@ -3533,7 +3535,7 @@ msgstr "" #: code:addons/account/account.py:2650 #, python-format msgid "There is no parent code for the template account." -msgstr "" +msgstr "Det er ingen overordnede kode for denne malen kontoen." #. module: account #: help:account.chart.template,code_digits:0 @@ -3617,12 +3619,12 @@ msgstr "Elektonisk fil" #. module: account #: constraint:res.partner:0 msgid "Error: Invalid ean code" -msgstr "" +msgstr "Feil: Ugyldig ean kode." #. module: account #: field:account.config.settings,has_chart_of_accounts:0 msgid "Company has a chart of accounts" -msgstr "" +msgstr "Selskapet har en konto plan." #. module: account #: view:account.payment.term.line:0 @@ -3638,7 +3640,7 @@ msgstr "Konto Partner ledger" #: code:addons/account/account_invoice.py:1321 #, python-format msgid "%s created." -msgstr "" +msgstr "%s Opprettet." #. module: account #: help:account.journal.column,sequence:0 @@ -3648,7 +3650,7 @@ msgstr "Gir sekvensen for å merke kolonne." #. module: account #: view:account.period:0 msgid "Account Period" -msgstr "" +msgstr "Konto periode." #. module: account #: help:account.account,currency_id:0 @@ -3676,7 +3678,7 @@ msgstr "Kontoplanmal" #. module: account #: view:account.bank.statement:0 msgid "Transactions" -msgstr "" +msgstr "Transaksjoner." #. module: account #: model:ir.model,name:account.model_account_unreconcile_reconcile @@ -3851,6 +3853,10 @@ msgid "" "You can create one in the menu: \n" "Configuration/Journals/Journals." msgstr "" +"Kan ikke finne noen konto journal of% s for denne bedriften.\n" +"\n" +"Du kan opprette en i menyen:\n" +"Konfigurasjon / Tidsskrifter / tidsskrifter." #. module: account #: model:ir.actions.act_window,name:account.action_account_unreconcile @@ -3890,7 +3896,7 @@ msgstr "år" #. module: account #: field:account.config.settings,date_start:0 msgid "Start date" -msgstr "" +msgstr "Starts dato." #. module: account #: view:account.invoice.refund:0 @@ -3938,7 +3944,7 @@ msgstr "Kontoplan" #: view:cash.box.out:0 #: model:ir.actions.act_window,name:account.action_cash_box_out msgid "Take Money Out" -msgstr "" +msgstr "Ta ut penger." #. module: account #: report:account.vat.declaration:0 @@ -4059,7 +4065,7 @@ msgstr "Detaljert" #. module: account #: help:account.config.settings,default_purchase_tax:0 msgid "This purchase tax will be assigned by default on new products." -msgstr "" +msgstr "Kjøpet skatt vil bli tildelt som standard på nye produkter." #. module: account #: report:account.invoice:0 @@ -4087,7 +4093,7 @@ msgstr "(Hvis du ikke velger periode vil alle åpne perioder bli valgt)" #. module: account #: model:ir.model,name:account.model_account_journal_cashbox_line msgid "account.journal.cashbox.line" -msgstr "" +msgstr "konto.journal.Pengeboks.linje." #. module: account #: model:ir.model,name:account.model_account_partner_reconcile_process @@ -4227,7 +4233,7 @@ msgstr "" #. module: account #: field:account.config.settings,group_check_supplier_invoice_total:0 msgid "Check the total of supplier invoices" -msgstr "" +msgstr "Sjekk totalen av leverandør fakturaer." #. module: account #: view:account.tax:0 @@ -4314,7 +4320,7 @@ msgstr "Multiplikasjonsfaktor Skatt kode" #. module: account #: field:account.config.settings,complete_tax_set:0 msgid "Complete set of taxes" -msgstr "" +msgstr "Fullfør sett av skatter." #. module: account #: field:account.account,name:0 @@ -4342,7 +4348,7 @@ msgstr "" #. module: account #: model:mail.message.subtype,name:account.mt_invoice_paid msgid "paid" -msgstr "" +msgstr "Betalt." #. module: account #: field:account.move.line,date:0 @@ -4376,7 +4382,7 @@ msgstr "Standardkoder" #: help:account.bank.statement,message_ids:0 #: help:account.invoice,message_ids:0 msgid "Messages and communication history" -msgstr "" +msgstr "Meldinger og kommunikasjon historie." #. module: account #: help:account.journal,analytic_journal_id:0 @@ -4417,7 +4423,7 @@ msgstr "" #: code:addons/account/account_move_line.py:1236 #, python-format msgid "You cannot use an inactive account." -msgstr "" +msgstr "Du kan ikke bruke en inaktiv konto." #. module: account #: model:ir.actions.act_window,name:account.open_board_account @@ -4485,7 +4491,7 @@ msgstr "tittel" #. module: account #: selection:account.invoice.refund,filter_refund:0 msgid "Create a draft credit note" -msgstr "" +msgstr "Opprett en kladd kredit notat." #. module: account #: view:account.invoice:0 @@ -4517,7 +4523,7 @@ msgstr "Eiendeler" #. module: account #: view:account.config.settings:0 msgid "Accounting & Finance" -msgstr "" +msgstr "Regnskap & Finans." #. module: account #: view:account.invoice.confirm:0 @@ -4544,7 +4550,7 @@ msgstr "(Faktura må settes ikke-avstemt før den kan åpnes)" #. module: account #: field:account.tax,account_analytic_collected_id:0 msgid "Invoice Tax Analytic Account" -msgstr "" +msgstr "Faktura skatt analytisk konto." #. module: account #: field:account.chart,period_from:0 @@ -4705,6 +4711,8 @@ msgid "" "Error!\n" "You cannot create recursive Tax Codes." msgstr "" +"Feil!\n" +"Du kan ikke opprette rekursive skatte koder." #. module: account #: constraint:account.period:0 @@ -4712,6 +4720,8 @@ msgid "" "Error!\n" "The duration of the Period(s) is/are invalid." msgstr "" +"Feil!\n" +"Varigheten av perioden (e) er / er ugyldig." #. module: account #: field:account.entries.report,month:0 @@ -4727,7 +4737,7 @@ msgstr "Måned" #. module: account #: field:account.config.settings,purchase_sequence_prefix:0 msgid "Supplier invoice sequence" -msgstr "" +msgstr "Leverandør faktura sekvens." #. module: account #: code:addons/account/account_invoice.py:571 @@ -4859,7 +4869,7 @@ msgstr "Vis modus" #. module: account #: selection:account.move.line,state:0 msgid "Balanced" -msgstr "" +msgstr "Balansert." #. module: account #: model:process.node,note:account.process_node_importinvoice0 @@ -4877,7 +4887,7 @@ msgstr "" #. module: account #: model:ir.actions.act_window,name:account.action_wizard_multi_chart msgid "Set Your Accounting Options" -msgstr "" +msgstr "Sett dine regnskaps tillegg." #. module: account #: model:ir.model,name:account.model_account_chart @@ -4968,7 +4978,7 @@ msgstr "Navnet på perioden må være unikt per selskap!" #. module: account #: help:wizard.multi.charts.accounts,currency_id:0 msgid "Currency as per company's country." -msgstr "" +msgstr "Valuta som per selskapets land." #. module: account #: view:account.tax:0 @@ -5009,6 +5019,8 @@ msgid "" "Error!\n" "You cannot create an account which has parent account of different company." msgstr "" +"Feil!\n" +"Du kan ikke opprette en konto som har overordnede hensyn til ulike selskap." #. module: account #: code:addons/account/account_invoice.py:615 @@ -5140,7 +5152,7 @@ msgstr "Annulert faktura" #. module: account #: view:account.invoice:0 msgid "My Invoices" -msgstr "" +msgstr "Mine fakturaer." #. module: account #: selection:account.bank.statement,state:0 @@ -5150,7 +5162,7 @@ msgstr "Ny" #. module: account #: view:wizard.multi.charts.accounts:0 msgid "Sale Tax" -msgstr "" +msgstr "Selg skatt." #. module: account #: field:account.tax,ref_tax_code_id:0 @@ -5208,7 +5220,7 @@ msgstr "Fakturaer" #. module: account #: help:account.config.settings,expects_chart_of_accounts:0 msgid "Check this box if this company is a legal entity." -msgstr "" +msgstr "Kryss av denne boksen hvis dette selskapet er en juridisk enhet." #. module: account #: model:account.account.type,name:account.conf_account_type_chk @@ -5225,7 +5237,7 @@ msgstr "SAJ" #. module: account #: constraint:account.analytic.line:0 msgid "You cannot create analytic line on view account." -msgstr "" +msgstr "Du kan ikke opprette en analytisk linje på vis konto." #. module: account #: view:account.aged.trial.balance:0 @@ -5265,7 +5277,7 @@ msgstr "" #: view:validate.account.move:0 #: view:validate.account.move.lines:0 msgid "or" -msgstr "" +msgstr "Eller." #. module: account #: view:account.invoice.report:0 @@ -5358,7 +5370,7 @@ msgstr "" #: field:account.invoice,message_comment_ids:0 #: help:account.invoice,message_comment_ids:0 msgid "Comments and emails" -msgstr "" +msgstr "Kommentarer og E-poster." #. module: account #: view:account.bank.statement:0 @@ -5393,7 +5405,7 @@ msgstr "Aktiv" #: view:account.bank.statement:0 #: field:account.journal,cash_control:0 msgid "Cash Control" -msgstr "" +msgstr "Kontant kontroll." #. module: account #: field:account.analytic.balance,date2:0 @@ -5441,7 +5453,7 @@ msgstr "" #. module: account #: model:res.groups,name:account.group_account_manager msgid "Financial Manager" -msgstr "" +msgstr "Finansiell ledelse." #. module: account #: field:account.journal,group_invoice_lines:0 @@ -5457,7 +5469,7 @@ msgstr "Bevegelser" #: field:account.bank.statement,details_ids:0 #: view:account.journal:0 msgid "CashBox Lines" -msgstr "" +msgstr "Kontontboks linjer." #. module: account #: model:ir.model,name:account.model_account_vat_declaration @@ -5503,6 +5515,8 @@ msgid "" "There is no period defined for this date: %s.\n" "Please create one." msgstr "" +"Det er ingen periode definert for denne datoen:% s.\n" +"Vennligst opprette en." #. module: account #: help:account.tax,price_include:0 @@ -5604,7 +5618,7 @@ msgstr "" #: code:addons/account/account_invoice.py:1326 #, python-format msgid "%s paid." -msgstr "" +msgstr "%s Betalt." #. module: account #: view:account.financial.report:0 @@ -5747,7 +5761,7 @@ msgstr "Beregningskode (dersom type=kode)" #, python-format msgid "" "Cannot find a chart of accounts for this company, you should create one." -msgstr "" +msgstr "Kan ikke finne en kontoplan for dette selskapet, du bør opprette en." #. module: account #: selection:account.analytic.journal,type:0 @@ -5882,7 +5896,7 @@ msgstr "Inkludert i basisbeløpet" #. module: account #: field:account.invoice,supplier_invoice_number:0 msgid "Supplier Invoice Number" -msgstr "" +msgstr "Leverandør faktura nummer." #. module: account #: help:account.payment.term.line,days:0 @@ -5903,6 +5917,8 @@ msgstr "Beregning" #, python-format msgid "You can not add/modify entries in a closed period %s of journal %s." msgstr "" +"Du kan ikke legge til / endre oppføringer i en lukket periode% s av " +"tidsskriftet% s." #. module: account #: view:account.journal:0 @@ -5927,7 +5943,7 @@ msgstr "Periodestart" #. module: account #: model:account.account.type,name:account.account_type_asset_view1 msgid "Asset View" -msgstr "" +msgstr "Eiendel Vis." #. module: account #: model:ir.model,name:account.model_account_common_account_report @@ -6000,12 +6016,12 @@ msgstr "Årsavslutningsjournal" #. module: account #: view:account.invoice:0 msgid "Draft Refund " -msgstr "" +msgstr "Utkast refusjon. " #. module: account #: view:cash.box.in:0 msgid "Fill in this form if you put money in the cash register:" -msgstr "" +msgstr "Fyll ut dette skjemaet hvis du setter penger i kasse apparatet:" #. module: account #: field:account.payment.term.line,value_amount:0 @@ -6082,7 +6098,7 @@ msgstr "Kundefakturaer og kreditnotaer" #: code:addons/account/wizard/account_move_journal.py:161 #, python-format msgid "This period is already closed." -msgstr "" +msgstr "Denne perioden er allerede lukket." #. module: account #: field:account.analytic.line,amount_currency:0 @@ -6095,7 +6111,7 @@ msgstr "Valutabeløp" #. module: account #: selection:res.company,tax_calculation_rounding_method:0 msgid "Round per Line" -msgstr "" +msgstr "Runde per. linje." #. module: account #: model:ir.actions.act_window,name:account.action_view_move_line @@ -6156,7 +6172,7 @@ msgstr "" #: code:addons/account/wizard/account_report_aged_partner_balance.py:56 #, python-format msgid "You must set a period length greater than 0." -msgstr "" +msgstr "Du må angi en periode lengde større enn 0." #. module: account #: view:account.fiscal.position.template:0 @@ -6167,7 +6183,7 @@ msgstr "Regnskapsstatus Mal" #. module: account #: view:account.invoice:0 msgid "Draft Refund" -msgstr "" +msgstr "Utkast refusjon." #. module: account #: view:account.analytic.chart:0 @@ -6204,7 +6220,7 @@ msgstr "Avstem med nedskriving" #. module: account #: constraint:account.move.line:0 msgid "You cannot create journal items on an account of type view." -msgstr "" +msgstr "Du kan ikke opprette journal elementer på en konto av typen visning." #. module: account #: selection:account.payment.term.line,value:0 @@ -6279,7 +6295,7 @@ msgstr "Flytt navn (id): %s (%s)" #. module: account #: view:account.move.journal:0 msgid "Standard Entries" -msgstr "" +msgstr "Standard oppføringer." #. module: account #: view:account.move.line.reconcile:0 @@ -6352,7 +6368,7 @@ msgstr "Avgiftskartlegging" #. module: account #: view:account.config.settings:0 msgid "Select Company" -msgstr "" +msgstr "Velg Firma." #. module: account #: model:ir.actions.act_window,name:account.action_account_state_open @@ -6426,7 +6442,7 @@ msgstr "Antall linjer" #. module: account #: view:account.invoice:0 msgid "(update)" -msgstr "" +msgstr "(Oppdatering)" #. module: account #: field:account.aged.trial.balance,filter:0 @@ -6468,7 +6484,7 @@ msgstr "" #. module: account #: field:account.journal,loss_account_id:0 msgid "Loss Account" -msgstr "" +msgstr "Tap konto." #. module: account #: field:account.tax,account_collected_id:0 @@ -6730,7 +6746,7 @@ msgstr "" #. module: account #: view:account.config.settings:0 msgid "Bank & Cash" -msgstr "" +msgstr "Bank og kontant." #. module: account #: help:account.fiscalyear.close.state,fy_id:0 @@ -6816,7 +6832,7 @@ msgstr "Fordring" #. module: account #: constraint:account.move.line:0 msgid "You cannot create journal items on closed account." -msgstr "" +msgstr "Du kan ikke opprette journal enmer i en lukker konto." #. module: account #: code:addons/account/account_invoice.py:594 diff --git a/addons/account/i18n/nl.po b/addons/account/i18n/nl.po index 51633c9e660..eed659d7d18 100644 --- a/addons/account/i18n/nl.po +++ b/addons/account/i18n/nl.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-11-24 02:52+0000\n" -"PO-Revision-Date: 2012-11-25 13:43+0000\n" +"PO-Revision-Date: 2012-11-29 15:05+0000\n" "Last-Translator: Erwin van der Ploeg (Endian Solutions) \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-11-26 04:41+0000\n" -"X-Generator: Launchpad (build 16293)\n" +"X-Launchpad-Export-Date: 2012-11-30 05:06+0000\n" +"X-Generator: Launchpad (build 16319)\n" #, python-format #~ msgid "Integrity Error !" @@ -114,6 +114,7 @@ msgid "" "Error!\n" "You cannot create recursive account templates." msgstr "" +"Fout! Het is niet toegestaan on een recursief grootboekschema aan te maken." #. module: account #. openerp-web @@ -155,6 +156,19 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" Klik om de zichtbare kolommen van een dagboek te " +"specificeren.\n" +"

\n" +" Dagboekweergaves bepalen de manier waarop boekingen \n" +" ingevoerd kunnen worden. Selecteer de velden welke zichtbaar " +"\n" +" moeten zijn en bepaald de volgorde daarvan.\n" +"

\n" +" In de dagboekinstellingen kan bepaald worden welke gegevens\n" +" zichtbaar zijn bij boekingen in het betreffende dagboek.\n" +"

\n" +" " #. module: account #: help:account.payment.term,active:0 @@ -205,6 +219,8 @@ msgid "" "which is set after generating opening entries from 'Generate Opening " "Entries'." msgstr "" +"U dient het 'Jaarafsluiting dagboek' te definiëren voor het fiscale jaar, " +"nadat u een openingsbalans heeft gemaakt" #. module: account #: field:account.fiscal.position.account,account_src_id:0 @@ -223,6 +239,15 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" klik hier om een fiscale periode toe te voegen.\n" +"

\n" +" Een fiscale periode is vaak een maand of een kwartaal. " +"Normaal\n" +" zal dit gelijk zijn met de periode van uw Belasting " +"aangifte.\n" +"

\n" +" " #. module: account #: model:ir.actions.act_window,name:account.action_view_created_invoice_dashboard @@ -243,7 +268,7 @@ msgstr "Dagboek: %s" #. module: account #: help:account.config.settings,code_digits:0 msgid "No. of digits to use for account code" -msgstr "" +msgstr "Aantal cijfers voor de rekening code" #. module: account #: help:account.analytic.journal,type:0 @@ -263,6 +288,9 @@ msgid "" "lines for invoices. Leave empty if you don't want to use an analytic account " "on the invoice tax lines by default." msgstr "" +"Geef de kostenplaats welke standaard gebruikt moet worden bij BTW factuur " +"regels. Als u dit veld niet invuld, wordt er standaard geen kostenplaats " +"gebruikt." #. module: account #: model:ir.actions.act_window,name:account.action_account_tax_template_form @@ -298,7 +326,7 @@ msgstr "Belgische overzichten" #. module: account #: model:account.account.type,name:account.account_type_income_view1 msgid "Income View" -msgstr "" +msgstr "View opbrengsten" #. module: account #: help:account.account,user_type:0 @@ -314,7 +342,7 @@ msgstr "" #. module: account #: field:account.config.settings,sale_refund_sequence_next:0 msgid "Next credit note number" -msgstr "" +msgstr "Volgend nummer creditnota" #. module: account #: help:account.config.settings,module_account_voucher:0 @@ -323,6 +351,10 @@ msgid "" "sales, purchase, expense, contra, etc.\n" " This installs the module account_voucher." msgstr "" +"Deze module bevat alle voorzieningen voor registratie van " +"(bank)afschriften.\n" +" " +"hiermee installeert u de module 'account_voucher'" #. module: account #: model:ir.actions.act_window,name:account.action_account_use_model_create_entry @@ -361,6 +393,18 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" Klik hier om een creditnota te maken. \n" +"

\n" +" Een creditnota is een factuur, waarbij u een bestaande " +"factuur volledig of gedeeltelijk \n" +" crediteert.\n" +"

\n" +" In plaats van handmatig kunt u hiermee een creditnota maken " +"\n" +" direct vanaf de originele factuur.\n" +"

\n" +" " #. module: account #: field:account.journal.column,field:0 @@ -426,12 +470,12 @@ msgstr "Juni" #: code:addons/account/wizard/account_automatic_reconcile.py:148 #, python-format msgid "You must select accounts to reconcile." -msgstr "" +msgstr "Selecteer de grootboekrekeningen die afgeletterd moeten worden." #. module: account #: help:account.config.settings,group_analytic_accounting:0 msgid "Allows you to use the analytic accounting." -msgstr "" +msgstr "stelt u in staat kostenplaatsen te gebruiken" #. module: account #: model:ir.actions.act_window,help:account.action_account_moves_bank @@ -531,6 +575,18 @@ msgid "" "should choose 'Round per line' because you certainly want the sum of your " "tax-included line subtotals to be equal to the total amount with taxes." msgstr "" +"Als u 'afronden per regel' selecteert: voor elke BTW rekening , wordt het " +"BTW bedrag eerst berekend en afgerond voor elke factuur regel en vervolgens " +"worden deze afgeronde bedragen opgeteld, wat leidt tot het totale bedrag " +"voor deze belasting. \r\n" +"\r\n" +"Als u 'afronden globaal' selecteert: voor elke BTW rekening wordt het BTW " +"bedrag berekend voor elke factuur regel. vervolgens zullen deze bedragen " +"worden opgeteld en uiteindelijk wordt dit totale BTW bedrag afgerond. \r\n" +"\r\n" +"Als u verkoopt met BTW inbegrepen, moet u kiezen voor 'afronden per regel', " +"omdat U zeker wil zijn dat de subtotalen van \r\n" +"uw (BTW inbegrepen) regels gelijk zijn aan het totale bedrag met BTW." #. module: account #: model:ir.model,name:account.model_wizard_multi_charts_accounts @@ -600,7 +656,7 @@ msgstr "Bovenliggend doel" #. module: account #: help:account.invoice.line,sequence:0 msgid "Gives the sequence of this line when displaying the invoice." -msgstr "" +msgstr "Geeft de volgorde van de factuur regel bij het tonen van de factuur" #. module: account #: field:account.bank.statement,account_id:0 @@ -679,7 +735,7 @@ msgstr "Niets af te letteren" #. module: account #: field:account.config.settings,decimal_precision:0 msgid "Decimal precision on journal entries" -msgstr "" +msgstr "Aantal decimalen van journaalposten" #. module: account #: selection:account.config.settings,period:0 @@ -713,7 +769,7 @@ msgstr "Rapport waarde" msgid "" "Specified journal does not have any account move entries in draft state for " "this period." -msgstr "" +msgstr "Geselecteerd dagboek heeft geen 'concept'boekingen" #. module: account #: view:account.fiscal.position:0 @@ -768,12 +824,16 @@ msgid "" "

\n" " " msgstr "" +"

\n" +" Geen journaalposten gevonden.\n" +"

\n" +" " #. module: account #: code:addons/account/account.py:1606 #, python-format msgid "Cannot create move with currency different from .." -msgstr "" +msgstr "U kunt geen boeking doen met een andere valuta dan ..." #. module: account #: model:email.template,report_name:account.email_template_edi_invoice @@ -807,7 +867,7 @@ msgstr "Dagboek periode" #: constraint:account.move:0 msgid "" "You cannot create more than one move per period on a centralized journal." -msgstr "" +msgstr "U kunt niet meerdere boekingen doen bij een centraal journaal" #. module: account #: help:account.tax,account_analytic_paid_id:0 diff --git a/addons/account/i18n/zh_CN.po b/addons/account/i18n/zh_CN.po index 55d61f5c611..c95e3919012 100644 --- a/addons/account/i18n/zh_CN.po +++ b/addons/account/i18n/zh_CN.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-11-24 02:52+0000\n" -"PO-Revision-Date: 2012-11-01 08:44+0000\n" +"PO-Revision-Date: 2012-11-28 07:22+0000\n" "Last-Translator: ccdos \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-11-25 06:01+0000\n" -"X-Generator: Launchpad (build 16293)\n" +"X-Launchpad-Export-Date: 2012-11-29 05:14+0000\n" +"X-Generator: Launchpad (build 16319)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -776,7 +776,7 @@ msgstr "账簿的会计期间" #: constraint:account.move:0 msgid "" "You cannot create more than one move per period on a centralized journal." -msgstr "" +msgstr "在每个会计期间,你不可以创建1个以上的总分类凭证" #. module: account #: help:account.tax,account_analytic_paid_id:0 @@ -784,7 +784,7 @@ msgid "" "Set the analytic account that will be used by default on the invoice tax " "lines for refunds. Leave empty if you don't want to use an analytic account " "on the invoice tax lines by default." -msgstr "" +msgstr "设置辅助核算项,用于退款时发票上默认税科目。如果默认不要在发票的税上 使用辅助核算项,留空。" #. module: account #: view:account.account:0 @@ -6098,7 +6098,7 @@ msgstr "固定金额" #: code:addons/account/account_move_line.py:1151 #, python-format msgid "You cannot change the tax, you should remove and recreate lines." -msgstr "" +msgstr "你不能修改税,你需要删去并且重建这一行" #. module: account #: model:ir.actions.act_window,name:account.action_account_automatic_reconcile diff --git a/addons/account/product_view.xml b/addons/account/product_view.xml index 9b54647e726..a70fdf38f3c 100644 --- a/addons/account/product_view.xml +++ b/addons/account/product_view.xml @@ -7,14 +7,14 @@ - + - + - + diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py index 68eaedb20a6..a001b6b4f52 100644 --- a/addons/account/report/account_invoice_report.py +++ b/addons/account/report/account_invoice_report.py @@ -98,150 +98,124 @@ class account_invoice_report(osv.osv): 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True), 'residual': fields.float('Total Residual', readonly=True), 'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"), - 'delay_to_pay': fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"), - 'due_delay': fields.float('Avg. Due Delay', readonly=True, group_operator="avg"), } _order = 'date desc' - def _select(self): select_str = """ - SELECT min(ail.id) as id, - ai.date_invoice as date, - to_char(ai.date_invoice, 'YYYY') as year, - to_char(ai.date_invoice, 'MM') as month, - to_char(ai.date_invoice, 'YYYY-MM-DD') as day, - ail.product_id, - ai.partner_id as partner_id, - ai.payment_term as payment_term, - ai.period_id as period_id, - (case when u.uom_type not in ('reference') then - (select name from product_uom where uom_type='reference' and active and category_id=u.category_id LIMIT 1) - else - u.name - end) as uom_name, - ai.currency_id as currency_id, - ai.journal_id as journal_id, - ai.fiscal_position as fiscal_position, - ai.user_id as user_id, - ai.company_id as company_id, - count(ail.*) as nbr, - ai.type as type, - ai.state, - pt.categ_id, - ai.date_due as date_due, - ai.account_id as account_id, - ail.account_id as account_line_id, - ai.partner_bank_id as partner_bank_id, - sum(case when ai.type in ('out_refund','in_invoice') then - -ail.quantity / u.factor - else - ail.quantity / u.factor - end) as product_qty, - - sum(case when ai.type in ('out_refund','in_invoice') then - -ail.price_subtotal - else - ail.price_subtotal - end) / cr.rate as price_total, - - (case when ai.type in ('out_refund','in_invoice') then - sum(-ail.price_subtotal) - else - sum(ail.price_subtotal) - end) / (CASE WHEN sum(ail.quantity/u.factor) <> 0 - THEN - (case when ai.type in ('out_refund','in_invoice') - then sum(-ail.quantity/u.factor) - else sum(ail.quantity/u.factor) end) - ELSE 1 - END) - / cr.rate as price_average, - - cr.rate as currency_rate, - sum((select extract(epoch from avg(date_trunc('day',aml.date_created)-date_trunc('day',l.create_date)))/(24*60*60)::decimal(16,2) - from account_move_line as aml - left join account_invoice as a ON (a.move_id=aml.move_id) - left join account_invoice_line as l ON (a.id=l.invoice_id) - where a.id=ai.id)) as delay_to_pay, - sum((select extract(epoch from avg(date_trunc('day',a.date_due)-date_trunc('day',a.date_invoice)))/(24*60*60)::decimal(16,2) - from account_move_line as aml - left join account_invoice as a ON (a.move_id=aml.move_id) - left join account_invoice_line as l ON (a.id=l.invoice_id) - where a.id=ai.id)) as due_delay, - (case when ai.type in ('out_refund','in_invoice') then - -ai.residual - else - ai.residual - end)/ (CASE WHEN - (select count(l.id) from account_invoice_line as l - left join account_invoice as a ON (a.id=l.invoice_id) - where a.id=ai.id) <> 0 - THEN - (select count(l.id) from account_invoice_line as l - left join account_invoice as a ON (a.id=l.invoice_id) - where a.id=ai.id) - ELSE 1 - END) / cr.rate as residual + SELECT sub.id, sub.date, sub.year, sub.month, sub.day, sub.product_id, sub.partner_id, + sub.payment_term, sub.period_id, sub.uom_name, sub.currency_id, sub.journal_id, + sub.fiscal_position, sub.user_id, sub.company_id, sub.nbr, sub.type, sub.state, + sub.categ_id, sub.date_due, sub.account_id, sub.account_line_id, sub.partner_bank_id, + sub.product_qty, sub.price_total / cr.rate as price_total, sub.price_average /cr.rate as price_average, + cr.rate as currency_rate, sub.residual / cr.rate as residual """ return select_str - def _where(self): - where_str = """ - WHERE cr.id in (select id from res_currency_rate cr2 where (cr2.currency_id = ai.currency_id) - and ((ai.date_invoice is not null and cr.name <= ai.date_invoice) or (ai.date_invoice is null and cr.name <= NOW())) order by name desc limit 1) + def _sub_select(self): + select_str = """ + SELECT min(ail.id) AS id, + ai.date_invoice AS date, + to_char(ai.date_invoice::timestamp with time zone, 'YYYY'::text) AS year, + to_char(ai.date_invoice::timestamp with time zone, 'MM'::text) AS month, + to_char(ai.date_invoice::timestamp with time zone, 'YYYY-MM-DD'::text) AS day, + ail.product_id, ai.partner_id, ai.payment_term, ai.period_id, + CASE + WHEN u.uom_type::text <> 'reference'::text + THEN ( SELECT product_uom.name + FROM product_uom + WHERE product_uom.uom_type::text = 'reference'::text + AND product_uom.active + AND product_uom.category_id = u.category_id LIMIT 1) + ELSE u.name + END AS uom_name, + ai.currency_id, ai.journal_id, ai.fiscal_position, ai.user_id, ai.company_id, + count(ail.*) AS nbr, + ai.type, ai.state, pt.categ_id, ai.date_due, ai.account_id, ail.account_id AS account_line_id, + ai.partner_bank_id, + SUM(CASE + WHEN ai.type::text = ANY (ARRAY['out_refund'::character varying::text, 'in_invoice'::character varying::text]) + THEN (- ail.quantity) / u.factor + ELSE ail.quantity / u.factor + END) AS product_qty, + SUM(CASE + WHEN ai.type::text = ANY (ARRAY['out_refund'::character varying::text, 'in_invoice'::character varying::text]) + THEN - ail.price_subtotal + ELSE ail.price_subtotal + END) AS price_total, + CASE + WHEN ai.type::text = ANY (ARRAY['out_refund'::character varying::text, 'in_invoice'::character varying::text]) + THEN SUM(- ail.price_subtotal) + ELSE SUM(ail.price_subtotal) + END / CASE + WHEN SUM(ail.quantity / u.factor) <> 0::numeric + THEN CASE + WHEN ai.type::text = ANY (ARRAY['out_refund'::character varying::text, 'in_invoice'::character varying::text]) + THEN SUM((- ail.quantity) / u.factor) + ELSE SUM(ail.quantity / u.factor) + END + ELSE 1::numeric + END AS price_average, + CASE + WHEN ai.type::text = ANY (ARRAY['out_refund'::character varying::text, 'in_invoice'::character varying::text]) + THEN - ai.residual + ELSE ai.residual + END / CASE + WHEN (( SELECT count(l.id) AS count + FROM account_invoice_line l + LEFT JOIN account_invoice a ON a.id = l.invoice_id + WHERE a.id = ai.id)) <> 0 + THEN ( SELECT count(l.id) AS count + FROM account_invoice_line l + LEFT JOIN account_invoice a ON a.id = l.invoice_id + WHERE a.id = ai.id) + ELSE 1::bigint + END::numeric AS residual """ - return where_str + return select_str def _from(self): from_str = """ - FROM account_invoice_line as ail - left join account_invoice as ai ON (ai.id=ail.invoice_id) - left join product_product pr on (pr.id=ail.product_id) - left join product_template pt on (pt.id=pr.product_tmpl_id) - left join product_uom u on (u.id=ail.uos_id), - res_currency_rate cr + FROM account_invoice_line ail + JOIN account_invoice ai ON ai.id = ail.invoice_id + LEFT JOIN product_product pr ON pr.id = ail.product_id + left JOIN product_template pt ON pt.id = pr.product_tmpl_id + LEFT JOIN product_uom u ON u.id = ail.uos_id """ return from_str def _group_by(self): group_by_str = """ - GROUP BY ail.product_id, - ai.date_invoice, - ai.id, - cr.rate, - to_char(ai.date_invoice, 'YYYY'), - to_char(ai.date_invoice, 'MM'), - to_char(ai.date_invoice, 'YYYY-MM-DD'), - ai.partner_id, - ai.payment_term, - ai.period_id, - u.name, - ai.currency_id, - ai.journal_id, - ai.fiscal_position, - ai.user_id, - ai.company_id, - ai.type, - ai.state, - pt.categ_id, - ai.date_due, - ai.account_id, - ail.account_id, - ai.partner_bank_id, - ai.residual, - ai.amount_total, - u.uom_type, - u.category_id + GROUP BY ail.product_id, ai.date_invoice, ai.id, + to_char(ai.date_invoice::timestamp with time zone, 'YYYY'::text), + to_char(ai.date_invoice::timestamp with time zone, 'MM'::text), + to_char(ai.date_invoice::timestamp with time zone, 'YYYY-MM-DD'::text), + ai.partner_id, ai.payment_term, ai.period_id, u.name, ai.currency_id, ai.journal_id, + ai.fiscal_position, ai.user_id, ai.company_id, ai.type, ai.state, pt.categ_id, + ai.date_due, ai.account_id, ail.account_id, ai.partner_bank_id, ai.residual, + ai.amount_total, u.uom_type, u.category_id """ return group_by_str def init(self, cr): # self._table = account_invoice_report tools.drop_view_if_exists(cr, self._table) - cr.execute("CREATE or REPLACE VIEW %s as (%s %s %s %s)" % ( + cr.execute("""CREATE or REPLACE VIEW %s as ( + %s + FROM ( + %s %s %s + ) AS sub + JOIN res_currency_rate cr ON (cr.currency_id = sub.currency_id) + WHERE + cr.id IN (SELECT id + FROM res_currency_rate cr2 + WHERE (cr2.currency_id = sub.currency_id) + AND ((sub.date IS NOT NULL AND cr.name <= sub.date) + OR (sub.date IS NULL AND cr.name <= NOW())) + ORDER BY name DESC LIMIT 1) + )""" % ( self._table, - self._select(), self._from(), self._where(), self._group_by())) + self._select(), self._sub_select(), self._from(), self._group_by())) account_invoice_report() diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 289db376e5d..66e17560bde 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -30,8 +30,6 @@ - -
@@ -93,7 +91,7 @@ tree,graph {'search_default_period':1,'search_default_current':1, 'search_default_year': 1, 'search_default_category_product':1, 'search_default_customer':1, 'group_by':[], 'group_by_no_leaf':1,} - From this report, you can have an overview of the amount invoiced to your customer as well as payment delays. The tool search can also be used to personalise your Invoices reports and so, match this analysis to your needs. + From this report, you can have an overview of the amount invoiced to your customer. The tool search can also be used to personalise your Invoices reports and so, match this analysis to your needs.
diff --git a/addons/account/res_currency.py b/addons/account/res_currency.py index ce781a1e11a..60bb6152a9b 100644 --- a/addons/account/res_currency.py +++ b/addons/account/res_currency.py @@ -29,6 +29,7 @@ class res_currency_account(osv.osv): if context is None: context = {} rate = super(res_currency_account, self)._get_conversion_rate(cr, uid, from_currency, to_currency, context=context) + #process the case where the account doesn't work with an outgoing currency rate method 'at date' but 'average' account = context.get('res.currency.compute.account') account_invert = context.get('res.currency.compute.account_invert') if account and account.currency_mode == 'average' and account.currency_id: diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv index 28bedbf65a1..d1f0bbab6b5 100644 --- a/addons/account/security/ir.model.access.csv +++ b/addons/account/security/ir.model.access.csv @@ -7,8 +7,6 @@ access_account_tax_internal_user,account.tax internal user,model_account_tax,bas access_account_account,account.account,model_account_account,account.group_account_user,1,0,0,0 access_account_account_user,account.account user,model_account_account,base.group_user,1,0,0,0 access_account_account_partner_manager,account.account partner manager,model_account_account,base.group_partner_manager,1,0,0,0 -access_account_journal_view,account.journal.view,model_account_journal_view,account.group_account_user,1,0,0,0 -access_account_journal_column,account.journal.column,model_account_journal_column,account.group_account_user,1,0,0,0 access_account_journal_period_manager,account.journal.period manager,model_account_journal_period,account.group_account_manager,1,0,0,0 access_account_tax_code,account.tax.code,model_account_tax_code,account.group_account_invoice,1,0,0,0 access_account_tax,account.tax,model_account_tax,account.group_account_invoice,1,0,0,0 @@ -83,8 +81,6 @@ access_account_entries_report_employee,account.entries.report employee,model_acc access_analytic_entries_report_manager,analytic.entries.report,model_analytic_entries_report,account.group_account_manager,1,0,0,0 access_account_cashbox_line,account.cashbox.line,model_account_cashbox_line,account.group_account_user,1,1,1,1 access_account_journal_cashbox_line,account.journal.cashbox.line,model_account_journal_cashbox_line,account.group_account_user,1,1,1,0 -access_account_journal_view_invoice,account.journal.view invoice,model_account_journal_view,account.group_account_invoice,1,1,1,1 -access_account_journal_column_invoice,account.journal.column invoice,model_account_journal_column,account.group_account_invoice,1,1,1,1 access_account_invoice_tax_accountant,account.invoice.tax accountant,model_account_invoice_tax,account.group_account_user,1,0,0,0 access_account_move_reconcile_manager,account.move.reconcile manager,model_account_move_reconcile,account.group_account_manager,1,0,0,0 access_account_analytic_line_invoice,account.analytic.line invoice,model_account_analytic_line,account.group_account_invoice,1,1,1,1 diff --git a/addons/account/static/src/js/account_move_line_quickadd.js b/addons/account/static/src/js/account_move_line_quickadd.js new file mode 100644 index 00000000000..997b2b03bb6 --- /dev/null +++ b/addons/account/static/src/js/account_move_line_quickadd.js @@ -0,0 +1,99 @@ +openerp.account.quickadd = function (instance) { + var _t = instance.web._t, + _lt = instance.web._lt; + var QWeb = instance.web.qweb; + + instance.web.account = instance.web.account || {}; + + instance.web.views.add('tree_account_move_line_quickadd', 'instance.web.account.QuickAddListView'); + instance.web.account.QuickAddListView = instance.web.ListView.extend({ + init: function() { + this._super.apply(this, arguments); + this.journals = []; + this.periods = []; + this.current_journal = null; + this.current_period = null; + this.default_period = null; + this.default_journal = null; + this.current_journal_type = null; + this.current_journal_currency = null; + this.current_journal_analytic = null; + }, + start:function(){ + var tmp = this._super.apply(this, arguments); + var self = this; + this.$el.parent().prepend(QWeb.render("AccountMoveLineQuickAdd", {widget: this})); + + this.$el.parent().find('.oe_account_select_journal').change(function() { + self.current_journal = this.value === '' ? null : parseInt(this.value); + self.do_search(self.last_domain, self.last_context, self.last_group_by); + }); + this.$el.parent().find('.oe_account_select_period').change(function() { + self.current_period = this.value === '' ? null : parseInt(this.value); + self.do_search(self.last_domain, self.last_context, self.last_group_by); + }); + this.on('edit:after', this, function () { + self.$el.parent().find('.oe_account_select_journal').attr('disabled', 'disabled'); + self.$el.parent().find('.oe_account_select_period').attr('disabled', 'disabled'); + }); + this.on('save:after cancel:after', this, function () { + self.$el.parent().find('.oe_account_select_journal').removeAttr('disabled'); + self.$el.parent().find('.oe_account_select_period').removeAttr('disabled'); + }); + var mod = new instance.web.Model("account.move.line", self.dataset.context, self.dataset.domain); + mod.call("default_get", [['journal_id','period_id'],self.dataset.context]).then(function(result) { + self.current_period = result['period_id']; + self.current_journal = result['journal_id']; + }); + return tmp; + }, + do_search: function(domain, context, group_by) { + var self = this; + this.last_domain = domain; + this.last_context = context; + this.last_group_by = group_by; + this.old_search = _.bind(this._super, this); + var mod = new instance.web.Model("account.move.line", context, domain); + return $.when(mod.call("list_journals", []).then(function(result) { + self.journals = result; + }),mod.call("list_periods", []).then(function(result) { + self.periods = result; + })).then(function () { + var o; + self.$el.parent().find('.oe_account_select_journal').children().remove().end(); + self.$el.parent().find('.oe_account_select_journal').append(new Option('', '')); + for (var i = 0;i < self.journals.length;i++){ + o = new Option(self.journals[i][1], self.journals[i][0]); + if (self.journals[i][0] === self.current_journal){ + self.current_journal_type = self.journals[i][2]; + self.current_journal_currency = self.journals[i][3]; + self.current_journal_analytic = self.journals[i][4]; + $(o).attr('selected',true); + } + self.$el.parent().find('.oe_account_select_journal').append(o); + } + self.$el.parent().find('.oe_account_select_period').children().remove().end(); + self.$el.parent().find('.oe_account_select_period').append(new Option('', '')); + for (var i = 0;i < self.periods.length;i++){ + o = new Option(self.periods[i][1], self.periods[i][0]); + self.$el.parent().find('.oe_account_select_period').append(o); + } + self.$el.parent().find('.oe_account_select_period').val(self.current_period).attr('selected',true); + return self.search_by_journal_period(); + }); + }, + search_by_journal_period: function() { + var self = this; + var domain = []; + if (self.current_journal !== null) domain.push(["journal_id", "=", self.current_journal]); + if (self.current_period !== null) domain.push(["period_id", "=", self.current_period]); + self.last_context["journal_id"] = self.current_journal === null ? false : self.current_journal; + if (self.current_period === null) delete self.last_context["period_id"]; + else self.last_context["period_id"] = self.current_period; + self.last_context["journal_type"] = self.current_journal_type; + self.last_context["currency"] = self.current_journal_currency; + self.last_context["analytic_journal_id"] = self.current_journal_analytic; + return self.old_search(new instance.web.CompoundDomain(self.last_domain, domain), self.last_context, self.last_group_by); + }, + }); +}; diff --git a/addons/account/static/src/js/account_move_reconciliation.js b/addons/account/static/src/js/account_move_reconciliation.js index 22fe9b7b392..19c194166e2 100644 --- a/addons/account/static/src/js/account_move_reconciliation.js +++ b/addons/account/static/src/js/account_move_reconciliation.js @@ -1,9 +1,10 @@ openerp.account = function (instance) { + openerp.account.quickadd(instance); var _t = instance.web._t, _lt = instance.web._lt; var QWeb = instance.web.qweb; - instance.web.account = {}; + instance.web.account = instance.web.account || {}; instance.web.views.add('tree_account_reconciliation', 'instance.web.account.ReconciliationListView'); instance.web.account.ReconciliationListView = instance.web.ListView.extend({ diff --git a/addons/account/static/src/xml/account_move_line_quickadd.xml b/addons/account/static/src/xml/account_move_line_quickadd.xml new file mode 100644 index 00000000000..3ed66eec917 --- /dev/null +++ b/addons/account/static/src/xml/account_move_line_quickadd.xml @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/addons/account/test/account_fiscalyear_close.yml b/addons/account/test/account_fiscalyear_close.yml index 1e24d2ca0e7..1c3547ccefd 100644 --- a/addons/account/test/account_fiscalyear_close.yml +++ b/addons/account/test/account_fiscalyear_close.yml @@ -29,7 +29,6 @@ default_debit_account_id: cash default_credit_account_id: cash company_id: base.main_company - view_id: account_journal_bank_view centralisation: 1 - I called the Generate Fiscalyear Opening Entries wizard @@ -47,47 +46,4 @@ !python {model: account.fiscalyear.close}: | self.data_save(cr, uid, [ref("account_fiscalyear_close_0")], {"lang": 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close")], - "tz": False, "active_id": ref("account.menu_wizard_fy_close"), }) - -- - I check the opening entries By using "Entries by Line wizard" -- - !record {model: account.move.journal, id: account_move_journal_0}: - {} -- - I clicked on Open Journal Button to check the entries - -- - !python {model: account.move.journal}: | - self.action_open_window(cr, uid, [ref("account_move_journal_0")], {"lang": 'en_US', - "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")], - "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"), - }) - -#- -# In order to test Cancel Opening Entries I cancelled the opening entries created for "Fiscal Year 2011" -#- -# !record {model: account.open.closed.fiscalyear, id: account_open_closed_fiscalyear_1}: -# fyear_id: account.data_fiscalyear -#- -# I clicked on Open button -#- -# !python {model: account.open.closed.fiscalyear}: | -# self.remove_entries(cr, uid, [ref("account_open_closed_fiscalyear_1")], {"lang": -# 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_open_closed_fy")], -# "tz": False, "active_id": ref("account.menu_wizard_open_closed_fy"), }) -#- -# I check the opening entries By using "Entries by Line wizard" -#- -# !record {model: account.move.journal, id: account_move_journal_2}: -# journal_id: account.sales_journal -# period_id: account_period_jan11 -# -#- -# I checked the Opening entries are cancelled successfully -#- -# !python {model: account.move.journal}: | -# self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US', -# "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")], -# "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"), -# }) + "tz": False, "active_id": ref("account.menu_wizard_fy_close"), }) \ No newline at end of file diff --git a/addons/account/test/account_validate_account_move.yml b/addons/account/test/account_validate_account_move.yml index 188df14c234..d47ee564019 100644 --- a/addons/account/test/account_validate_account_move.yml +++ b/addons/account/test/account_validate_account_move.yml @@ -30,10 +30,9 @@ - !python {model: account.move.line}: | import time - date = self._get_date(cr, uid, {'lang': u'en_US', 'normal_view': False, 'active_model': 'ir.ui.menu', - 'search_default_journal_id': 1, 'journal_type': 'sale', 'search_default_period_id': 6, 'journal_id': 1, 'view_mode': False, - 'visible_id': 1, 'period_id': 6, 'tz': False, 'active_ids': [ref('menu_action_account_moves_all')], - 'search_default_posted': 0, 'active_id': ref('menu_action_account_moves_all')}) + date = self._get_date(cr, uid, { + 'journal_id': 1, + 'period_id': 6,}) partner = self.onchange_partner_id(cr, uid, [], False, ref('base.res_partner_12'), ref('account.cash'), debit=0, credit=2000, date=date, journal=False) account = self.onchange_account_id(cr, uid, [], account_id=ref('account.a_recv'), partner_id= ref('base.res_partner_12')) vals = { @@ -62,11 +61,10 @@ !python {model: account.move.line}: | ids = self._balance_search(cr, uid, self, 'balance', [('balance', '=', 2000.0)], None, {'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu', 'search_default_journal_id': 1, 'journal_type': 'sale', 'search_default_period_id': 6, 'view_mode': False, 'visible_id': 1, - 'active_ids': [ref('menu_action_account_moves_all')], 'search_default_posted': 0, 'active_id': ref('menu_action_account_moves_all')}) + 'search_default_posted': 0}) bal = self._balance(cr, uid, ids[0][2], 'balance', None,{'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu', 'search_default_journal_id': 1, 'journal_type': 'sale', 'search_default_period_id': 6, 'view_mode': False, - 'visible_id': 1, 'active_ids': [ref('menu_action_account_moves_all')], 'search_default_posted': 0, - 'active_id': ref('menu_action_account_moves_all')}) + 'visible_id': 1, 'search_default_posted': 0}) assert bal, 'Balance has not been computed correctly' - I check that Initially account move state is "Draft" diff --git a/addons/account/wizard/__init__.py b/addons/account/wizard/__init__.py index 87a053d558c..839e490ca66 100644 --- a/addons/account/wizard/__init__.py +++ b/addons/account/wizard/__init__.py @@ -31,7 +31,6 @@ import account_reconcile_partner_process import account_reconcile import account_unreconcile import account_invoice_refund -import account_move_journal import account_journal_select import account_move_bank_reconcile import account_subscription_generate diff --git a/addons/account/wizard/account_fiscalyear_close.py b/addons/account/wizard/account_fiscalyear_close.py index dbf815d5218..e11b4dcd34b 100644 --- a/addons/account/wizard/account_fiscalyear_close.py +++ b/addons/account/wizard/account_fiscalyear_close.py @@ -60,7 +60,7 @@ class account_fiscalyear_close(osv.osv_memory): cr.execute('select distinct(company_id) from account_move_line where id in %s',(tuple(ids),)) if len(cr.fetchall()) > 1: raise osv.except_osv(_('Warning!'), _('The entries to reconcile should belong to the same company.')) - r_id = self.pool.get('account.move.reconcile').create(cr, uid, {'type': 'auto'}) + r_id = self.pool.get('account.move.reconcile').create(cr, uid, {'type': 'auto', 'opening_reconciliation': True}) cr.execute('update account_move_line set reconcile_id = %s where id in %s',(r_id, tuple(ids),)) return r_id @@ -107,7 +107,7 @@ class account_fiscalyear_close(osv.osv_memory): ('journal_id', '=', new_journal.id), ('period_id', '=', period.id)]) if move_ids: move_line_ids = obj_acc_move_line.search(cr, uid, [('move_id', 'in', move_ids)]) - obj_acc_move_line._remove_move_reconcile(cr, uid, move_line_ids, context=context) + obj_acc_move_line._remove_move_reconcile(cr, uid, move_line_ids, opening_reconciliation=True, context=context) obj_acc_move_line.unlink(cr, uid, move_line_ids, context=context) obj_acc_move.unlink(cr, uid, move_ids, context=context) diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py deleted file mode 100644 index 246532d38d7..00000000000 --- a/addons/account/wizard/account_move_journal.py +++ /dev/null @@ -1,194 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# 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 . -# -############################################################################## - -from lxml import etree - -from osv import osv, fields -from tools.translate import _ -import tools - -class account_move_journal(osv.osv_memory): - _name = "account.move.journal" - _description = "Move journal" - - _columns = { - 'target_move': fields.selection([('posted', 'All Posted Entries'), - ('all', 'All Entries'), - ], 'Target Moves', required=True), - } - - _defaults = { - 'target_move': 'all' - } - def _get_period(self, cr, uid, context=None): - """ - Return default account period value - """ - account_period_obj = self.pool.get('account.period') - ids = account_period_obj.find(cr, uid, context=context) - period_id = False - if ids: - period_id = ids[0] - return period_id - - def _get_journal(self, cr, uid, context=None): - """ - Return journal based on the journal type - """ - - journal_id = False - - journal_pool = self.pool.get('account.journal') - if context.get('journal_type', False): - jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))]) - if not jids: - raise osv.except_osv(_('Configuration Error!'), _('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration/Journals/Journals.') % context.get('journal_type')) - journal_id = jids[0] - - return journal_id - - def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): - """ - Returns views and fields for current model where view will depend on {view_type}. - @param cr: A database cursor - @param user: ID of the user currently logged in - @param view_id: list of fields, which required to read signatures - @param view_type: defines a view type. it can be one of (form, tree, graph, calender, gantt, search, mdx) - @param context: context arguments, like lang, time zone - @param toolbar: contains a list of reports, wizards, and links related to current model - - @return: Returns a dict that contains definition for fields, views, and toolbars - """ - if context is None:context = {} - res = super(account_move_journal, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) - - if context: - if not view_id: - return res - - period_pool = self.pool.get('account.period') - journal_pool = self.pool.get('account.journal') - - journal_id = self._get_journal(cr, uid, context) - period_id = self._get_period(cr, uid, context) - - journal = False - if journal_id: - journal = journal_pool.read(cr, uid, journal_id, ['name'], context=context).get('name',False) - journal_string = _("Journal: %s") % tools.ustr(journal) - else: - journal_string = _("Journal: All") - - period = False - if period_id: - period = period_pool.browse(cr, uid, period_id, context=context).name - period_string = _("Period: %s") % tools.ustr(period) - - open_string = _("Open") - view = """ -
- - - - %s: