diff --git a/addons/account/__init__.py b/addons/account/__init__.py index 36cc1c85b5a..a243b94c2da 100644 --- a/addons/account/__init__.py +++ b/addons/account/__init__.py @@ -35,5 +35,5 @@ import product import ir_sequence import company import res_currency - +import edi # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index 9445688ec6d..81d09b30ae9 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -53,7 +53,7 @@ module named account_voucher. 'website': 'http://www.openerp.com', 'images' : ['images/accounts.jpeg','images/bank_statement.jpeg','images/cash_register.jpeg','images/chart_of_accounts.jpeg','images/customer_invoice.jpeg','images/journal_entries.jpeg'], 'init_xml': [], - "depends" : ["base_setup", "product", "analytic", "process","board"], + "depends" : ["base_setup", "product", "analytic", "process", "board", "edi"], 'update_xml': [ 'security/account_security.xml', 'security/ir.model.access.csv', @@ -123,7 +123,8 @@ module named account_voucher. 'board_account_view.xml', "wizard/account_report_profit_loss_view.xml", "wizard/account_report_balance_sheet_view.xml", - "account_bank_view.xml" + "edi/invoice_action_data.xml", + "account_bank_view.xml", ], 'demo_xml': [ 'demo/account_demo.xml', @@ -145,10 +146,9 @@ module named account_voucher. 'test/account_fiscalyear_close.yml', 'test/account_bank_statement.yml', 'test/account_cash_statement.yml', + 'test/test_edi_invoice.yml', 'test/account_report.yml', - - - ], + ], 'installable': True, 'active': False, 'certificate': '0080331923549', diff --git a/addons/account/account.py b/addons/account/account.py index d4712c656a4..630735c487f 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -404,7 +404,7 @@ class account_account(osv.osv): return True _columns = { - 'name': fields.char('Name', size=128, required=True, select=True), + 'name': fields.char('Name', size=256, required=True, select=True), 'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."), 'code': fields.char('Code', size=64, required=True, select=1), 'type': fields.selection([ @@ -431,9 +431,9 @@ class account_account(osv.osv): 'debit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Debit', multi='balance'), 'foreign_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Foreign Balance', multi='balance', help="Total amount (in Secondary currency) for transactions held in secondary currency for this account."), - 'adjusted_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Adjusted Balance', multi='balance', + 'adjusted_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Adjusted Balance', multi='balance', help="Total amount (in Company currency) for transactions held in secondary currency for this account."), - 'unrealized_gain_loss': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Unrealized Gain or Loss', multi='balance', + 'unrealized_gain_loss': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Unrealized Gain or Loss', multi='balance', help="Value of Loss or Gain due to changes in exchange rate when doing multi-currency transactions."), 'reconcile': fields.boolean('Allow Reconciliation', help="Check this box if this account allows reconciliation of journal items."), 'exchange_rate': fields.related('currency_id', 'rate', type='float', string='Exchange Rate', digits=(12,6)), @@ -2001,8 +2001,11 @@ class account_tax(osv.osv): cur_price_unit+=amount2 return res - def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None): + def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None, force_excluded=False): """ + :param force_excluded: boolean used to say that we don't want to consider the value of field price_include of + tax. It's used in encoding by line where you don't matter if you encoded a tax with that boolean to True or + False RETURN: { 'total': 0.0, # Total without taxes 'total_included: 0.0, # Total with taxes @@ -2014,10 +2017,10 @@ class account_tax(osv.osv): tin = [] tex = [] for tax in taxes: - if tax.price_include: - tin.append(tax) - else: + if not tax.price_include or force_excluded: tex.append(tax) + else: + tin.append(tax) tin = self.compute_inv(cr, uid, tin, price_unit, quantity, address_id=address_id, product=product, partner=partner) for r in tin: totalex -= r.get('amount', 0.0) @@ -2183,6 +2186,7 @@ class account_model(osv.osv): account_move_obj = self.pool.get('account.move') account_move_line_obj = self.pool.get('account.move.line') pt_obj = self.pool.get('account.payment.term') + period_obj = self.pool.get('account.period') if context is None: context = {} @@ -2190,14 +2194,14 @@ class account_model(osv.osv): if datas.get('date', False): context.update({'date': datas['date']}) - period_id = self.pool.get('account.period').find(cr, uid, dt=context.get('date', False)) - if not period_id: - raise osv.except_osv(_('No period found !'), _('Unable to find a valid period !')) - period_id = period_id[0] - move_date = context.get('date', time.strftime('%Y-%m-%d')) move_date = datetime.strptime(move_date,"%Y-%m-%d") for model in self.browse(cr, uid, ids, context=context): + ctx = context.copy() + ctx.update({'company_id': model.company_id.id}) + period_ids = period_obj.find(cr, uid, dt=context.get('date', False), context=ctx) + period_id = period_ids and period_ids[0] or False + ctx.update({'journal_id': model.journal_id.id,'period_id': period_id}) try: entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')} except: @@ -2246,9 +2250,7 @@ class account_model(osv.osv): 'date': context.get('date',time.strftime('%Y-%m-%d')), 'date_maturity': date_maturity }) - c = context.copy() - c.update({'journal_id': model.journal_id.id,'period_id': period_id}) - account_move_line_obj.create(cr, uid, val, context=c) + account_move_line_obj.create(cr, uid, val, context=ctx) return move_ids @@ -2395,7 +2397,7 @@ class account_account_template(osv.osv): _description ='Templates for Accounts' _columns = { - 'name': fields.char('Name', size=128, required=True, select=True), + 'name': fields.char('Name', size=256, required=True, select=True), 'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."), 'code': fields.char('Code', size=64, select=1), 'type': fields.selection([ diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py index 2a9e432894f..acf070a3ad7 100644 --- a/addons/account/account_bank.py +++ b/addons/account/account_bank.py @@ -42,8 +42,12 @@ class bank(osv.osv): return (bank.bank_name or '') + ' ' + bank.acc_number def post_write(self, cr, uid, ids, context={}): + if isinstance(ids, (int, long)): + ids = [ids] + obj_acc = self.pool.get('account.account') obj_data = self.pool.get('ir.model.data') + for bank in self.browse(cr, uid, ids, context): if bank.company_id and not bank.journal_id: # Find the code and parent of the bank account to create diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index e445e3f7bc8..522e9d97251 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -251,7 +251,7 @@ class account_invoice(osv.osv): 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}), - 'check_total': fields.float('Total', digits_compute=dp.get_precision('Account'), states={'open':[('readonly',True)],'close':[('readonly',True)]}), + 'check_total': fields.float('Verification Total', digits_compute=dp.get_precision('Account'), states={'open':[('readonly',True)],'close':[('readonly',True)]}), 'reconciled': fields.function(_reconciled, string='Paid/Reconciled', type='boolean', store={ 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, None, 50), # Check if we can remove ? @@ -795,6 +795,7 @@ class account_invoice(osv.osv): """Creates invoice related analytics and financial move lines""" ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') + period_obj = self.pool.get('account.period') context = {} for inv in self.browse(cr, uid, ids): if not inv.journal_id.sequence_id: @@ -923,10 +924,10 @@ class account_invoice(osv.osv): 'narration':inv.comment } period_id = inv.period_id and inv.period_id.id or False + ctx.update({'company_id': inv.company_id.id}) if not period_id: - period_ids = self.pool.get('account.period').search(cr, uid, [('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d')), ('company_id', '=', inv.company_id.id)]) - if period_ids: - period_id = period_ids[0] + period_ids = period_obj.find(cr, uid, inv.date_invoice, context=ctx) + period_id = period_ids and period_ids[0] or False if period_id: move['period_id'] = period_id for i in line: @@ -1323,9 +1324,9 @@ class account_invoice_line(osv.osv): raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") ) if not product: if type in ('in_invoice', 'in_refund'): - return {'value': {'categ_id': False}, 'domain':{'product_uom':[]}} + return {'value': {}, 'domain':{'product_uom':[]}} else: - return {'value': {'price_unit': 0.0, 'categ_id': False}, 'domain':{'product_uom':[]}} + return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}} part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context) fpos_obj = self.pool.get('account.fiscal.position') fpos = fposition_id and fpos_obj.browse(cr, uid, fposition_id, context=context) or False @@ -1378,7 +1379,6 @@ class account_invoice_line(osv.osv): if res2: domain = {'uos_id':[('category_id','=',res2 )]} - result['categ_id'] = res.categ_id.id res_final = {'value':result, 'domain':domain} if not company_id or not currency_id: diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index dd749ba9820..55e154eed6d 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -1084,8 +1084,6 @@ class account_move_line(osv.osv): f.set("invisible", "context.get('journal_id', False)") elif field in ('period_id',): f.set("invisible", "context.get('period_id', False)") - else: - f.set('invisible', "context.get('visible_id') not in %s" % (fields.get(field))) orm.setup_modifiers(f, fields_get[field], context=context, in_tree_view=True) @@ -1245,6 +1243,12 @@ class account_move_line(osv.osv): m = move_obj.browse(cr, uid, vals['move_id']) context['journal_id'] = m.journal_id.id context['period_id'] = m.period_id.id + #we need to treat the case where a value is given in the context for period_id as a string + if 'period_id' not in context or not isinstance(context.get('period_id', ''), (int, long)): + period_candidate_ids = self.pool.get('account.period').name_search(cr, uid, name=context.get('period_id','')) + if len(period_candidate_ids) != 1: + raise osv.except_osv(_('Encoding error'), _('No period found or period given is ambigous.')) + context['period_id'] = period_candidate_ids[0][0] self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context) move_id = vals.get('move_id', False) journal = journal_obj.browse(cr, uid, context['journal_id'], context=context) @@ -1326,7 +1330,7 @@ class account_move_line(osv.osv): base_sign = 'base_sign' tax_sign = 'tax_sign' tmp_cnt = 0 - for tax in tax_obj.compute_all(cr, uid, [tax_id], total, 1.00).get('taxes'): + for tax in tax_obj.compute_all(cr, uid, [tax_id], total, 1.00, force_excluded=True).get('taxes'): #create the base movement if tmp_cnt == 0: if tax[base_code]: @@ -1338,8 +1342,6 @@ class account_move_line(osv.osv): else: data = { 'move_id': vals['move_id'], - 'journal_id': vals['journal_id'], - 'period_id': vals['period_id'], 'name': tools.ustr(vals['name'] or '') + ' ' + tools.ustr(tax['name'] or ''), 'date': vals['date'], 'partner_id': vals.get('partner_id',False), @@ -1356,8 +1358,6 @@ class account_move_line(osv.osv): #create the VAT movement data = { 'move_id': vals['move_id'], - 'journal_id': vals['journal_id'], - 'period_id': vals['period_id'], 'name': tools.ustr(vals['name'] or '') + ' ' + tools.ustr(tax['name'] or ''), 'date': vals['date'], 'partner_id': vals.get('partner_id',False), diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index 32d10ba0153..9bb40a7a503 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -19,6 +19,7 @@ rml="account/report/account_print_invoice.rml" string="Invoices" attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/',''))" + usage="default" multi="True"/> diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 5dd8406b126..1d336dda460 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1235,8 +1235,8 @@ - - + + @@ -1306,7 +1306,6 @@ account.account Open Journal Items - - - + + + + + + + + + + diff --git a/addons/account/company.py b/addons/account/company.py index c903b6d4a71..4ad4d1226d7 100644 --- a/addons/account/company.py +++ b/addons/account/company.py @@ -24,6 +24,7 @@ from osv import fields, osv class res_company(osv.osv): _inherit = "res.company" _columns = { + 'paypal_account': fields.char("Paypal Account", size=128, help="Paypal username (usually email) for receiving online payments."), 'overdue_msg': fields.text('Overdue Payments Message', translate=True), 'property_reserve_and_surplus_account': fields.property( 'account.account', diff --git a/addons/account/company_view.xml b/addons/account/company_view.xml index 0664fadd761..0cc67f23cfe 100644 --- a/addons/account/company_view.xml +++ b/addons/account/company_view.xml @@ -24,6 +24,7 @@ + diff --git a/addons/account/edi/__init__.py b/addons/account/edi/__init__.py new file mode 100644 index 00000000000..d86e8a91bf3 --- /dev/null +++ b/addons/account/edi/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2011 OpenERP S.A. +# +# 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 . +# +############################################################################## + +import invoice diff --git a/addons/account/edi/invoice.py b/addons/account/edi/invoice.py new file mode 100644 index 00000000000..061bf8ee97d --- /dev/null +++ b/addons/account/edi/invoice.py @@ -0,0 +1,273 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2011 OpenERP S.A. +# +# 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 osv import fields, osv, orm +from edi import EDIMixin + +INVOICE_LINE_EDI_STRUCT = { + 'name': True, + 'origin': True, + 'uos_id': True, + 'product_id': True, + 'price_unit': True, + 'quantity': True, + 'discount': True, + 'note': True, + + # fields used for web preview only - discarded on import + 'price_subtotal': True, +} + +INVOICE_TAX_LINE_EDI_STRUCT = { + 'name': True, + 'base': True, + 'amount': True, + 'manual': True, + 'sequence': True, + 'base_amount': True, + 'tax_amount': True, +} + +INVOICE_EDI_STRUCT = { + 'name': True, + 'origin': True, + 'company_id': True, # -> to be changed into partner + 'type': True, # -> reversed at import + 'internal_number': True, # -> reference at import + 'comment': True, + 'date_invoice': True, + 'date_due': True, + 'partner_id': True, + 'payment_term': True, + #custom: currency_id + 'invoice_line': INVOICE_LINE_EDI_STRUCT, + 'tax_line': INVOICE_TAX_LINE_EDI_STRUCT, + + # fields used for web preview only - discarded on import + #custom: 'partner_ref' + 'amount_total': True, + 'amount_untaxed': True, + 'amount_tax': True, +} + +class account_invoice(osv.osv, EDIMixin): + _inherit = 'account.invoice' + + def edi_export(self, cr, uid, records, edi_struct=None, context=None): + """Exports a supplier or customer invoice""" + edi_struct = dict(edi_struct or INVOICE_EDI_STRUCT) + res_company = self.pool.get('res.company') + res_partner_address = self.pool.get('res.partner.address') + edi_doc_list = [] + for invoice in records: + # generate the main report + self._edi_generate_report_attachment(cr, uid, invoice, context=context) + edi_doc = super(account_invoice,self).edi_export(cr, uid, [invoice], edi_struct, context)[0] + edi_doc.update({ + 'company_address': res_company.edi_export_address(cr, uid, invoice.company_id, context=context), + 'company_paypal_account': invoice.company_id.paypal_account, + 'partner_address': res_partner_address.edi_export(cr, uid, [invoice.address_invoice_id], context=context)[0], + + 'currency': self.pool.get('res.currency').edi_export(cr, uid, [invoice.currency_id], context=context)[0], + 'partner_ref': invoice.reference or False, + }) + edi_doc_list.append(edi_doc) + return edi_doc_list + + def _edi_tax_account(self, cr, uid, invoice_type='out_invoice', context=None): + #TODO/FIXME: should select proper Tax Account + account_pool = self.pool.get('account.account') + account_ids = account_pool.search(cr, uid, [('type','<>','view'),('type','<>','income'), ('type', '<>', 'closed')]) + tax_account = False + if account_ids: + tax_account = account_pool.browse(cr, uid, account_ids[0]) + return tax_account + + def _edi_invoice_account(self, cr, uid, partner_id, invoice_type, context=None): + partner_pool = self.pool.get('res.partner') + partner = partner_pool.browse(cr, uid, partner_id, context=context) + if invoice_type in ('out_invoice', 'out_refund'): + invoice_account = partner.property_account_receivable + else: + invoice_account = partner.property_account_payable + return invoice_account + + def _edi_product_account(self, cr, uid, product_id, invoice_type, context=None): + product_pool = self.pool.get('product.product') + product = product_pool.browse(cr, uid, product_id, context=context) + if invoice_type in ('out_invoice','out_refund'): + account = product.property_account_income or product.categ_id.property_account_income_categ + else: + account = product.property_account_expense or product.categ_id.property_account_expense_categ + return account + + def _edi_import_company(self, cr, uid, edi_document, context=None): + # TODO: for multi-company setups, we currently import the document in the + # user's current company, but we should perhaps foresee a way to select + # the desired company among the user's allowed companies + + self._edi_requires_attributes(('company_id','company_address','type'), edi_document) + res_partner_address = self.pool.get('res.partner.address') + res_partner = self.pool.get('res.partner') + + # imported company = new partner + src_company_id, src_company_name = edi_document.pop('company_id') + partner_id = self.edi_import_relation(cr, uid, 'res.partner', src_company_name, + src_company_id, context=context) + invoice_type = edi_document['type'] + partner_value = {} + if invoice_type in ('out_invoice', 'out_refund'): + partner_value.update({'customer': True}) + if invoice_type in ('in_invoice', 'in_refund'): + partner_value.update({'supplier': True}) + res_partner.write(cr, uid, [partner_id], partner_value, context=context) + + # imported company_address = new partner address + address_info = edi_document.pop('company_address') + address_info['partner_id'] = (src_company_id, src_company_name) + address_info['type'] = 'invoice' + address_id = res_partner_address.edi_import(cr, uid, address_info, context=context) + + # modify edi_document to refer to new partner + partner_address = res_partner_address.browse(cr, uid, address_id, context=context) + edi_document['partner_id'] = (src_company_id, src_company_name) + edi_document.pop('partner_address', False) # ignored + edi_document['address_invoice_id'] = self.edi_m2o(cr, uid, partner_address, context=context) + + return partner_id + + + def edi_import(self, cr, uid, edi_document, context=None): + """ During import, invoices will import the company that is provided in the invoice as + a new partner (e.g. supplier company for a customer invoice will be come a supplier + record for the new invoice. + Summary of tasks that need to be done: + - import company as a new partner, if type==in then supplier=1, else customer=1 + - partner_id field is modified to point to the new partner + - company_address data used to add address to new partner + - change type: out_invoice'<->'in_invoice','out_refund'<->'in_refund' + - reference: should contain the value of the 'internal_number' + - reference_type: 'none' + - internal number: reset to False, auto-generated + - journal_id: should be selected based on type: simply put the 'type' + in the context when calling create(), will be selected correctly + - payment_term: if set, create a default one based on name... + - for invoice lines, the account_id value should be taken from the + product's default, i.e. from the default category, as it will not + be provided. + - for tax lines, we disconnect from the invoice.line, so all tax lines + will be of type 'manual', and default accounts should be picked based + on the tax config of the DB where it is imported. + """ + if context is None: + context = {} + self._edi_requires_attributes(('company_id','company_address','type','invoice_line','currency'), edi_document) + + # extract currency info + res_currency = self.pool.get('res.currency') + currency_info = edi_document.pop('currency') + currency_id = res_currency.edi_import(cr, uid, currency_info, context=context) + currency = res_currency.browse(cr, uid, currency_id) + edi_document['currency_id'] = self.edi_m2o(cr, uid, currency, context=context) + + # change type: out_invoice'<->'in_invoice','out_refund'<->'in_refund' + invoice_type = edi_document['type'] + invoice_type = invoice_type.startswith('in_') and invoice_type.replace('in_','out_') or invoice_type.replace('out_','in_') + edi_document['type'] = invoice_type + + #import company as a new partner + partner_id = self._edi_import_company(cr, uid, edi_document, context=context) + + # Set Account + invoice_account = self._edi_invoice_account(cr, uid, partner_id, invoice_type, context=context) + edi_document['account_id'] = invoice_account and self.edi_m2o(cr, uid, invoice_account, context=context) or False + + # reference: should contain the value of the 'internal_number' + edi_document['reference'] = edi_document.get('internal_number', False) + # reference_type: 'none' + edi_document['reference_type'] = 'none' + + # internal number: reset to False, auto-generated + edi_document['internal_number'] = False + + # discard web preview fields, if present + edi_document.pop('partner_ref', None) + + # journal_id: should be selected based on type: simply put the 'type' in the context when calling create(), will be selected correctly + context.update(type=invoice_type) + + # for invoice lines, the account_id value should be taken from the product's default, i.e. from the default category, as it will not be provided. + for edi_invoice_line in edi_document['invoice_line']: + product_info = edi_invoice_line['product_id'] + product_id = self.edi_import_relation(cr, uid, 'product.product', product_info[1], + product_info[0], context=context) + account = self._edi_product_account(cr, uid, product_id, invoice_type, context=context) + # TODO: could be improved with fiscal positions perhaps + # account = fpos_obj.map_account(cr, uid, fiscal_position_id, account.id) + edi_invoice_line['account_id'] = self.edi_m2o(cr, uid, account, context=context) if account else False + + # discard web preview fields, if present + edi_invoice_line.pop('price_subtotal', None) + + # for tax lines, we disconnect from the invoice.line, so all tax lines will be of type 'manual', and default accounts should be picked based + # on the tax config of the DB where it is imported. + tax_account = self._edi_tax_account(cr, uid, context=context) + tax_account_info = self.edi_m2o(cr, uid, tax_account, context=context) + for edi_tax_line in edi_document.get('tax_line', []): + edi_tax_line['account_id'] = tax_account_info + edi_tax_line['manual'] = True + + return super(account_invoice,self).edi_import(cr, uid, edi_document, context=context) + + + def _edi_record_display_action(self, cr, uid, id, context=None): + """Returns an appropriate action definition dict for displaying + the record with ID ``rec_id``. + + :param int id: database ID of record to display + :return: action definition dict + """ + action = super(account_invoice,self)._edi_record_display_action(cr, uid, id, context=context) + try: + invoice = self.browse(cr, uid, id, context=context) + if 'out_' in invoice.type: + view_ext_id = 'invoice_form' + journal_type = 'sale' + else: + view_ext_id = 'invoice_supplier_form' + journal_type = 'purchase' + ctx = "{'type': '%s', 'journal_type': '%s'}" % (invoice.type, journal_type) + action.update(context=ctx) + view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', view_ext_id)[1] + action.update(views=[(view_id,'form'), (False, 'tree')]) + except ValueError: + # ignore if views are missing + pass + return action + + +class account_invoice_line(osv.osv, EDIMixin): + _inherit='account.invoice.line' + +class account_invoice_tax(osv.osv, EDIMixin): + _inherit = "account.invoice.tax" + + diff --git a/addons/account/edi/invoice_action_data.xml b/addons/account/edi/invoice_action_data.xml new file mode 100644 index 00000000000..0904ec6fd54 --- /dev/null +++ b/addons/account/edi/invoice_action_data.xml @@ -0,0 +1,186 @@ + + + + + + if (object.type in ('out_invoice', 'out_refund')) and not object.partner_id.opt_out: object.edi_export_and_email(template_ext_id='account.email_template_edi_invoice', context=context) + + code + ir.actions.server + + True + Auto-email confirmed invoices + + + + + Email Templates + email.template + form + form,tree + + + {'search_default_model_id':'account.invoice'} + + + + + + + + + + + + + + + + Automated Invoice Notification Mail + ${object.user_id.user_email or object.company_id.email or 'noreply@localhost'} + ${object.company_id.name} Invoice (Ref ${object.number or 'n/a' }) + ${object.address_invoice_id.email or ''} + + + + +

Hello${object.address_invoice_id.name and ' ' or ''}${object.address_invoice_id.name or ''},

+ +

A new invoice is available for ${object.partner_id.name}:

+ +

+   REFERENCES
+   Invoice number: ${object.number}
+   Invoice total: ${object.amount_total} ${object.currency_id.name}
+   Invoice date: ${object.date_invoice}
+ % if object.origin: +   Order reference: ${object.origin}
+ % endif +   Your contact: ${object.user_id.name} +

+ +

+ You can view the invoice document, download it and pay online using the following link: +

+ View Invoice + + % if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'): + <% + comp_name = quote(object.company_id.name) + inv_number = quote(object.number) + paypal_account = quote(object.company_id.paypal_account) + inv_amount = quote(str(object.amount_total)) + cur_name = quote(object.currency_id.name) + paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Invoice%%20%s&" \ + "invoice=%s&amount=%s&currency_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Invoice_PayNow_%s" % \ + (paypal_account,comp_name,inv_number,inv_number,inv_amount,cur_name,cur_name) + %> +
+

It is also possible to directly pay with Paypal:

+ + + + % endif + +
+

If you have any question, do not hesitate to contact us.

+

Thank you for choosing ${object.company_id.name or 'us'}!

+
+
+
+

+ ${object.company_id.name}

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

+
+ + ]]>
+ '%(object.user_id.user_email) or ''} + +You can view the invoice document, download it and pay online using the following link: + ${ctx.get('edi_web_url_view') or 'n/a'} + +% if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'): +<% +comp_name = quote(object.company_id.name) +inv_number = quote(object.number) +paypal_account = quote(object.company_id.paypal_account) +inv_amount = quote(str(object.amount_total)) +cur_name = quote(object.currency_id.name) +paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Invoice%%20%s"\ + "&invoice=%s&amount=%s¤cy_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Invoice_PayNow_%s" % \ + (paypal_account,comp_name,inv_number,inv_number,inv_amount,cur_name,cur_name) +%> +It is also possible to directly pay with Paypal: + ${paypal_url} +% endif + +If you have any question, do not hesitate to contact us. + + +Thank you for choosing ${object.company_id.name}! + + +-- +${object.user_id.name} ${object.user_id.user_email and '<%s>'%(object.user_id.user_email) or ''} +${object.company_id.name} +% if object.company_id.street: +${object.company_id.street or ''} +% endif +% if object.company_id.street2: +${object.company_id.street2} +% endif +% if object.company_id.city or object.company_id.zip: +${object.company_id.zip or ''} ${object.company_id.city or ''} +% endif +% if object.company_id.country_id: +${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''} +% endif +% if object.company_id.phone: +Phone: ${object.company_id.phone} +% endif +% if object.company_id.website: +${object.company_id.website or ''} +% endif + ]]> +
+
+
diff --git a/addons/account/i18n/ar.po b/addons/account/i18n/ar.po index 005e53d9fb0..3b5edf1e87d 100644 --- a/addons/account/i18n/ar.po +++ b/addons/account/i18n/ar.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: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2011-11-04 03:25+0000\n" -"Last-Translator: bamuhrez \n" +"PO-Revision-Date: 2011-11-15 03:49+0000\n" +"Last-Translator: kifcaliph \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: 2011-11-08 05:41+0000\n" -"X-Generator: Launchpad (build 14231)\n" +"X-Launchpad-Export-Date: 2011-11-16 05:21+0000\n" +"X-Generator: Launchpad (build 14291)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -1099,7 +1099,7 @@ msgstr "الغاء الفواتير" #. module: account #: view:account.unreconcile.reconcile:0 msgid "Unreconciliation transactions" -msgstr "" +msgstr "إلغاء تسوية المعاملات" #. module: account #: field:account.invoice.tax,tax_code_id:0 @@ -1434,7 +1434,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_finance_recurrent_entries msgid "Recurring Entries" -msgstr "" +msgstr "القيود التكرارية" #. module: account #: model:ir.model,name:account.model_account_fiscal_position_template @@ -1449,7 +1449,7 @@ msgstr "" #. module: account #: field:account.automatic.reconcile,reconciled:0 msgid "Reconciled transactions" -msgstr "" +msgstr "معاملات تمت تسويتها" #. module: account #: field:account.journal.view,columns_id:0 @@ -1480,24 +1480,25 @@ msgstr "معفي من الضريبة" #. module: account #: view:account.partner.reconcile.process:0 msgid "Go to next partner" -msgstr "" +msgstr "ذهاب للشريك التالي" #. module: account #: view:account.bank.statement:0 msgid "Search Bank Statements" -msgstr "" +msgstr "بحث كشوف حسابات المصرف" #. module: account #: sql_constraint:account.model.line:0 msgid "" "Wrong credit or debit value in model (Credit + Debit Must Be greater \"0\")!" msgstr "" +"قيمة دائنة أو مدينة خاطئة في النموذج (دائن + مدين يجب أن يكون أكبر من صفر)!" #. module: account #: view:account.chart.template:0 #: field:account.chart.template,property_account_payable:0 msgid "Payable Account" -msgstr "" +msgstr "حساب الدائن" #. module: account #: field:account.tax,account_paid_id:0 @@ -1553,12 +1554,12 @@ msgstr "فاتورة" #: model:process.node,note:account.process_node_analytic0 #: model:process.node,note:account.process_node_analyticcost0 msgid "Analytic costs to invoice" -msgstr "" +msgstr "تحليل التكاليف للفاتورة" #. module: account #: view:ir.sequence:0 msgid "Fiscal Year Sequence" -msgstr "" +msgstr "مسلسل السنة المالية" #. module: account #: field:wizard.multi.charts.accounts,seq_journal:0 @@ -1569,17 +1570,17 @@ msgstr "" #: field:account.bank.statement,user_id:0 #: view:account.invoice:0 msgid "Responsible" -msgstr "" +msgstr "مسئول" #. module: account #: report:account.overdue:0 msgid "Sub-Total :" -msgstr "" +msgstr "جزئي:" #. module: account #: model:ir.actions.act_window,name:account.action_report_account_type_sales_tree_all msgid "Sales by Account Type" -msgstr "" +msgstr "المبيعات حسب نوع الحساب" #. module: account #: view:account.invoice.refund:0 @@ -1669,7 +1670,7 @@ msgstr "المدينون و الدائنون" #: code:addons/account/account_move_line.py:815 #, python-format msgid "You have to provide an account for the write off entry !" -msgstr "" +msgstr "يجب إعطاء حساب لقيود الإعدام !" #. module: account #: model:ir.model,name:account.model_account_common_journal_report @@ -1694,7 +1695,7 @@ msgstr "خرائط حساب تحليلي" #. module: account #: view:account.analytic.line:0 msgid "My Entries" -msgstr "" +msgstr "قيود خاصة بي" #. module: account #: report:account.overdue:0 @@ -1710,7 +1711,7 @@ msgstr "" #. module: account #: help:account.period,special:0 msgid "These periods can overlap." -msgstr "" +msgstr "هذه الفترات يمكن أن تتداخل." #. module: account #: model:process.node,name:account.process_node_draftstatement0 @@ -1731,7 +1732,7 @@ msgstr "" #. module: account #: field:account.move.line.reconcile,credit:0 msgid "Credit amount" -msgstr "" +msgstr "مبلغ الدائنون" #. module: account #: constraint:account.move.line:0 @@ -1745,11 +1746,12 @@ msgid "" "You cannot change the type of account from 'Closed' to any other type which " "contains account entries!" msgstr "" +"لا يمكنك تغيير نوع الحساب من \"مغلق\" إلي أي نوع آخر يحتوي علي قيود يومية!" #. module: account #: view:res.company:0 msgid "Reserve And Profit/Loss Account" -msgstr "" +msgstr "حساب الإحتياطي و الأرباح و الخسائر" #. module: account #: sql_constraint:account.move.line:0 @@ -1766,12 +1768,12 @@ msgstr "تحليل الفواتير" #. module: account #: model:ir.model,name:account.model_account_period_close msgid "period close" -msgstr "" +msgstr "غلق الفترة" #. module: account #: view:account.installer:0 msgid "Configure Fiscal Year" -msgstr "" +msgstr "ضبط السنة المالية" #. module: account #: model:ir.actions.act_window,name:account.action_project_account_analytic_line_form @@ -1797,7 +1799,7 @@ msgstr "" #. module: account #: field:account.cashbox.line,subtotal:0 msgid "Sub Total" -msgstr "إجمالي الفرعي" +msgstr "الجزئي" #. module: account #: view:account.account:0 @@ -1807,7 +1809,7 @@ msgstr "تحليل الخزانة" #. module: account #: constraint:res.company:0 msgid "Error! You can not create recursive companies." -msgstr "" +msgstr "خطأ! لا يمكنك إنشاء شركات متداخلة (شركات تستخدم نفسها)." #. module: account #: view:account.analytic.account:0 @@ -1818,7 +1820,7 @@ msgstr "حساب تحليلي" #: code:addons/account/account_bank_statement.py:332 #, python-format msgid "Please verify that an account is defined in the journal." -msgstr "" +msgstr "تحقق من أن الحساب معرف في اليومية." #. module: account #: selection:account.entries.report,move_line_state:0 @@ -1835,7 +1837,7 @@ msgstr "" #. module: account #: model:ir.model,name:account.model_product_category msgid "Product Category" -msgstr "" +msgstr "فئة المنتج" #. module: account #: selection:account.account.type,report_type:0 @@ -1845,7 +1847,7 @@ msgstr "/" #. module: account #: field:account.bs.report,reserve_account_id:0 msgid "Reserve & Profit/Loss Account" -msgstr "" +msgstr "حساب الإحتياطي و الأرباح و الخسائر" #. module: account #: help:account.bank.statement,balance_end:0 @@ -1889,7 +1891,7 @@ msgstr "" #. module: account #: model:ir.actions.act_window,name:account.action_account_pl_report msgid "Account Profit And Loss" -msgstr "" +msgstr "حساب الإربح و الخسائر" #. module: account #: field:account.installer,config_logo:0 @@ -1907,7 +1909,7 @@ msgstr "" #: view:account.invoice:0 #: view:report.invoice.created:0 msgid "Untaxed Amount" -msgstr "" +msgstr "المبلغ دون ضرائب" #. module: account #: help:account.tax,active:0 @@ -1915,6 +1917,7 @@ msgid "" "If the active field is set to False, it will allow you to hide the tax " "without removing it." msgstr "" +"إذا كان الحقل النشط به لا أو (False) سيسمح لك بإخفاء الضريبة دون إزالتها" #. module: account #: help:account.bank.statement,name:0 @@ -1929,7 +1932,7 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_account_unreconcile_reconcile #: model:ir.actions.act_window,name:account.action_account_unreconcile_select msgid "Unreconcile Entries" -msgstr "" +msgstr "إلغاء تسوية القيود" #. module: account #: field:account.move.reconcile,line_partial_ids:0 @@ -1939,18 +1942,18 @@ msgstr "" #. module: account #: view:account.fiscalyear:0 msgid "Fiscalyear" -msgstr "" +msgstr "سنة مالية" #. module: account #: view:account.journal.select:0 #: view:project.account.analytic.line:0 msgid "Open Entries" -msgstr "" +msgstr "فتح القيود" #. module: account #: field:account.automatic.reconcile,account_ids:0 msgid "Accounts to Reconcile" -msgstr "" +msgstr "الحسابات للتسوية" #. module: account #: model:process.transition,note:account.process_transition_filestatement0 @@ -1960,7 +1963,7 @@ msgstr "" #. module: account #: model:process.node,name:account.process_node_importinvoice0 msgid "Import from invoice" -msgstr "" +msgstr "إستيراد من فاتورة" #. module: account #: selection:account.entries.report,month:0 @@ -1979,12 +1982,12 @@ msgstr "عمليات التحقق من الصحة" #. module: account #: view:account.entries.report:0 msgid "This F.Year" -msgstr "" +msgstr "هذه السنة المالية" #. module: account #: view:account.tax.chart:0 msgid "Account tax charts" -msgstr "" +msgstr "خريطة حساب الضرائب" #. module: account #: constraint:account.period:0 @@ -1999,7 +2002,7 @@ msgstr "" #: selection:account.invoice.report,state:0 #: selection:report.invoice.created,state:0 msgid "Pro-forma" -msgstr "" +msgstr "كمسألة شكلية" #. module: account #: code:addons/account/installer.py:348 @@ -2014,6 +2017,8 @@ msgid "" "There is no default default debit account defined \n" "on journal \"%s\"" msgstr "" +"لا يوجد حساب إفتراضي معرف \n" +"في دفتر يومية الـ \"%s\"" #. module: account #: help:account.account,type:0 @@ -2029,8 +2034,8 @@ msgstr "" #. module: account #: view:account.chart.template:0 -msgid "Search Chart of Accounts Templates" -msgstr "" +msgid "Search Chart of Account Templates" +msgstr "بحث قوالب دليل الحسابات" #. module: account #: view:account.installer:0 @@ -2083,12 +2088,12 @@ msgstr "حساب الدخل" #: code:addons/account/invoice.py:352 #, python-format msgid "There is no Accounting Journal of type Sale/Purchase defined!" -msgstr "" +msgstr "لا يوجد دفتر يومية للمبيعات أو المشتريات معرف!" #. module: account #: view:product.category:0 msgid "Accounting Properties" -msgstr "" +msgstr "خصائص محاسبية" #. module: account #: report:account.journal.period.print:0 @@ -2096,7 +2101,7 @@ msgstr "" #: report:account.general.ledger:0 #: report:account.general.ledger_landscape:0 msgid "Entries Sorted By" -msgstr "" +msgstr "ترتيب القيود حسب" #. module: account #: field:account.change.currency,currency_id:0 @@ -2111,7 +2116,7 @@ msgstr "عدد كمية المنتجات " #. module: account #: model:ir.model,name:account.model_product_template msgid "Product Template" -msgstr "" +msgstr "قالب المنتج" #. module: account #: report:account.account.balance:0 @@ -2155,7 +2160,7 @@ msgstr "سنة مالية" #: help:account.report.general.ledger,fiscalyear_id:0 #: help:account.vat.declaration,fiscalyear_id:0 msgid "Keep empty for all open fiscal year" -msgstr "" +msgstr "اتركه فارغ لجميع السنوات المالية المفتوحة" #. module: account #: model:ir.model,name:account.model_account_move @@ -2165,7 +2170,7 @@ msgstr "قيد الحساب" #. module: account #: field:account.sequence.fiscalyear,sequence_main_id:0 msgid "Main Sequence" -msgstr "" +msgstr "المسلسل الرئيسي" #. module: account #: field:account.invoice,payment_term:0 @@ -2214,7 +2219,7 @@ msgstr "فتح" #: model:process.node,note:account.process_node_draftinvoices0 #: model:process.node,note:account.process_node_supplierdraftinvoices0 msgid "Draft state of an invoice" -msgstr "" +msgstr "حالة مسودة من الفاتورة" #. module: account #: help:account.account,reconcile:0 @@ -2252,7 +2257,7 @@ msgstr "رمز الأساس" #. module: account #: help:account.invoice.tax,sequence:0 msgid "Gives the sequence order when displaying a list of invoice tax." -msgstr "" +msgstr "تعطيك ترتيب المسلسل حين عرض القائمة للفاتورة الضريبية." #. module: account #: field:account.tax,base_sign:0 @@ -2338,14 +2343,14 @@ msgstr "كشوف حسابات" #. module: account #: report:account.analytic.account.journal:0 msgid "Move Name" -msgstr "" +msgstr "اسم الحركة" #. module: account #: help:res.partner,property_account_position:0 msgid "" "The fiscal position will determine taxes and the accounts used for the " "partner." -msgstr "" +msgstr "المركز المالي لتحديد الضرائب و حسابات التي تستخدم للشريك." #. module: account #: view:account.print.journal:0 @@ -2356,7 +2361,7 @@ msgstr "" #. module: account #: constraint:product.category:0 msgid "Error ! You can not create recursive categories." -msgstr "" +msgstr "خطأ! لا يمكنك إنشاء فئات متداخلة." #. module: account #: report:account.invoice:0 @@ -2391,7 +2396,7 @@ msgstr "حسابات" #: code:addons/account/invoice.py:351 #, python-format msgid "Configuration Error!" -msgstr "" +msgstr "خطأ في الإعدادات!" #. module: account #: view:account.invoice.report:0 @@ -2421,13 +2426,13 @@ msgstr "تسمية" #. module: account #: view:account.tax:0 msgid "Accounting Information" -msgstr "" +msgstr "معلومات محاسبية" #. module: account #: view:account.tax:0 #: view:account.tax.template:0 msgid "Special Computation" -msgstr "" +msgstr "حسابات رياضية خاصة" #. module: account #: view:account.move.bank.reconcile:0 @@ -2503,19 +2508,21 @@ msgid "" "Automatically generate entries based on what has been entered in the system " "before a specific date." msgstr "" +"إنشاء قيود اليومية تلقائياً علي أساس ما تم إدخاله في النظام قبل التاريخ " +"المحدد." #. module: account #: view:account.aged.trial.balance:0 #: model:ir.actions.act_window,name:account.action_account_aged_balance_view #: model:ir.ui.menu,name:account.menu_aged_trial_balance msgid "Aged Partner Balance" -msgstr "" +msgstr "رصيد الشريك العمري" #. module: account #: model:process.transition,name:account.process_transition_entriesreconcile0 #: model:process.transition,name:account.process_transition_supplierentriesreconcile0 msgid "Accounting entries" -msgstr "" +msgstr "قيود المحاسبة" #. module: account #: field:account.invoice.line,discount:0 @@ -2536,7 +2543,7 @@ msgstr "" #: model:ir.actions.server,name:account.ir_actions_server_action_wizard_multi_chart #: model:ir.ui.menu,name:account.menu_act_ir_actions_bleble msgid "New Company Financial Setting" -msgstr "" +msgstr "الإعدادات المالية للشركة الجديدة" #. module: account #: model:ir.actions.act_window,name:account.action_report_account_sales_tree_all @@ -2649,7 +2656,7 @@ msgstr "مطلوب" #: field:product.category,property_account_expense_categ:0 #: field:product.template,property_account_expense:0 msgid "Expense Account" -msgstr "" +msgstr "حساب المصروف" #. module: account #: help:account.invoice,period_id:0 @@ -2670,7 +2677,7 @@ msgstr "" #. module: account #: field:wizard.multi.charts.accounts,sale_tax:0 msgid "Default Sale Tax" -msgstr "" +msgstr "ضريبة البيع الإفتراضية" #. module: account #: help:account.model.line,date_maturity:0 @@ -2683,7 +2690,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_finance_accounting msgid "Financial Accounting" -msgstr "" +msgstr "محاسبة مالية" #. module: account #: view:account.pl.report:0 @@ -2691,7 +2698,7 @@ msgstr "" #: report:pl.account:0 #: report:pl.account.horizontal:0 msgid "Profit And Loss" -msgstr "" +msgstr "الربح و الخسارة" #. module: account #: view:account.fiscal.position:0 @@ -2728,6 +2735,8 @@ msgid "" "No fiscal year defined for this date !\n" "Please create one." msgstr "" +"لا يوجد سنة مالية معرفة لهذا التاريخ !\n" +"قم بإنشائها." #. module: account #: selection:account.invoice,type:0 @@ -2777,7 +2786,7 @@ msgstr "حساب المصرفي" #. module: account #: field:account.chart.template,tax_template_ids:0 msgid "Tax Template List" -msgstr "" +msgstr "قائمة قالب الضريبة" #. module: account #: help:account.account,currency_mode:0 @@ -2802,7 +2811,7 @@ msgstr "" #. module: account #: view:account.fiscalyear:0 msgid "Search Fiscalyear" -msgstr "" +msgstr "بحث السنة المالية" #. module: account #: selection:account.tax,applicable_type:0 @@ -2817,7 +2826,7 @@ msgstr "إجمالي الكمية" #. module: account #: field:account.move.line.reconcile.writeoff,writeoff_acc_id:0 msgid "Write-Off account" -msgstr "" +msgstr "حساب الديون المعدومة" #. module: account #: field:account.model.line,model_id:0 @@ -2859,7 +2868,7 @@ msgstr "" #. module: account #: model:process.node,name:account.process_node_electronicfile0 msgid "Electronic File" -msgstr "" +msgstr "ملف إالكتروني" #. module: account #: view:res.partner:0 @@ -2874,12 +2883,12 @@ msgstr "" #. module: account #: view:account.subscription:0 msgid "Starts on" -msgstr "" +msgstr "البدء علي" #. module: account #: model:ir.model,name:account.model_account_partner_ledger msgid "Account Partner Ledger" -msgstr "" +msgstr "حساب أستاذ الشريك" #. module: account #: help:account.journal.column,sequence:0 @@ -2896,7 +2905,7 @@ msgstr "" #: help:account.account.template,currency_id:0 #: help:account.bank.accounts.wizard,currency_id:0 msgid "Forces all moves for this account to have this secondary currency." -msgstr "" +msgstr "إجبار جميع الحركات لهذا الحساب أن تكون لها هذه العملة الثانية." #. module: account #: model:ir.actions.act_window,help:account.action_validate_account_move_line @@ -2909,12 +2918,12 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_account_chart_template_form #: model:ir.ui.menu,name:account.menu_action_account_chart_template_form msgid "Chart of Accounts Templates" -msgstr "" +msgstr "قوالب شجرة الحسابات" #. module: account #: model:ir.actions.act_window,name:account.action_wizard_multi_chart msgid "Generate Chart of Accounts from a Chart Template" -msgstr "" +msgstr "إنشاء شجرة حسابات من قالب" #. module: account #: model:ir.model,name:account.model_account_unreconcile_reconcile @@ -2939,7 +2948,7 @@ msgstr "" #: view:account.tax:0 #: view:account.tax.template:0 msgid "Keep empty to use the expense account" -msgstr "" +msgstr "اتركها فارغة لإستخدام حساب المصروفات" #. module: account #: field:account.aged.trial.balance,journal_ids:0 @@ -2985,7 +2994,7 @@ msgstr "اليوميات" #. module: account #: field:account.partner.reconcile.process,to_reconcile:0 msgid "Remaining Partners" -msgstr "" +msgstr "الشركاء الباقيين" #. module: account #: view:account.subscription:0 @@ -3039,7 +3048,7 @@ msgstr "إغلاق الفترة" #. module: account #: field:account.analytic.balance,empty_acc:0 msgid "Empty Accounts ? " -msgstr "" +msgstr "حسابات فارغة؟ " #. module: account #: report:account.overdue:0 @@ -3076,19 +3085,19 @@ msgstr "مسودّة" #. module: account #: model:ir.actions.act_window,name:account.action_account_configuration_installer msgid "Accounting Chart Configuration" -msgstr "" +msgstr "إعدادات شجرة الحسابات" #. module: account #: field:account.tax.code,notprintable:0 #: field:account.tax.code.template,notprintable:0 msgid "Not Printable in Invoice" -msgstr "" +msgstr "لا يمكن طباعتها في الفاتورة" #. module: account #: report:account.vat.declaration:0 #: field:account.vat.declaration,chart_tax_id:0 msgid "Chart of Tax" -msgstr "" +msgstr "خريطة الضريبة" #. module: account #: view:account.journal:0 @@ -3116,12 +3125,14 @@ msgid "" "All selected journal entries will be validated and posted. It means you " "won't be able to modify their accounting fields anymore." msgstr "" +"كل قيود اليومية المختارة سيتم التحقق منها و ترحيلها. و هو ما يعني لأنك لن " +"تستطيع تعديل أي منها." #. module: account #: code:addons/account/invoice.py:370 #, python-format msgid "Cannot delete invoice(s) that are already opened or paid !" -msgstr "" +msgstr "لا يمكن حذف فاتورة إذا كانت مفتوحة أو مدفوعة!" #. module: account #: report:account.account.balance.landscape:0 @@ -3156,7 +3167,7 @@ msgstr "حسابك البنكي و النقدية" #. module: account #: view:account.move:0 msgid "Search Move" -msgstr "" +msgstr "بحث حركة" #. module: account #: field:account.tax.code,name:0 @@ -3168,7 +3179,7 @@ msgstr "" #: report:account.invoice:0 #: model:process.node,name:account.process_node_draftinvoices0 msgid "Draft Invoice" -msgstr "" +msgstr "مسودة للفاتورة" #. module: account #: code:addons/account/wizard/account_invoice_state.py:68 @@ -3184,13 +3195,13 @@ msgstr "" msgid "" "You cannot change the type of account from '%s' to '%s' type as it contains " "account entries!" -msgstr "" +msgstr "لا يمكنك تغيير نوع الحساب من '%s' إلي '%s' ما دام يشمل علي قيود!" #. module: account #: report:account.general.ledger:0 #: report:account.general.ledger_landscape:0 msgid "Counterpart" -msgstr "" +msgstr "نظير" #. module: account #: view:account.journal:0 @@ -3200,13 +3211,13 @@ msgstr "" #. module: account #: field:account.invoice.report,state:0 msgid "Invoice State" -msgstr "" +msgstr "حالة الفاتورة" #. module: account #: view:account.invoice.report:0 #: field:account.invoice.report,categ_id:0 msgid "Category of Product" -msgstr "" +msgstr "فئة المنتج" #. module: account #: view:account.move:0 @@ -3214,13 +3225,13 @@ msgstr "" #: view:account.move.line:0 #: field:account.move.line,narration:0 msgid "Narration" -msgstr "" +msgstr "سرد" #. module: account #: view:account.addtmpl.wizard:0 #: model:ir.actions.act_window,name:account.action_account_addtmpl_wizard_form msgid "Create Account" -msgstr "" +msgstr "إنشاء حساب" #. module: account #: model:ir.model,name:account.model_report_account_type_sales @@ -3230,12 +3241,12 @@ msgstr "" #. module: account #: selection:account.account.type,close_method:0 msgid "Detail" -msgstr "" +msgstr "تفاصيل" #. module: account #: field:account.installer,bank_accounts_id:0 msgid "Your Bank and Cash Accounts" -msgstr "" +msgstr "حساب البنك و حساب النقدية" #. module: account #: report:account.invoice:0 @@ -3258,7 +3269,7 @@ msgstr "" #: report:pl.account:0 #: report:pl.account.horizontal:0 msgid "Chart of Accounts" -msgstr "" +msgstr "شجرة الحسابات" #. module: account #: view:account.tax.chart:0 @@ -3268,7 +3279,7 @@ msgstr "" #. module: account #: field:account.journal,centralisation:0 msgid "Centralised counterpart" -msgstr "" +msgstr "النظير المركزي" #. module: account #: model:ir.model,name:account.model_account_partner_reconcile_process @@ -3278,7 +3289,7 @@ msgstr "" #. module: account #: selection:account.automatic.reconcile,power:0 msgid "2" -msgstr "" +msgstr "2" #. module: account #: view:account.chart:0 @@ -3324,24 +3335,24 @@ msgstr "" #: field:analytic.entries.report,date:0 #, python-format msgid "Date" -msgstr "" +msgstr "تاريخ" #. module: account #: view:account.unreconcile:0 #: view:account.unreconcile.reconcile:0 msgid "Unreconcile" -msgstr "" +msgstr "إلغاء التسوية" #. module: account #: code:addons/account/wizard/account_fiscalyear_close.py:79 #, python-format msgid "The journal must have default credit and debit account" -msgstr "" +msgstr "دفتر اليومية يجب أن يتضمن حساب إفتراضي دائن و أخر مدين" #. module: account #: view:account.chart.template:0 msgid "Chart of Accounts Template" -msgstr "" +msgstr "قالب شجرة الحسابات" #. module: account #: code:addons/account/account.py:2095 @@ -3356,7 +3367,7 @@ msgstr "" #: code:addons/account/account_move_line.py:810 #, python-format msgid "Some entries are already reconciled !" -msgstr "" +msgstr "بعض القيود تمت تسويتها من قبل !" #. module: account #: code:addons/account/account.py:1204 @@ -3365,6 +3376,8 @@ msgid "" "You cannot validate a Journal Entry unless all journal items are in same " "chart of accounts !" msgstr "" +"لا يمكنك التحقق من قيد يومية إذا لم تكن عناصر اليومية تابعة لشجرة حسابات " +"واحدة !" #. module: account #: view:account.tax:0 @@ -3374,7 +3387,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_finance_reporting_budgets msgid "Budgets" -msgstr "" +msgstr "الميزانيات" #. module: account #: selection:account.aged.trial.balance,filter:0 @@ -3393,17 +3406,17 @@ msgstr "" #: selection:account.report.general.ledger,filter:0 #: selection:account.vat.declaration,filter:0 msgid "No Filters" -msgstr "" +msgstr "لا مرشحات" #. module: account #: selection:account.analytic.journal,type:0 msgid "Situation" -msgstr "" +msgstr "الحالة" #. module: account #: view:res.partner:0 msgid "History" -msgstr "" +msgstr "المحفوظات" #. module: account #: help:account.tax,applicable_type:0 @@ -3423,7 +3436,7 @@ msgstr "" #: view:account.invoice.report:0 #: field:account.invoice.report,product_qty:0 msgid "Qty" -msgstr "" +msgstr "الكمية" #. module: account #: field:account.invoice.report,address_contact_id:0 @@ -3433,7 +3446,7 @@ msgstr "" #. module: account #: field:account.move.line,blocked:0 msgid "Litigation" -msgstr "" +msgstr "تقاضي" #. module: account #: view:account.analytic.line:0 @@ -3443,7 +3456,7 @@ msgstr "" #. module: account #: field:res.partner,property_account_payable:0 msgid "Account Payable" -msgstr "" +msgstr "دائن" #. module: account #: constraint:account.move:0 @@ -3465,36 +3478,36 @@ msgstr "" #. module: account #: model:ir.actions.report.xml,name:account.account_account_balance_landscape msgid "Account balance" -msgstr "" +msgstr "رصيد الحساب" #. module: account #: report:account.invoice:0 #: field:account.invoice.line,price_unit:0 msgid "Unit Price" -msgstr "" +msgstr "سعر الوحدة" #. module: account #: model:ir.actions.act_window,name:account.action_account_tree1 msgid "Analytic Items" -msgstr "" +msgstr "عناصر تحليلية" #. module: account #: code:addons/account/account_move_line.py:1128 #, python-format msgid "Unable to change tax !" -msgstr "" +msgstr "لا يمكن تغيير الضريبة !" #. module: account #: field:analytic.entries.report,nbr:0 msgid "#Entries" -msgstr "" +msgstr "#القيود" #. module: account #: code:addons/account/invoice.py:1422 #, python-format msgid "" "You selected an Unit of Measure which is not compatible with the product." -msgstr "" +msgstr "لقد اخترت وحدة مقياس غير ملائمة للمنتج." #. module: account #: code:addons/account/invoice.py:473 @@ -3507,7 +3520,7 @@ msgstr "" #. module: account #: view:account.state.open:0 msgid "Open Invoice" -msgstr "" +msgstr "فاتورة غير مسددة" #. module: account #: field:account.invoice.tax,factor_tax:0 @@ -3530,7 +3543,7 @@ msgstr "" #: field:account.move.reconcile,name:0 #: field:account.subscription,name:0 msgid "Name" -msgstr "" +msgstr "اسم" #. module: account #: model:ir.model,name:account.model_account_aged_trial_balance @@ -3546,12 +3559,12 @@ msgstr "" #: code:addons/account/wizard/account_move_bank_reconcile.py:53 #, python-format msgid "Standard Encoding" -msgstr "" +msgstr "الترميز المعياري" #. module: account #: help:account.journal,analytic_journal_id:0 msgid "Journal for analytic entries" -msgstr "" +msgstr "دفتر اليومية للقيود التحليلية" #. module: account #: model:ir.ui.menu,name:account.menu_finance @@ -3561,7 +3574,7 @@ msgstr "" #: view:product.template:0 #: view:res.partner:0 msgid "Accounting" -msgstr "" +msgstr "المحاسبة" #. module: account #: help:account.central.journal,amount_currency:0 @@ -3576,12 +3589,12 @@ msgstr "" #. module: account #: view:account.analytic.line:0 msgid "General Accounting" -msgstr "" +msgstr "المحاسبة العامة" #. module: account #: report:account.overdue:0 msgid "Balance :" -msgstr "" +msgstr "رصيد:" #. module: account #: help:account.fiscalyear.close,journal_id:0 @@ -3597,29 +3610,29 @@ msgstr "" #: view:account.installer.modules:0 #: view:wizard.multi.charts.accounts:0 msgid "title" -msgstr "" +msgstr "الاسم" #. module: account #: view:account.invoice:0 #: view:account.period:0 #: view:account.subscription:0 msgid "Set to Draft" -msgstr "" +msgstr "حفظ كمسودة" #. module: account #: model:ir.actions.act_window,name:account.action_subscription_form msgid "Recurring Lines" -msgstr "" +msgstr "خطوط تكرارية" #. module: account #: field:account.partner.balance,display_partner:0 msgid "Display Partners" -msgstr "" +msgstr "عرض الشركاء" #. module: account #: view:account.invoice:0 msgid "Validate" -msgstr "" +msgstr "تحقق" #. module: account #: sql_constraint:account.model.line:0 @@ -3637,12 +3650,12 @@ msgstr "" #. module: account #: view:account.invoice.confirm:0 msgid "Confirm Invoices" -msgstr "" +msgstr "تأكيد الفواتير" #. module: account #: selection:account.account,currency_mode:0 msgid "Average Rate" -msgstr "" +msgstr "متوسط النسبة" #. module: account #: view:account.state.open:0 @@ -3667,32 +3680,32 @@ msgstr "" #: field:account.report.general.ledger,period_from:0 #: field:account.vat.declaration,period_from:0 msgid "Start period" -msgstr "" +msgstr "بداية الفترة" #. module: account #: field:account.tax,name:0 #: field:account.tax.template,name:0 #: report:account.vat.declaration:0 msgid "Tax Name" -msgstr "" +msgstr "اسم الضريبة" #. module: account #: model:ir.ui.menu,name:account.menu_finance_configuration #: view:res.company:0 msgid "Configuration" -msgstr "" +msgstr "إعدادات" #. module: account #: model:account.payment.term,name:account.account_payment_term #: model:account.payment.term,note:account.account_payment_term msgid "30 Days End of Month" -msgstr "" +msgstr "نهاية الشهر 30 يوم" #. module: account #: model:ir.actions.act_window,name:account.action_account_analytic_balance #: model:ir.actions.report.xml,name:account.account_analytic_account_balance msgid "Analytic Balance" -msgstr "" +msgstr "رصيد تحليلي" #. module: account #: report:account.balancesheet:0 @@ -3700,7 +3713,7 @@ msgstr "" #: report:pl.account:0 #: report:pl.account.horizontal:0 msgid "Net Loss" -msgstr "" +msgstr "صافي الخسارة" #. module: account #: help:account.account,active:0 @@ -3723,7 +3736,7 @@ msgstr "" #: field:account.account,shortcut:0 #: field:account.account.template,shortcut:0 msgid "Shortcut" -msgstr "" +msgstr "إختصار" #. module: account #: view:account.account:0 @@ -3737,7 +3750,7 @@ msgstr "" #: field:report.account.receivable,type:0 #: field:report.account_type.sales,user_type:0 msgid "Account Type" -msgstr "" +msgstr "نوع الحساب" #. module: account #: report:account.account.balance:0 @@ -3746,12 +3759,12 @@ msgstr "" #: model:ir.actions.report.xml,name:account.account_account_balance #: model:ir.ui.menu,name:account.menu_general_Balance_report msgid "Trial Balance" -msgstr "" +msgstr "ميزان المراجعة" #. module: account #: model:ir.model,name:account.model_account_invoice_cancel msgid "Cancel the Selected Invoices" -msgstr "" +msgstr "إلغاء الفواتير المختارة" #. module: account #: help:product.category,property_account_income_categ:0 @@ -3764,7 +3777,7 @@ msgstr "" #. module: account #: selection:account.automatic.reconcile,power:0 msgid "3" -msgstr "" +msgstr "٣" #. module: account #: model:process.transition,note:account.process_transition_supplieranalyticcost0 @@ -3804,29 +3817,29 @@ msgstr "" #: field:report.account.sales,month:0 #: field:report.account_type.sales,month:0 msgid "Month" -msgstr "" +msgstr "شهر" #. module: account #: field:account.invoice.report,uom_name:0 msgid "Reference UoM" -msgstr "" +msgstr "وحدة القياس المرجعية" #. module: account #: field:account.account,note:0 #: field:account.account.template,note:0 msgid "Note" -msgstr "" +msgstr "ملحوظة" #. module: account #: view:account.analytic.account:0 msgid "Overdue Account" -msgstr "" +msgstr "حساب المتأخرات" #. module: account #: selection:account.invoice,state:0 #: report:account.overdue:0 msgid "Paid" -msgstr "" +msgstr "مدفوع" #. module: account #: field:account.invoice,tax_line:0 @@ -3862,7 +3875,7 @@ msgstr "" #. module: account #: field:account.invoice.tax,name:0 msgid "Tax Description" -msgstr "" +msgstr "وصف الضريبة" #. module: account #: selection:account.aged.trial.balance,target_move:0 @@ -3886,7 +3899,7 @@ msgstr "" #: code:addons/account/report/common_report_header.py:68 #, python-format msgid "All Posted Entries" -msgstr "" +msgstr "كل القيود المرحلة" #. module: account #: code:addons/account/account_bank_statement.py:357 @@ -3902,7 +3915,7 @@ msgstr "" #. module: account #: field:report.aged.receivable,name:0 msgid "Month Range" -msgstr "" +msgstr "نطاق الشهر" #. module: account #: help:account.analytic.balance,empty_acc:0 @@ -3940,7 +3953,7 @@ msgstr "" #. module: account #: field:account.journal,view_id:0 msgid "Display Mode" -msgstr "" +msgstr "نمط العرض" #. module: account #: model:process.node,note:account.process_node_importinvoice0 @@ -3955,24 +3968,24 @@ msgstr "" #. module: account #: model:ir.model,name:account.model_account_chart msgid "Account chart" -msgstr "" +msgstr "خريطة الحساب" #. module: account #: report:account.account.balance.landscape:0 #: report:account.analytic.account.balance:0 #: report:account.central.journal:0 msgid "Account Name" -msgstr "" +msgstr "اسم الحساب" #. module: account #: help:account.fiscalyear.close,report_name:0 msgid "Give name of the new entries" -msgstr "" +msgstr "أعطي اسم للحسابات الجديدة" #. module: account #: model:ir.model,name:account.model_account_invoice_report msgid "Invoices Statistics" -msgstr "" +msgstr "إحصائيات الفواتير" #. module: account #: model:process.transition,note:account.process_transition_paymentorderreconcilation0 @@ -3983,30 +3996,30 @@ msgstr "" #: code:addons/account/wizard/account_reconcile.py:133 #, python-format msgid "Reconcile Writeoff" -msgstr "" +msgstr "تسوية المبالغ المعدومة" #. module: account #: field:account.model.line,date_maturity:0 #: report:account.overdue:0 msgid "Maturity date" -msgstr "" +msgstr "تاريخ الإستحقاق" #. module: account #: view:report.account.receivable:0 msgid "Accounts by type" -msgstr "" +msgstr "الحسابات حسب النوع" #. module: account #: view:account.bank.statement:0 #: field:account.bank.statement,balance_end_real:0 msgid "Closing Balance" -msgstr "" +msgstr "رصيد الإغلاق" #. module: account #: code:addons/account/report/common_report_header.py:92 #, python-format msgid "Not implemented" -msgstr "" +msgstr "غير مطبق" #. module: account #: model:ir.model,name:account.model_account_journal_select @@ -4016,7 +4029,7 @@ msgstr "" #. module: account #: view:account.invoice:0 msgid "Print Invoice" -msgstr "" +msgstr "طباعة الفاتورة" #. module: account #: view:account.tax.template:0 @@ -4033,12 +4046,12 @@ msgstr "" #. module: account #: report:account.tax.code.entries:0 msgid "Voucher No" -msgstr "" +msgstr "رقم المستند" #. module: account #: view:wizard.multi.charts.accounts:0 msgid "res_config_contents" -msgstr "" +msgstr "res_config_contents" #. module: account #: view:account.unreconcile:0 @@ -4048,17 +4061,17 @@ msgstr "" #. module: account #: view:account.use.model:0 msgid "Create Entries From Models" -msgstr "" +msgstr "إنشاء قيد من النماذج" #. module: account #: field:account.account.template,reconcile:0 msgid "Allow Reconciliation" -msgstr "" +msgstr "سماح بالتسوية" #. module: account #: view:account.analytic.account:0 msgid "Analytic Account Statistics" -msgstr "" +msgstr "إحصائيات الحساب التحليلي" #. module: account #: view:wizard.multi.charts.accounts:0 @@ -4071,7 +4084,7 @@ msgstr "" #: field:account.tax,price_include:0 #: field:account.tax.template,price_include:0 msgid "Tax Included in Price" -msgstr "" +msgstr "السعر شامل الضريبة" #. module: account #: model:ir.model,name:account.model_account_analytic_cost_ledger_journal_report @@ -4082,17 +4095,17 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_model_form #: model:ir.ui.menu,name:account.menu_action_model_form msgid "Recurring Models" -msgstr "" +msgstr "نماذج التكرارات" #. module: account #: selection:account.automatic.reconcile,power:0 msgid "4" -msgstr "" +msgstr "٤" #. module: account #: view:account.invoice:0 msgid "Change" -msgstr "" +msgstr "تغيير" #. module: account #: code:addons/account/account.py:1290 @@ -4108,7 +4121,7 @@ msgstr "" #: code:addons/account/wizard/account_report_aged_partner_balance.py:57 #, python-format msgid "UserError" -msgstr "" +msgstr "خطأ مستخدم" #. module: account #: field:account.journal,type_control_ids:0 @@ -4138,7 +4151,7 @@ msgstr "" #: selection:account.invoice.report,state:0 #: selection:report.invoice.created,state:0 msgid "Cancelled" -msgstr "" +msgstr "ملغي" #. module: account #: help:account.bank.statement,balance_end_cash:0 @@ -4163,7 +4176,7 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_account_subscription_generate #: model:ir.ui.menu,name:account.menu_generate_subscription msgid "Generate Entries" -msgstr "" +msgstr "إنشاء قيود" #. module: account #: help:account.vat.declaration,chart_tax_id:0 @@ -4184,12 +4197,12 @@ msgstr "" #: code:addons/account/invoice.py:320 #, python-format msgid "Customer" -msgstr "" +msgstr "عميل" #. module: account #: view:account.bank.statement:0 msgid "Confirmed" -msgstr "" +msgstr "مؤكد" #. module: account #: report:account.invoice:0 @@ -4237,7 +4250,7 @@ msgstr "" #. module: account #: field:account.automatic.reconcile,date1:0 msgid "Starting Date" -msgstr "" +msgstr "تاريخ الإبتداء" #. module: account #: field:account.chart.template,property_account_income:0 @@ -4265,7 +4278,7 @@ msgstr "" #: view:report.invoice.created:0 #: field:res.partner,invoice_ids:0 msgid "Invoices" -msgstr "" +msgstr "الفواتير" #. module: account #: code:addons/account/invoice.py:804 @@ -4281,7 +4294,7 @@ msgstr "" #: view:account.invoice.report:0 #: field:account.invoice.report,user_id:0 msgid "Salesman" -msgstr "" +msgstr "مندوب المبيعات" #. module: account #: view:account.invoice.report:0 @@ -4291,12 +4304,12 @@ msgstr "" #. module: account #: view:account.use.model:0 msgid "Use Model" -msgstr "" +msgstr "إستخدام نموذج" #. module: account #: view:account.state.open:0 msgid "No" -msgstr "" +msgstr "ﻻ" #. module: account #: help:account.invoice.tax,tax_code_id:0 @@ -4306,12 +4319,12 @@ msgstr "" #. module: account #: view:account.addtmpl.wizard:0 msgid "Add" -msgstr "" +msgstr "إضافة" #. module: account #: help:account.invoice,date_invoice:0 msgid "Keep empty to use the current date" -msgstr "" +msgstr "اتركه فارغ لإستخدام التاريخ الحالي" #. module: account #: selection:account.journal,type:0 @@ -4321,7 +4334,7 @@ msgstr "" #. module: account #: view:account.period.close:0 msgid "Are you sure ?" -msgstr "" +msgstr "هل أنت متأكد؟" #. module: account #: help:account.move.line,statement_id:0 @@ -4337,7 +4350,7 @@ msgstr "" #: view:account.bank.statement:0 #: view:account.subscription:0 msgid "Compute" -msgstr "" +msgstr "احسب" #. module: account #: field:account.tax,type_tax_use:0 @@ -4367,7 +4380,7 @@ msgstr "" #: model:ir.ui.menu,name:account.menu_eaction_account_moves_sale #, python-format msgid "Journal Items" -msgstr "" +msgstr "عناصر اليومية" #. module: account #: selection:account.account.type,report_type:0 @@ -4412,12 +4425,12 @@ msgstr "" #: field:account.analytic.cost.ledger.journal.report,date2:0 #: field:account.analytic.inverted.balance,date2:0 msgid "End of period" -msgstr "" +msgstr "نهاية الفترة" #. module: account #: view:res.partner:0 msgid "Bank Details" -msgstr "" +msgstr "تفاصيل البنك" #. module: account #: code:addons/account/invoice.py:720 @@ -4451,12 +4464,12 @@ msgstr "" #: view:account.invoice.cancel:0 #: view:account.invoice.confirm:0 msgid "Close" -msgstr "" +msgstr "إغلاق" #. module: account #: field:account.bank.statement.line,move_ids:0 msgid "Moves" -msgstr "" +msgstr "حركات" #. module: account #: model:ir.actions.act_window,name:account.action_account_vat_declaration @@ -4467,7 +4480,7 @@ msgstr "" #. module: account #: view:account.period:0 msgid "To Close" -msgstr "" +msgstr "للغلق" #. module: account #: field:account.journal,allow_date:0 @@ -4486,7 +4499,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.account_template_folder msgid "Templates" -msgstr "" +msgstr "قوالب" #. module: account #: field:account.tax,child_ids:0 @@ -4502,12 +4515,12 @@ msgstr "" #. module: account #: selection:account.automatic.reconcile,power:0 msgid "5" -msgstr "" +msgstr "٥" #. module: account #: report:account.analytic.account.balance:0 msgid "Analytic Balance -" -msgstr "" +msgstr "رصيد تحليلي -" #. module: account #: field:account.aged.trial.balance,target_move:0 @@ -4549,14 +4562,14 @@ msgstr "" #. module: account #: field:account.subscription,period_type:0 msgid "Period Type" -msgstr "" +msgstr "نوع الفترة" #. module: account #: view:account.invoice:0 #: field:account.invoice,payment_ids:0 #: selection:account.vat.declaration,based_on:0 msgid "Payments" -msgstr "" +msgstr "مدفوعات" #. module: account #: view:account.tax:0 @@ -4566,7 +4579,7 @@ msgstr "" #. module: account #: field:account.subscription.line,move_id:0 msgid "Entry" -msgstr "" +msgstr "قيد" #. module: account #: field:account.tax,python_compute_inv:0 @@ -4578,12 +4591,12 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_payment_term_form #: model:ir.ui.menu,name:account.menu_action_payment_term_form msgid "Payment Terms" -msgstr "" +msgstr "شروط السداد" #. module: account #: field:account.journal.column,name:0 msgid "Column Name" -msgstr "" +msgstr "اسم العامود" #. module: account #: view:account.general.journal:0 @@ -4600,7 +4613,7 @@ msgstr "" #: field:report.account.sales,name:0 #: field:report.account_type.sales,name:0 msgid "Year" -msgstr "" +msgstr "سنة" #. module: account #: field:account.bank.statement,starting_details_ids:0 @@ -4626,13 +4639,13 @@ msgstr "اسم داخلي" #. module: account #: selection:account.subscription,period_type:0 msgid "month" -msgstr "" +msgstr "شهر" #. module: account #: code:addons/account/account_bank_statement.py:293 #, python-format msgid "Journal Item \"%s\" is not valid" -msgstr "" +msgstr "عنصر اليومية \"%s\" غير صحيح" #. module: account #: view:account.payment.term:0 @@ -4642,7 +4655,7 @@ msgstr "" #. module: account #: field:account.partner.reconcile.process,next_partner_id:0 msgid "Next Partner to Reconcile" -msgstr "" +msgstr "الشريك التالي للتسوية" #. module: account #: field:account.invoice.tax,account_id:0 @@ -4662,7 +4675,7 @@ msgstr "نتيجة التسوية" #: report:account.balancesheet:0 #: report:account.balancesheet.horizontal:0 msgid "Balance Sheet" -msgstr "" +msgstr "الميزانية العمومية" #. module: account #: model:ir.ui.menu,name:account.final_accounting_reports @@ -4680,13 +4693,13 @@ msgstr "إدخالات" #. module: account #: view:account.entries.report:0 msgid "This Period" -msgstr "" +msgstr "هذه الفترة" #. module: account #: field:account.analytic.line,product_uom_id:0 #: field:account.move.line,product_uom_id:0 msgid "UoM" -msgstr "" +msgstr "وحدة القياس" #. module: account #: code:addons/account/wizard/account_invoice_refund.py:138 @@ -4708,7 +4721,7 @@ msgstr "رمز الحساب (إذا كان النوع = الرمز)" #: view:account.tax.template:0 #: selection:account.tax.template,type_tax_use:0 msgid "Sale" -msgstr "" +msgstr "بيع" #. module: account #: view:account.analytic.line:0 @@ -4729,7 +4742,7 @@ msgstr "المبلغ" #: code:addons/account/wizard/account_fiscalyear_close.py:41 #, python-format msgid "End of Fiscal Year Entry" -msgstr "" +msgstr "قيد نهاية السنة المالية" #. module: account #: model:process.transition,name:account.process_transition_customerinvoice0 @@ -4739,7 +4752,7 @@ msgstr "" #: model:process.transition,name:account.process_transition_suppliervalidentries0 #: model:process.transition,name:account.process_transition_validentries0 msgid "Validation" -msgstr "" +msgstr "التحقّق" #. module: account #: help:account.invoice,reconciled:0 @@ -4765,12 +4778,12 @@ msgstr "" #: code:addons/account/wizard/account_use_model.py:69 #, python-format msgid "No period found !" -msgstr "" +msgstr "لم يتمكن من إيجاد فترة !" #. module: account #: field:account.journal,update_posted:0 msgid "Allow Cancelling Entries" -msgstr "" +msgstr "السماح بإلغاء القيود" #. module: account #: field:account.tax.code,sign:0 @@ -4780,12 +4793,12 @@ msgstr "" #. module: account #: report:account.partner.balance:0 msgid "(Account/Partner) Name" -msgstr "" +msgstr "اسم (الحساب/الشريك)" #. module: account #: view:account.bank.statement:0 msgid "Transaction" -msgstr "" +msgstr "معاملة" #. module: account #: help:account.tax,base_code_id:0 @@ -4818,12 +4831,12 @@ msgstr "" #. module: account #: model:ir.model,name:account.model_account_installer msgid "account.installer" -msgstr "" +msgstr "account.installer" #. module: account #: field:account.tax.template,include_base_amount:0 msgid "Include in Base Amount" -msgstr "" +msgstr "إدراجها في المبلغ الرئيسي" #. module: account #: help:account.payment.term.line,days:0 @@ -4838,12 +4851,12 @@ msgstr "" #: code:addons/account/installer.py:295 #, python-format msgid "Bank Journal " -msgstr "" +msgstr "دفتر يومية البنك " #. module: account #: view:account.journal:0 msgid "Entry Controls" -msgstr "" +msgstr "ضوابط القيد" #. module: account #: view:account.analytic.chart:0 @@ -4858,7 +4871,7 @@ msgstr "" #: field:account.analytic.cost.ledger.journal.report,date1:0 #: field:account.analytic.inverted.balance,date1:0 msgid "Start of period" -msgstr "" +msgstr "بداية الفترة" #. module: account #: code:addons/account/account_move_line.py:1193 @@ -4876,12 +4889,12 @@ msgstr "" #. module: account #: field:account.bank.statement.line,name:0 msgid "Communication" -msgstr "" +msgstr "إتصالات" #. module: account #: model:ir.ui.menu,name:account.menu_analytic_accounting msgid "Analytic Accounting" -msgstr "" +msgstr "محاسبة تحليلية" #. module: account #: selection:account.invoice,type:0 @@ -6388,7 +6401,7 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_invoice_tree1 #: model:ir.ui.menu,name:account.menu_action_invoice_tree1 msgid "Customer Invoices" -msgstr "" +msgstr "فواتير العميل" #. module: account #: field:account.move.line.reconcile,writeoff:0 @@ -6521,7 +6534,7 @@ msgstr "" #: model:ir.actions.act_window,help:account.action_account_analytic_account_tree2 msgid "" "The normal chart of accounts has a structure defined by the legal " -"requirement of the country. The analytic chart of accounts structure should " +"requirement of the country. The analytic chart of account structure should " "reflect your own business needs in term of costs/revenues reporting. They " "are usually structured by contracts, projects, products or departements. " "Most of the OpenERP operations (invoices, timesheets, expenses, etc) " @@ -7735,7 +7748,7 @@ msgstr "" #: model:ir.ui.menu,name:account.menu_account_supplier #: model:ir.ui.menu,name:account.menu_finance_payables msgid "Suppliers" -msgstr "" +msgstr "المورّدون" #. module: account #: constraint:account.move:0 @@ -8536,7 +8549,7 @@ msgstr "" #. module: account #: view:account.account:0 -msgid "Chart of Accounts" +msgid "Chart of accounts" msgstr "" #. module: account @@ -8583,7 +8596,7 @@ msgstr "" #: field:account.print.journal,chart_account_id:0 #: field:account.report.general.ledger,chart_account_id:0 #: field:account.vat.declaration,chart_account_id:0 -msgid "Chart of Accounts" +msgid "Chart of account" msgstr "" #. module: account @@ -8920,7 +8933,7 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_invoice_tree2 #: model:ir.ui.menu,name:account.menu_action_invoice_tree2 msgid "Supplier Invoices" -msgstr "" +msgstr "فواتير الموردون" #. module: account #: view:account.analytic.line:0 @@ -9264,7 +9277,7 @@ msgstr "" #: view:account.automatic.reconcile:0 #: view:account.move.line.reconcile.writeoff:0 msgid "Write-Off Move" -msgstr "" +msgstr "حركة الإعدام" #. module: account #: model:process.node,note:account.process_node_paidinvoice0 @@ -9560,12 +9573,12 @@ msgstr "" #. module: account #: field:wizard.multi.charts.accounts,bank_accounts_id:0 msgid "Bank Accounts" -msgstr "" +msgstr "الحسابات المصرفية" #. module: account #: field:res.partner,credit:0 msgid "Total Receivable" -msgstr "" +msgstr "إجمالي المدينون" #. module: account #: view:account.account:0 @@ -9573,13 +9586,13 @@ msgstr "" #: view:account.journal:0 #: view:account.move.line:0 msgid "General Information" -msgstr "" +msgstr "معلومات عامة" #. module: account #: view:account.move:0 #: view:account.move.line:0 msgid "Accounting Documents" -msgstr "" +msgstr "مستندات المحاسبة" #. module: account #: model:ir.model,name:account.model_validate_account_move_lines @@ -9590,22 +9603,22 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_account_analytic_cost_ledger_journal #: model:ir.actions.report.xml,name:account.account_analytic_account_quantity_cost_ledger msgid "Cost Ledger (Only quantities)" -msgstr "" +msgstr "دفتر أستاذ التكاليف (كميات فقط)" #. module: account #: model:process.node,note:account.process_node_supplierpaidinvoice0 msgid "Invoice's state is Done." -msgstr "" +msgstr "حالة الفاتورة تمت." #. module: account #: model:process.transition,note:account.process_transition_reconcilepaid0 msgid "As soon as the reconciliation is done, the invoice can be paid." -msgstr "" +msgstr "بمجرد إنتهاء تسوية الفاتورة، يمكن دفعها." #. module: account #: view:account.account.template:0 msgid "Search Account Templates" -msgstr "" +msgstr "بحث قوالب الحساب" #. module: account #: view:account.invoice.tax:0 @@ -9620,7 +9633,7 @@ msgstr "" #. module: account #: model:ir.model,name:account.model_account_addtmpl_wizard msgid "account.addtmpl.wizard" -msgstr "" +msgstr "account.addtmpl.wizard" #. module: account #: field:account.aged.trial.balance,result_selection:0 @@ -9631,14 +9644,14 @@ msgstr "" #: report:account.third_party_ledger:0 #: report:account.third_party_ledger_other:0 msgid "Partner's" -msgstr "" +msgstr "الشريك" #. module: account #: model:ir.actions.act_window,name:account.action_account_fiscalyear_form #: view:ir.sequence:0 #: model:ir.ui.menu,name:account.menu_action_account_fiscalyear_form msgid "Fiscal Years" -msgstr "" +msgstr "السنوات المالية" #. module: account #: help:account.analytic.journal,active:0 @@ -9646,17 +9659,19 @@ msgid "" "If the active field is set to False, it will allow you to hide the analytic " "journal without removing it." msgstr "" +"إذا كان الحقل النشط موضوع بـ لا (False)، سيسمح لك بإخفاء الحساب التحليلي دون " +"إزالته." #. module: account #: field:account.analytic.line,ref:0 msgid "Ref." -msgstr "" +msgstr "مرجع" #. module: account #: field:account.use.model,model:0 #: model:ir.model,name:account.model_account_model msgid "Account Model" -msgstr "" +msgstr "نموذج حساب" #. module: account #: selection:account.entries.report,month:0 @@ -9665,7 +9680,7 @@ msgstr "" #: selection:report.account.sales,month:0 #: selection:report.account_type.sales,month:0 msgid "February" -msgstr "" +msgstr "فبراير" #. module: account #: field:account.bank.accounts.wizard,bank_account_id:0 @@ -9674,23 +9689,23 @@ msgstr "" #: field:account.invoice,partner_bank_id:0 #: field:account.invoice.report,partner_bank_id:0 msgid "Bank Account" -msgstr "" +msgstr "حساب البنك" #. module: account #: model:ir.actions.act_window,name:account.action_account_central_journal #: model:ir.model,name:account.model_account_central_journal msgid "Account Central Journal" -msgstr "" +msgstr "حساب دفتر اليومية المركزي" #. module: account #: report:account.overdue:0 msgid "Maturity" -msgstr "" +msgstr "الإستحقاق" #. module: account #: selection:account.aged.trial.balance,direction_selection:0 msgid "Future" -msgstr "" +msgstr "مستقبل" #. module: account #: view:account.move.line:0 @@ -9717,7 +9732,7 @@ msgstr "" #. module: account #: field:account.chart.template,property_account_expense:0 msgid "Expense Account on Product Template" -msgstr "" +msgstr "حساب المصروفات من قالب المنتجات" #. module: account #: field:account.analytic.line,amount_currency:0 @@ -9728,13 +9743,13 @@ msgstr "مبلغ العملة" #: code:addons/account/wizard/account_report_aged_partner_balance.py:55 #, python-format msgid "You must enter a period length that cannot be 0 or below !" -msgstr "" +msgstr "لابد من إدخال الفترة علي ألا تكون صفر أو أقل" #. module: account #: code:addons/account/account.py:501 #, python-format msgid "You cannot remove an account which has account entries!. " -msgstr "" +msgstr "لا يمكنك حذف حساب مستدخدم في قيود يومية!. " #. module: account #: model:ir.actions.act_window,help:account.action_account_form @@ -9747,6 +9762,11 @@ msgid "" "certain amount of information. They have to be certified by an external " "auditor annually." msgstr "" +"لإنشاء و إدارة الحسابات التي تسجلها في قيود اليومية. الحساب هو جزء من دفتر " +"الأستاذ الذي يسمح لشركتك بتسجيل كل العمليات الدائنة و المدينة. حيث تعرض " +"الشركات حساباتهم السنوية في جزئين رئيسيين: قائمة المركز المالي و قائمة الدخل " +"(حساب الأرباح و الخسائر). و هذه الحسابات السنوية مطلوبة بالقانون للإفصاح عن " +"معلومات معينة. و يجب أنيتم التصديق عليهم من قبل مراجع خارجي سنوياً." #. module: account #: help:account.move.line,amount_residual_currency:0 @@ -9843,3 +9863,10 @@ msgstr "خصوم" #~ msgid "Balance:" #~ msgstr "الرصيد:" + +#, python-format +#~ msgid "Invoice " +#~ msgstr "فاتورة " + +#~ msgid "Balance Sheet (Assets Accounts)" +#~ msgstr "الميزانية العمومية (حسابات الأصول)" diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 3d0365d6307..cc05092688b 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -91,15 +91,18 @@
- - - - - - - - - + + + + + + + + + + + + @@ -255,7 +258,6 @@ Open Account Tree - diff --git a/addons/account/project/wizard/account_analytic_balance_report_view.xml b/addons/account/project/wizard/account_analytic_balance_report_view.xml index 5144ba8647a..7cfe43cd0f9 100644 --- a/addons/account/project/wizard/account_analytic_balance_report_view.xml +++ b/addons/account/project/wizard/account_analytic_balance_report_view.xml @@ -35,7 +35,6 @@ - Account Analytic Balance client_print_multi diff --git a/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml b/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml index 3bf5d54e8a6..128ea963982 100644 --- a/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml +++ b/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml @@ -34,7 +34,6 @@ - Account Analytic Cost Ledger Journal client_print_multi @@ -43,4 +42,4 @@ - \ No newline at end of file + diff --git a/addons/account/project/wizard/account_analytic_cost_ledger_view.xml b/addons/account/project/wizard/account_analytic_cost_ledger_view.xml index a45eda32275..7695ccd3696 100644 --- a/addons/account/project/wizard/account_analytic_cost_ledger_view.xml +++ b/addons/account/project/wizard/account_analytic_cost_ledger_view.xml @@ -33,7 +33,6 @@ - Account Analytic Cost client_print_multi @@ -42,4 +41,4 @@ - \ No newline at end of file + diff --git a/addons/account/project/wizard/account_analytic_inverted_balance_report.xml b/addons/account/project/wizard/account_analytic_inverted_balance_report.xml index 114c75f40af..c8e4762a132 100644 --- a/addons/account/project/wizard/account_analytic_inverted_balance_report.xml +++ b/addons/account/project/wizard/account_analytic_inverted_balance_report.xml @@ -33,7 +33,6 @@ - Account Analytic Inverted Balance client_print_multi diff --git a/addons/account/project/wizard/account_analytic_journal_report_view.xml b/addons/account/project/wizard/account_analytic_journal_report_view.xml index 20777401da0..d924ceb2a7b 100644 --- a/addons/account/project/wizard/account_analytic_journal_report_view.xml +++ b/addons/account/project/wizard/account_analytic_journal_report_view.xml @@ -33,7 +33,6 @@ - Account Analytic Journal client_print_multi diff --git a/addons/account/test/account_bank_statement.yml b/addons/account/test/account_bank_statement.yml index fc46370ef8b..37789f3ad66 100644 --- a/addons/account/test/account_bank_statement.yml +++ b/addons/account/test/account_bank_statement.yml @@ -5,19 +5,9 @@ - !python {model: account.bank.statement}: | import time - period = self._get_period(cr, uid, {'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu', - 'journal_type': 'bank', 'period_id':time.strftime('%m'), 'active_ids': [ref('menu_bank_statement_tree')], 'active_id': ref('menu_bank_statement_tree')}) - assert period, _('Period has not been selected') journal = self._default_journal_id(cr, uid, {'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu', 'journal_type': 'bank', 'period_id': time.strftime('%m'), 'active_ids': [ref('menu_bank_statement_tree')], 'active_id': ref('menu_bank_statement_tree')}) assert journal, _('Journal has not been selected') -- - I select the date -- - !python {model: account.bank.statement}: | - import time - date = self.onchange_date(cr, uid, [], time.strftime('%Y-%m-%d'), context=None) - assert date, _('Date has not been selected') - I create a bank statement with Opening and Closing balance 0. - diff --git a/addons/account/test/account_customer_invoice.yml b/addons/account/test/account_customer_invoice.yml index 870def153b1..a980823590d 100644 --- a/addons/account/test/account_customer_invoice.yml +++ b/addons/account/test/account_customer_invoice.yml @@ -11,66 +11,19 @@ footer: True bank: base.res_bank_1 bank_name: Reserve -- - I select the journal for customer invoice -- - !python {model: account.invoice}: | - journal = self.onchange_journal_id(cr, uid, [], journal_id=ref('account.sales_journal')) -- - I select the partner for customer invoice -- - !python {model: account.invoice}: | - partner = self.onchange_partner_id(cr, uid, [], 'out_invoice', ref('base.res_partner_3'), date_invoice=False, - payment_term=ref('account.account_payment_term_advance'), partner_bank_id=ref('res_partner_bank_0'), company_id=ref('base.main_company')) -- - I select the company for invoice -- - !python {model: account.invoice}: | - company = self.onchange_company_id(cr, uid, [], ref('base.main_company'), False, 'out_invoice', [], ref('base.EUR')) - I create a customer invoice - - !record {model: account.invoice, id: account_invoice_customer0}: - account_id: account.a_recv - address_contact_id: base.res_partner_address_zen - address_invoice_id: base.res_partner_address_zen - company_id: base.main_company - currency_id: base.EUR - date_invoice: !eval time.strftime('%Y-%m-%d') + !record {model: account.invoice, id: account_invoice_customer0, view: invoice_form}: payment_term: account.account_payment_term_advance partner_bank_id: res_partner_bank_0 journal_id: account.sales_journal partner_id: base.res_partner_3 reference_type: none name: 'Test Customer Invoice' -- - I select a product for invoice -- - !python {model: account.invoice.line}: | - product = self.product_id_change(cr, uid, [], ref("product.product_product_pc3"), False, qty=10.0, name='[PC3] Medium PC', - type='out_invoice', partner_id=ref('base.res_partner_3'), fposition_id=False, price_unit= 900.0, address_invoice_id=ref('base.res_partner_address_zen'), - currency_id=ref('base.EUR'), context={'lang': u'en_US', 'tz': False, 'type': 'out_invoice'}, company_id=ref('base.main_company')) - line = {} - line.update(product.get('value', {})) - line.update({ - 'quantity': 10.0, - 'invoice_id': ref("account_invoice_customer0"), - }) - invoice_line = self.create(cr, uid, line) -- - I select product Uos -- - !python {model: account.invoice.line}: | - inv_line_id = self.search(cr, uid, [('invoice_id','=',ref('account_invoice_customer0'))]) - uos = self.uos_id_change(cr, uid, inv_line_id, ref("product.product_product_pc3"), ref('product.product_uom_unit'), qty=0, name='[PC3] Medium PC', type='out_invoice', - partner_id=ref('base.res_partner_3'), fposition_id=False, price_unit=False, address_invoice_id=ref('base.res_partner_address_zen'), - currency_id=ref('base.EUR'), context={'lang': u'en_US', 'tz': False, 'type': 'out_invoice'}, company_id=ref('base.main_company')) -- - I select the account for invoice line -- - !python {model: account.invoice.line}: | - inv_line_id = self.search(cr, uid, [('invoice_id','=',ref('account_invoice_customer0'))]) - account = self.onchange_account_id(cr, uid, inv_line_id, False, ref('account.a_sale')) + invoice_line: + - product_id: product.product_product_pc3 + quantity: 10.0 - I manually assign tax on invoice - diff --git a/addons/account/test/account_use_model.yml b/addons/account/test/account_use_model.yml index f6cebd9c3f1..ab69b251919 100644 --- a/addons/account/test/account_use_model.yml +++ b/addons/account/test/account_use_model.yml @@ -38,7 +38,7 @@ Then I click on the 'Post' button of Journal Entries - !python {model: account.move}: | - ids = [ref('account_model_mymodelonyears0')] + ids = self.search(cr, uid, [('ref', '=', 'My Test Model')]) self.button_validate(cr, uid, ids, {}) moves = self.browse(cr, uid, ids)[0] assert(moves.state == 'posted'), _('Journal Entries are not in posted state') @@ -48,9 +48,6 @@ !record {model: account.subscription, id: test_recurring_lines }: name: Test Recurring Lines model_id: account_model_mymodelonyears0 - date_start: !eval time.strftime('%Y-%m-%d') - period_nbr: 1 - period_total: 12 period_type: 'day' - Then I click on the 'Compute' button of Recurring lines diff --git a/addons/account/test/test_edi_invoice.yml b/addons/account/test/test_edi_invoice.yml new file mode 100644 index 00000000000..b1e73140581 --- /dev/null +++ b/addons/account/test/test_edi_invoice.yml @@ -0,0 +1,152 @@ +- + In order to test the EDI export features of Invoices +- + First I create a draft customer invoice +- + !record {model: account.invoice, id: invoice_edi_1}: + journal_id: 1 + partner_id: base.res_partner_agrolait + currency_id: base.EUR + address_invoice_id: base.res_partner_address_8invoice + company_id: 1 + account_id: account.a_pay + date_invoice: '2011-06-22' + name: selling product + type: 'out_invoice' + invoice_line: + - product_id: product.product_product_pc1 + uos_id: 1 + quantity: 1.0 + price_unit: 10.0 + name: 'basic pc' + account_id: account.a_pay + invoice_line: + - product_id: product.product_product_pc3 + uos_id: 1 + quantity: 5.0 + price_unit: 100.0 + name: 'Medium PC' + account_id: account.a_pay + tax_line: + - name: sale tax + account_id: account.a_pay + manual: True + amount: 1000.00 +- + I confirm and open the invoice +- + !workflow {model: account.invoice, ref: invoice_edi_1, action: invoice_open} +- + Then I export the customer invoice +- + !python {model: edi.document}: | + invoice_pool = self.pool.get('account.invoice') + invoice = invoice_pool.browse(cr, uid, ref("invoice_edi_1")) + token = self.export_edi(cr, uid, [invoice]) + assert token, 'Invalid EDI Token' +- + Then I import a sample EDI document of another customer invoice +- + !python {model: account.invoice}: | + edi_document = { + "__id": "account:b22acf7a-ddcd-11e0-a4db-701a04e25543.random_invoice_763jsms", + "__module": "account", + "__model": "account.invoice", + "__version": [6,1,0], + "internal_number": "SAJ/2011/002", + "company_address": { + "__id": "base:b22acf7a-ddcd-11e0-a4db-701a04e25543.main_address", + "__module": "base", + "__model": "res.partner.address", + "city": "Gerompont", + "zip": "1367", + "country_id": ["base:b22acf7a-ddcd-11e0-a4db-701a04e25543.be", "Belgium"], + "phone": "(+32).81.81.37.00", + "street": "Chaussee de Namur 40", + "bank_ids": [ + ["base:b22acf7a-ddcd-11e0-a4db-701a04e25543.res_partner_bank-ZrTWzesfsdDJzGbp","Sample bank: 123465789-156113"] + ], + }, + "company_id": ["account:b22acf7a-ddcd-11e0-a4db-701a04e25543.res_company_test11", "Thomson pvt. ltd."], + "currency": { + "__id": "base:b22acf7a-ddcd-11e0-a4db-701a04e25543.EUR", + "__module": "base", + "__model": "res.currency", + "code": "EUR", + "symbol": "€", + }, + "partner_id": ["account:b22acf7a-ddcd-11e0-a4db-701a04e25543.res_partner_test20", "Junjun wala"], + "partner_address": { + "__id": "base:5af1272e-dd26-11e0-b65e-701a04e25543.res_partner_address_7wdsjasdjh", + "__module": "base", + "__model": "res.partner.address", + "phone": "(+32).81.81.37.00", + "street": "Chaussee de Namur 40", + "city": "Gerompont", + "zip": "1367", + "country_id": ["base:5af1272e-dd26-11e0-b65e-701a04e25543.be", "Belgium"], + }, + "date_invoice": "2011-06-22", + "name": "sample invoice", + "tax_line": [{ + "__id": "account:b22acf7a-ddcd-11e0-a4db-701a04e25543.account_invoice_tax-4g4EutbiEMVl", + "__module": "account", + "__model": "account.invoice.tax", + "amount": 1000.0, + "manual": True, + "name": "sale tax", + }], + "type": "out_invoice", + "invoice_line": [{ + "__module": "account", + "__model": "account.invoice.line", + "__id": "account:b22acf7a-ddcd-11e0-a4db-701a04e25543.account_invoice_line-1RP3so", + "uos_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_uom_unit", "PCE"], + "name": "Basic PC", + "price_unit": 10.0, + "product_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_product_pc1", "[PC1] Basic PC"], + "quantity": 1.0 + }, + { + "__module": "account", + "__model": "account.invoice.line", + "__id": "account:b22acf7a-ddcd-11e0-a4db-701a04e25543.account_invoice_line-u2XV5", + "uos_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_uom_unit", "PCE"], + "name": "Medium PC", + "price_unit": 100.0, + "product_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_product_pc3", "[PC3] Medium PC"], + "quantity": 5.0 + }] + } + invoice_id = self.edi_import(cr, uid, edi_document, context=context) + assert invoice_id, 'EDI import failed' + invoice_new = self.browse(cr, uid, invoice_id) + + # check bank info on partner + assert len(invoice_new.partner_id.bank_ids) == 1, "Expected 1 bank entry related to partner" + bank_info = invoice_new.partner_id.bank_ids[0] + assert bank_info.acc_number == "Sample bank: 123465789-156113", 'Expected "Sample bank: 123465789-156113", got %s' % bank_info.acc_number + + assert invoice_new.partner_id.supplier, 'Imported Partner is not marked as supplier' + assert invoice_new.reference == "SAJ/2011/002", "internal number is not stored in reference" + assert invoice_new.reference_type == 'none', "reference type is not set to 'none'" + assert invoice_new.internal_number == False, "internal number is not reset" + assert invoice_new.journal_id.id, "journal id is not selected" + assert invoice_new.type == 'in_invoice', "Invoice type was not set properly" + assert len(invoice_new.invoice_line) == 2, "invoice lines are not same" + for inv_line in invoice_new.invoice_line: + if inv_line.name == 'Basic PC': + assert inv_line.uos_id.name == "PCE" , "uom is not same" + assert inv_line.price_unit == 10 , "price unit is not same" + assert inv_line.quantity == 1 , "product qty is not same" + assert inv_line.price_subtotal == 10, "price sub total is not same" + elif inv_line.name == 'Medium PC': + assert inv_line.uos_id.name == "PCE" , "uom is not same" + assert inv_line.price_unit == 100 , "price unit is not same" + assert inv_line.quantity == 5 , "product qty is not same" + assert inv_line.price_subtotal == 500, "price sub total is not same" + else: + raise AssertionError('unknown invoice line: %s' % inv_line) + for inv_tax in invoice_new.tax_line: + assert inv_tax.manual, "tax line not set to manual" + assert inv_tax.account_id, "missing tax line account" diff --git a/addons/account/wizard/__init__.py b/addons/account/wizard/__init__.py index d82eff62142..88ae17f3c7b 100644 --- a/addons/account/wizard/__init__.py +++ b/addons/account/wizard/__init__.py @@ -66,6 +66,7 @@ import account_change_currency import account_report_balance_sheet import account_report_profit_loss + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_journal_select_view.xml b/addons/account/wizard/account_journal_select_view.xml index 348218dd04d..abd596c2f24 100644 --- a/addons/account/wizard/account_journal_select_view.xml +++ b/addons/account/wizard/account_journal_select_view.xml @@ -32,7 +32,6 @@ account.journal.period Open Journal - diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index 99aa83826df..6756e0d06c6 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -188,7 +188,7 @@ class account_move_journal(osv.osv_memory): 'view_mode': 'tree,graph,form', 'res_model': 'account.move.line', 'view_id': False, - 'context': "{'search_default_posted': %d, 'visible_id':%s, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (move, journal_id, journal_id, period_id), + 'context': "{'search_default_posted': %d, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (move, journal_id, period_id), 'type': 'ir.actions.act_window', 'search_view_id': res_id } diff --git a/addons/account/wizard/account_period_close_view.xml b/addons/account/wizard/account_period_close_view.xml index 5d3351246a3..a353cf883ba 100644 --- a/addons/account/wizard/account_period_close_view.xml +++ b/addons/account/wizard/account_period_close_view.xml @@ -33,7 +33,6 @@ - Close a Period client_action_multi diff --git a/addons/account/wizard/account_reconcile_partner_process_view.xml b/addons/account/wizard/account_reconcile_partner_process_view.xml index d7ac5e85d07..6360100a309 100644 --- a/addons/account/wizard/account_reconcile_partner_process_view.xml +++ b/addons/account/wizard/account_reconcile_partner_process_view.xml @@ -33,7 +33,6 @@ - Partner reconciliation client_action_multi diff --git a/addons/account/wizard/account_reconcile_view.xml b/addons/account/wizard/account_reconcile_view.xml index 7c7ed520b48..8f001f40694 100644 --- a/addons/account/wizard/account_reconcile_view.xml +++ b/addons/account/wizard/account_reconcile_view.xml @@ -37,7 +37,6 @@ - Reconcile Entries client_action_multi diff --git a/addons/account/wizard/account_report_account_balance_view.xml b/addons/account/wizard/account_report_account_balance_view.xml index 38f456f7d15..b700ab8a736 100644 --- a/addons/account/wizard/account_report_account_balance_view.xml +++ b/addons/account/wizard/account_report_account_balance_view.xml @@ -45,7 +45,6 @@ - Trial Balance client_print_multi diff --git a/addons/account/wizard/account_report_general_ledger_view.xml b/addons/account/wizard/account_report_general_ledger_view.xml index b4203134fd6..20b6ab0f042 100644 --- a/addons/account/wizard/account_report_general_ledger_view.xml +++ b/addons/account/wizard/account_report_general_ledger_view.xml @@ -51,7 +51,6 @@ - General Ledger client_print_multi diff --git a/addons/account/wizard/account_unreconcile_view.xml b/addons/account/wizard/account_unreconcile_view.xml index 2efe457b1e2..5cdbbb6775f 100644 --- a/addons/account/wizard/account_unreconcile_view.xml +++ b/addons/account/wizard/account_unreconcile_view.xml @@ -31,7 +31,6 @@ - Unreconcile Entries client_action_multi @@ -70,7 +69,6 @@ - Unreconcile Entries client_action_multi diff --git a/addons/account/wizard/account_use_model.py b/addons/account/wizard/account_use_model.py index 6e444b8b4e6..4fb77cb3397 100644 --- a/addons/account/wizard/account_use_model.py +++ b/addons/account/wizard/account_use_model.py @@ -47,67 +47,16 @@ class account_use_model(osv.osv_memory): def create_entries(self, cr, uid, ids, context=None): account_model_obj = self.pool.get('account.model') - account_period_obj = self.pool.get('account.period') - account_move_obj = self.pool.get('account.move') - account_move_line_obj = self.pool.get('account.move.line') - pt_obj = self.pool.get('account.payment.term') mod_obj = self.pool.get('ir.model.data') if context is None: context = {} - move_ids = [] - entry = {} data = self.read(cr, uid, ids, context=context)[0] record_id = context and context.get('model_line', False) or False if record_id: - data_model = account_model_obj.browse(cr, uid, data['model'], context=context) + model_ids = data['model'] else: - data_model = account_model_obj.browse(cr, uid, context['active_ids'], context=context) - for model in data_model: - entry['name'] = model.name%{'year':time.strftime('%Y'), 'month':time.strftime('%m'), 'date':time.strftime('%d')} - period_id = account_period_obj.find(cr, uid, context=context) - if not period_id: - raise osv.except_osv(_('No period found !'), _('Unable to find a valid period !')) - period_id = period_id[0] - move_id = account_move_obj.create(cr, uid, { - 'ref': entry['name'], - 'period_id': period_id, - 'journal_id': model.journal_id.id, - }) - move_ids.append(move_id) - for line in model.lines_id: - analytic_account_id = False - if line.analytic_account_id: - if not model.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,)) - analytic_account_id = line.analytic_account_id.id - val = { - 'move_id': move_id, - 'journal_id': model.journal_id.id, - 'period_id': period_id, - 'analytic_account_id': analytic_account_id - } - date_maturity = time.strftime('%Y-%m-%d') - if line.date_maturity == 'partner' and line.partner_id and line.partner_id.property_payment_term: - payment_term_id = line.partner_id.property_payment_term.id - pterm_list = pt_obj.compute(cr, uid, payment_term_id, value=1, date_ref=date_maturity) - if pterm_list: - pterm_list = [l[0] for l in pterm_list] - pterm_list.sort() - date_maturity = pterm_list[-1] - val.update({ - 'name': line.name, - 'quantity': line.quantity, - 'debit': line.debit, - 'credit': line.credit, - 'account_id': line.account_id.id, - 'move_id': move_id, - 'partner_id': line.partner_id.id, - 'date': time.strftime('%Y-%m-%d'), - 'date_maturity': date_maturity - }) - c = context.copy() - c.update({'journal_id': model.journal_id.id,'period_id': period_id}) - account_move_line_obj.create(cr, uid, val, context=c) + model_ids = context['active_ids'] + move_ids = account_model_obj.generate(cr, uid, model_ids, context=context) context.update({'move_ids':move_ids}) model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_move_form')], context=context) diff --git a/addons/account/wizard/account_validate_move_view.xml b/addons/account/wizard/account_validate_move_view.xml index d12ae8d847f..31984596000 100644 --- a/addons/account/wizard/account_validate_move_view.xml +++ b/addons/account/wizard/account_validate_move_view.xml @@ -73,7 +73,6 @@ - Post Journal Entries client_action_multi diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 8ebb75244a1..36d62e32e63 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -61,7 +61,7 @@ class account_analytic_account(osv.osv): res[id][f] = [int(id * 1000000 + int(x[0])) for x in result] elif f == 'last_worked_invoiced_date': for id in ids: - res[id][f] = 0.0 + res[id][f] = False if parent_ids: cr.execute("SELECT account_analytic_line.account_id, MAX(date) \ FROM account_analytic_line \ @@ -74,8 +74,8 @@ class account_analytic_account(osv.osv): res[account_id][f] = sum for account in accounts: for child in account.child_ids: - if res[account.id].get(f, '') < res.get(child.id, {}).get(f, ''): - res[account.id][f] = res.get(child.id, {}).get(f, '') + if res[account.id][f] < res.get(child.id, {}).get(f): + res[account.id][f] = res.get(child.id, {}).get(f, False) elif f == 'ca_to_invoice': for id in ids: res[id][f] = 0.0 @@ -123,7 +123,7 @@ class account_analytic_account(osv.osv): res[id][f] = round(res.get(id, {}).get(f, 0.0), dp) + round(res2.get(id, 0.0), 2) elif f == 'last_invoice_date': for id in ids: - res[id][f] = '' + res[id][f] = False if parent_ids: cr.execute ("SELECT account_analytic_line.account_id, \ DATE(MAX(account_invoice.date_invoice)) \ @@ -137,11 +137,11 @@ class account_analytic_account(osv.osv): res[account_id][f] = lid for account in accounts: for child in account.child_ids: - if res[account.id][f] < res.get(child.id, {}).get(f, ''): - res[account.id][f] = res.get(child.id, {}).get(f, '') + if res[account.id][f] < res.get(child.id, {}).get(f): + res[account.id][f] = res.get(child.id, {}).get(f, False) elif f == 'last_worked_date': for id in ids: - res[id][f] = '' + res[id][f] = False if parent_ids: cr.execute("SELECT account_analytic_line.account_id, MAX(date) \ FROM account_analytic_line \ @@ -154,8 +154,8 @@ class account_analytic_account(osv.osv): res[account_id][f] = lwd for account in accounts: for child in account.child_ids: - if res[account.id][f] < res.get(child.id, {}).get(f, ''): - res[account.id][f] = res.get(child.id, {}).get(f, '') + if res[account.id][f] < res.get(child.id, {}).get(f): + res[account.id][f] = res.get(child.id, {}).get(f, False) elif f == 'hours_qtt_non_invoiced': for id in ids: res[id][f] = 0.0 @@ -376,13 +376,11 @@ class account_analytic_account(osv.osv): def _is_overdue_quantity(self, cr, uid, ids, fieldnames, args, context=None): result = dict.fromkeys(ids, 0) - for record in self.browse(cr, uid, ids, context=context): - if record.quantity == 0.0 and record.quantity_max == 0.0: - result[record.id] = 0 - else: + if record.quantity_max > 0.0: result[record.id] = int(record.quantity >= record.quantity_max) - + else: + result[record.id] = 0 return result def _get_analytic_account(self, cr, uid, ids, context=None): diff --git a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml index 34840814154..19271cb4af2 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml @@ -1,7 +1,6 @@ - - + All Uninvoiced Entries @@ -11,16 +10,7 @@ [('invoice_id','=',False)] - - - - Overpassed Accounts - account.analytic.account - form - tree,form,graph - [('date','<=',time.strftime('%Y-%m-%d')),('state','=','open')] - - + account.analytic.account.search @@ -29,11 +19,10 @@ - - + - - - + @@ -71,7 +59,7 @@ - Overdue Accounts + Contracts to Renew account.analytic.account form tree,form,graph @@ -80,7 +68,34 @@ You will find here the contracts to be renewed because the deadline is passed or the working hours are higher than the allocated hours. OpenERP automatically sets these analytic accounts to the pending state, in order to raise a warning during the timesheets recording. Salesmen should review all pending accounts and reopen or close the according to the negotiation with the customer. - + + + + Contracts to Renew + account.analytic.account + form + tree,form,graph + {'search_default_has_partner':1, 'search_default_my_accounts':1, 'search_default_draft':1, 'search_default_pending':1, 'search_default_open':1, 'search_default_renew':1} + [('type','=','normal')] + + You will find here the contracts to be renewed because the deadline is passed or the working hours are higher than the allocated hours. OpenERP automatically sets these analytic accounts to the pending state, in order to raise a warning during the timesheets recording. Salesmen should review all pending accounts and reopen or close the according to the negotiation with the customer. + + + + + Contracts + account.analytic.account + form + tree,form,graph + {'search_default_has_partner':1, 'search_default_my_accounts':1, 'search_default_draft':1, 'search_default_pending':1, 'search_default_open':1} + [('type','=','normal')] + + + + + diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml index a82f3b1b5c9..c59717e8ad4 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml @@ -8,6 +8,27 @@ Remove information on Account data => because they move on analysis sheet create a page with invoicing informations --> + + account.analytic.account.invoice.stat.form.inherit + account.analytic.account + form + + + + + + +