diff --git a/addons/account/account.py b/addons/account/account.py index 5d1916ee7bd..58c4cf447ef 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1006,8 +1006,7 @@ class account_period(osv.osv): def find(self, cr, uid, dt=None, context=None): if context is None: context = {} if not dt: - dt = fields.date.context_today(self,cr,uid,context=context) -#CHECKME: shouldn't we check the state of the period? + dt = fields.date.context_today(self, cr, uid, context=context) args = [('date_start', '<=' ,dt), ('date_stop', '>=', dt)] if context.get('company_id', False): args.append(('company_id', '=', context['company_id'])) @@ -1015,6 +1014,7 @@ class account_period(osv.osv): company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id args.append(('company_id', '=', company_id)) result = [] + #WARNING: in next version the default value for account_periof_prefer_normal will be True if context.get('account_period_prefer_normal'): # look for non-special periods first, and fallback to all if no result is found result = self.search(cr, uid, args + [('special', '=', False)], context=context) @@ -1167,7 +1167,7 @@ class account_move(osv.osv): context = {} #put the company in context to find the good period ctx = context.copy() - ctx.update({'company_id': company_id}) + ctx.update({'company_id': company_id, 'account_period_prefer_normal': True}) return { 'journal_id': journal_id, 'date': date, @@ -1680,7 +1680,7 @@ class account_move_reconcile(osv.osv): elif reconcile.line_partial_ids: first_partner = reconcile.line_partial_ids[0].partner_id.id move_lines = reconcile.line_partial_ids - if any([line.partner_id.id != first_partner for line in move_lines]): + if any([(line.account_id.type in ('receivable', 'payable') and line.partner_id.id != first_partner) for line in move_lines]): return False return True @@ -1796,7 +1796,8 @@ class account_tax_code(osv.osv): if context.get('period_id', False): period_id = context['period_id'] else: - period_id = self.pool.get('account.period').find(cr, uid) + ctx = dict(context, account_period_prefer_normal=True) + period_id = self.pool.get('account.period').find(cr, uid, context=ctx) if not period_id: return dict.fromkeys(ids, 0.0) period_id = period_id[0] @@ -2313,7 +2314,7 @@ class account_model(osv.osv): 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}) + ctx.update({'company_id': model.company_id.id, 'account_period_prefer_normal': True}) 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}) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 8e1a5dd26c6..cb95ad8d0c0 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -61,7 +61,8 @@ class account_bank_statement(osv.osv): return res def _get_period(self, cr, uid, context=None): - periods = self.pool.get('account.period').find(cr, uid,context=context) + ctx = dict(context or {}, account_period_prefer_normal=True) + periods = self.pool.get('account.period').find(cr, uid, context=ctx) if periods: return periods[0] return False @@ -159,7 +160,7 @@ class account_bank_statement(osv.osv): if context is None: context = {} ctx = context.copy() - ctx.update({'company_id': company_id}) + ctx.update({'company_id': company_id, 'account_period_prefer_normal': True}) pids = period_pool.find(cr, uid, dt=date, context=ctx) if pids: res.update({'period_id': pids[0]}) diff --git a/addons/account/account_financial_report_data.xml b/addons/account/account_financial_report_data.xml index 6410a5e887c..e8ff33151c3 100644 --- a/addons/account/account_financial_report_data.xml +++ b/addons/account/account_financial_report_data.xml @@ -6,16 +6,19 @@ --> Profit and Loss + sum Income + detail_with_hierarchy account_type Expense + detail_with_hierarchy account_type diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index eb362455cd9..2d09753e584 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1260,9 +1260,7 @@ class account_invoice(osv.osv): ref = invoice.reference else: ref = self._convert_ref(cr, uid, invoice.number) - partner = invoice.partner_id - if partner.parent_id and not partner.is_company: - partner = partner.parent_id + partner = self.pool['res.partner']._find_accounting_partner(invoice.partner_id) # Pay attention to the sign for both debit/credit AND amount_currency l1 = { 'debit': direction * pay_amount>0 and direction * pay_amount, @@ -1733,15 +1731,17 @@ class res_partner(osv.osv): 'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True), } - def _find_accounting_partner(self, part): + def _find_accounting_partner(self, partner): ''' Find the partner for which the accounting entries will be created ''' + # FIXME: after 7.0, to replace by function field partner.commercial_partner_id + #if the chosen partner is not a company and has a parent company, use the parent for the journal entries #because you want to invoice 'Agrolait, accounting department' but the journal items are for 'Agrolait' - if part.parent_id and not part.is_company: - part = part.parent_id - return part + while not partner.is_company and partner.parent_id: + partner = partner.parent_id + return partner def copy(self, cr, uid, id, default=None, context=None): default = default or {} diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 8c7cec67ac5..046350f302e 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -320,7 +320,8 @@ + options='{"always_reload": True}' + domain="[('customer', '=', True)]"/> @@ -447,14 +448,14 @@ account.invoice - + - + diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 082d654c5a2..f681825491d 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -513,7 +513,8 @@ class account_move_line(osv.osv): if context.get('period_id', False): return context['period_id'] account_period_obj = self.pool.get('account.period') - ids = account_period_obj.find(cr, uid, context=context) + ctx = dict(context, account_period_prefer_normal=True) + ids = account_period_obj.find(cr, uid, context=ctx) period_id = False if ids: period_id = ids[0] @@ -625,7 +626,7 @@ class account_move_line(osv.osv): (_check_date, 'The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal.', ['date']), (_check_currency, 'The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal.', ['currency_id']), (_check_currency_and_amount, "You cannot create journal items with a secondary currency without recording both 'currency' and 'amount currency' field.", ['currency_id','amount_currency']), - (_check_currency_amount, 'The amount expressed in the secondary currency must be positif when journal item are debit and negatif when journal item are credit.', ['amount_currency']), + (_check_currency_amount, 'The amount expressed in the secondary currency must be positive when the journal item is a debit and negative when if it is a credit.', ['amount_currency']), (_check_currency_company, "You cannot provide a secondary currency if it is the same than the company one." , ['currency_id']), ] @@ -654,13 +655,7 @@ class account_move_line(osv.osv): } return result - def onchange_account_id(self, cr, uid, ids, account_id, context=None): - res = {'value': {}} - if account_id: - res['value']['account_tax_id'] = [x.id for x in self.pool.get('account.account').browse(cr, uid, account_id, context=context).tax_ids] - return res - - def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False): + def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False, context=None): partner_obj = self.pool.get('res.partner') payment_term_obj = self.pool.get('account.payment.term') journal_obj = self.pool.get('account.journal') @@ -674,8 +669,8 @@ class account_move_line(osv.osv): date = datetime.now().strftime('%Y-%m-%d') jt = False if journal: - jt = journal_obj.browse(cr, uid, journal).type - part = partner_obj.browse(cr, uid, partner_id) + jt = journal_obj.browse(cr, uid, journal, context=context).type + part = partner_obj.browse(cr, uid, partner_id, context=context) payment_term_id = False if jt and jt in ('purchase', 'purchase_refund') and part.property_supplier_payment_term: @@ -700,20 +695,20 @@ class account_move_line(osv.osv): elif part.supplier: val['account_id'] = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, id1) if val.get('account_id', False): - d = self.onchange_account_id(cr, uid, ids, val['account_id']) + d = self.onchange_account_id(cr, uid, ids, account_id=val['account_id'], partner_id=part.id, context=context) val.update(d['value']) return {'value':val} - def onchange_account_id(self, cr, uid, ids, account_id=False, partner_id=False): + def onchange_account_id(self, cr, uid, ids, account_id=False, partner_id=False, context=None): account_obj = self.pool.get('account.account') partner_obj = self.pool.get('res.partner') fiscal_pos_obj = self.pool.get('account.fiscal.position') val = {} if account_id: - res = account_obj.browse(cr, uid, account_id) + res = account_obj.browse(cr, uid, account_id, context=context) tax_ids = res.tax_ids if tax_ids and partner_id: - part = partner_obj.browse(cr, uid, partner_id) + part = partner_obj.browse(cr, uid, partner_id, context=context) tax_id = fiscal_pos_obj.map_tax(cr, uid, part and part.property_account_position or False, tax_ids)[0] else: tax_id = tax_ids and tax_ids[0].id or False diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index b8dcefdd3a4..d38684c2317 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1112,7 +1112,7 @@ - + @@ -1288,7 +1288,7 @@ - + @@ -1352,7 +1352,7 @@ - + diff --git a/addons/account/i18n/es_MX.po b/addons/account/i18n/es_MX.po index bf5d970bd61..0fa44286eec 100644 --- a/addons/account/i18n/es_MX.po +++ b/addons/account/i18n/es_MX.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-03-07 08:37+0000\n" -"PO-Revision-Date: 2013-03-26 18:06+0000\n" +"PO-Revision-Date: 2013-04-25 00:10+0000\n" "Last-Translator: Antonio Fregoso \n" "Language-Team: Spanish (Mexico) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-28 05:27+0000\n" -"X-Generator: Launchpad (build 16546)\n" +"X-Launchpad-Export-Date: 2013-04-26 06:23+0000\n" +"X-Generator: Launchpad (build 16580)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -4987,7 +4987,7 @@ msgstr "" #: model:account.account.type,name:account.conf_account_type_chk #: selection:account.bank.accounts.wizard,account_type:0 msgid "Check" -msgstr "" +msgstr "Cheque" #. module: account #: view:account.aged.trial.balance:0 diff --git a/addons/account/i18n/fr.po b/addons/account/i18n/fr.po index d6676248e19..b3bc2f57408 100644 --- a/addons/account/i18n/fr.po +++ b/addons/account/i18n/fr.po @@ -8,15 +8,15 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-03-07 08:37+0000\n" -"PO-Revision-Date: 2013-04-15 08:33+0000\n" +"PO-Revision-Date: 2013-04-23 12:11+0000\n" "Last-Translator: Frederic Clementi - Camptocamp.com " "\n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-04-16 05:27+0000\n" -"X-Generator: Launchpad (build 16564)\n" +"X-Launchpad-Export-Date: 2013-04-24 05:28+0000\n" +"X-Generator: Launchpad (build 16580)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -1326,6 +1326,20 @@ msgid "" "

\n" " " msgstr "" +"< class=\"oe_view_nocontent_create\">\n" +" Cliquer pour créer un nouvel historique de trésorerie\n" +"

\n" +" Un registre de trésorerie vous permet de gérer les entrées " +"de trésorerie dans votre journal de \n" +" trésorerie. Cette fonctionnalité vous permet de suivre " +"facilement les paiements\n" +" en espèce de façon journalière. Vous pouvez y enregistrer " +"les pièces \n" +" qui sont dans votre caisse, et ensuite écrire les entrées " +"lorsque l'argent rentre ou\n" +" sort de votre caisse.\n" +"

\n" +" " #. module: account #: model:account.account.type,name:account.data_account_type_bank @@ -2848,7 +2862,7 @@ msgstr "Lettrage par partenaire" #. module: account #: view:account.analytic.line:0 msgid "Fin. Account" -msgstr "" +msgstr "Compte financier" #. module: account #: field:account.tax,tax_code_id:0 @@ -2937,7 +2951,7 @@ msgstr "Coordonnées bancaires" #. module: account #: view:account.bank.statement:0 msgid "Cancel CashBox" -msgstr "" +msgstr "Annulation Caisse" #. module: account #: help:account.invoice,payment_term:0 @@ -3039,7 +3053,7 @@ msgstr "Erreur de paramétrage !" #: code:addons/account/account_bank_statement.py:433 #, python-format msgid "Statement %s confirmed, journal items were created." -msgstr "" +msgstr "Relevé %s confirmé, écritures comptables créées" #. module: account #: field:account.invoice.report,price_average:0 @@ -3238,7 +3252,7 @@ msgstr "" #: code:addons/account/account.py:1062 #, python-format msgid "You should choose the periods that belong to the same company." -msgstr "" +msgstr "Veuillez choisir des périodes qui appartiennent à la même société" #. module: account #: model:ir.actions.act_window,name:account.action_report_account_sales_tree_all @@ -4410,7 +4424,7 @@ msgstr "Compte fournisseur" #: code:addons/account/wizard/account_fiscalyear_close.py:88 #, python-format msgid "The periods to generate opening entries cannot be found." -msgstr "" +msgstr "Aucune période d'ouverture n'a été trouvée" #. module: account #: model:process.node,name:account.process_node_supplierpaymentorder0 diff --git a/addons/account/i18n/he.po b/addons/account/i18n/he.po index ba61f13a873..674a126f0c0 100644 --- a/addons/account/i18n/he.po +++ b/addons/account/i18n/he.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-03-07 08:37+0000\n" -"PO-Revision-Date: 2012-12-21 23:00+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2013-04-22 20:44+0000\n" +"Last-Translator: omer pines \n" "Language-Team: Hebrew \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-28 05:23+0000\n" -"X-Generator: Launchpad (build 16546)\n" +"X-Launchpad-Export-Date: 2013-04-23 06:09+0000\n" +"X-Generator: Launchpad (build 16580)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -45,28 +45,28 @@ msgstr "" #: view:account.bank.statement:0 #: view:account.move.line:0 msgid "Account Statistics" -msgstr "" +msgstr "סטטיסטיקות של החשבון" #. module: account #: view:account.invoice:0 msgid "Proforma/Open/Paid Invoices" -msgstr "" +msgstr "פְּרוֹ-פוֹרְמָה/פתוח/חשבוניות ששולמו" #. module: account #: field:report.invoice.created,residual:0 msgid "Residual" -msgstr "" +msgstr "שארית" #. module: account #: code:addons/account/account_bank_statement.py:368 #, python-format msgid "Journal item \"%s\" is not valid." -msgstr "" +msgstr "פריט היומן \"%s\" לא תקין." #. module: account #: model:ir.model,name:account.model_report_aged_receivable msgid "Aged Receivable Till Today" -msgstr "" +msgstr "גיול חייבים עד היום" #. module: account #: model:process.transition,name:account.process_transition_invoiceimport0 @@ -79,13 +79,13 @@ msgstr "" #: code:addons/account/account_move_line.py:1213 #, python-format msgid "Bad Account!" -msgstr "" +msgstr "חשבון שגוי!" #. module: account #: view:account.move:0 #: view:account.move.line:0 msgid "Total Debit" -msgstr "" +msgstr "סה\"כ חיוב" #. module: account #: constraint:account.account.template:0 @@ -93,6 +93,8 @@ msgid "" "Error!\n" "You cannot create recursive account templates." msgstr "" +"שגיאה!\n" +"לא ניתן לייצר תבניות חשבון רקורסיביות." #. module: account #. openerp-web @@ -123,6 +125,7 @@ msgid "" "If the active field is set to False, it will allow you to hide the payment " "term without removing it." msgstr "" +"אם השדה הפעיל מוגדר כשלילי, יתאפשר לך להסתיר את תקופת התשלום בלי להסירה." #. module: account #: code:addons/account/account.py:641 @@ -145,7 +148,7 @@ msgstr "" #: code:addons/account/wizard/account_validate_account_move.py:61 #, python-format msgid "Warning!" -msgstr "" +msgstr "אזהרה!" #. module: account #: code:addons/account/account.py:3159 @@ -161,12 +164,14 @@ msgid "" "which is set after generating opening entries from 'Generate Opening " "Entries'." msgstr "" +"עליך להגדיר את 'רישומי יומן לסוף השנה' לשנה הפיסקלית הזו, המוגדר אחרי יצירת " +"רישומים פתוחים מ'צור רישומים פתוחים'" #. module: account #: field:account.fiscal.position.account,account_src_id:0 #: field:account.fiscal.position.account.template,account_src_id:0 msgid "Account Source" -msgstr "" +msgstr "מקור החשבון" #. module: account #: model:ir.actions.act_window,help:account.action_account_period @@ -183,7 +188,7 @@ msgstr "" #. module: account #: model:ir.actions.act_window,name:account.action_view_created_invoice_dashboard msgid "Invoices Created Within Past 15 Days" -msgstr "" +msgstr "חשבוניות שנוצרו במהלך 15 הימים האחרונים" #. module: account #: field:accounting.report,label_filter:0 @@ -276,7 +281,7 @@ msgstr "" #. module: account #: view:account.analytic.chart:0 msgid "Select the Period for Analysis" -msgstr "" +msgstr "בחירת תקופה לניתוח" #. module: account #: model:ir.actions.act_window,help:account.action_invoice_tree3 diff --git a/addons/account/i18n/nl.po b/addons/account/i18n/nl.po index d1b10df8122..ea215b2a9e8 100644 --- a/addons/account/i18n/nl.po +++ b/addons/account/i18n/nl.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-03-07 08:37+0000\n" -"PO-Revision-Date: 2013-04-16 11:34+0000\n" +"PO-Revision-Date: 2013-04-17 19:01+0000\n" "Last-Translator: Erwin van der Ploeg (Endian Solutions) \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-04-17 05:57+0000\n" +"X-Launchpad-Export-Date: 2013-04-18 06:05+0000\n" "X-Generator: Launchpad (build 16567)\n" #. module: account @@ -11105,7 +11105,7 @@ msgstr "Niet-gerealiseerde winst of verlies" #: view:account.move:0 #: view:account.move.line:0 msgid "States" -msgstr "Provincies" +msgstr "Statussen" #. module: account #: help:product.category,property_account_income_categ:0 diff --git a/addons/account/i18n/pt_BR.po b/addons/account/i18n/pt_BR.po index e8fb05c6d66..3722a023ed1 100644 --- a/addons/account/i18n/pt_BR.po +++ b/addons/account/i18n/pt_BR.po @@ -8,15 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-03-07 08:37+0000\n" -"PO-Revision-Date: 2013-03-16 04:18+0000\n" -"Last-Translator: Fábio Martinelli - http://zupy.com.br " -"\n" +"PO-Revision-Date: 2013-04-22 03:12+0000\n" +"Last-Translator: Thiago Tognoli \n" "Language-Team: Brazilian Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-28 05:26+0000\n" -"X-Generator: Launchpad (build 16546)\n" +"X-Launchpad-Export-Date: 2013-04-23 06:09+0000\n" +"X-Generator: Launchpad (build 16580)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -437,7 +436,7 @@ msgstr "Cancelar fatura" #. module: account #: selection:account.journal,type:0 msgid "Purchase Refund" -msgstr "Devolução da Venda" +msgstr "Devolução de Compra" #. module: account #: selection:account.journal,type:0 @@ -9991,7 +9990,7 @@ msgstr "Situação do fechamento de Ano Fiscal e períodos" #. module: account #: field:account.config.settings,purchase_refund_journal_id:0 msgid "Purchase refund journal" -msgstr "Diário de Devolução de Vendas" +msgstr "Diário de Devolução de Compras" #. module: account #: view:account.analytic.line:0 diff --git a/addons/account/i18n/tr.po b/addons/account/i18n/tr.po index 67cfd37875e..4784dd9d075 100644 --- a/addons/account/i18n/tr.po +++ b/addons/account/i18n/tr.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-03-07 08:37+0000\n" -"PO-Revision-Date: 2013-04-13 17:18+0000\n" +"PO-Revision-Date: 2013-04-21 01:20+0000\n" "Last-Translator: Ayhan KIZILTAN \n" "Language-Team: OpenERP Türkiye Yerelleştirmesi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-04-14 05:49+0000\n" -"X-Generator: Launchpad (build 16564)\n" +"X-Launchpad-Export-Date: 2013-04-23 06:09+0000\n" +"X-Generator: Launchpad (build 16580)\n" "Language: tr\n" #. module: account @@ -429,7 +429,7 @@ msgstr "Oluşturma tarihi" #. module: account #: view:account.invoice:0 msgid "Cancel Invoice" -msgstr "Faturayı İptalet" +msgstr "Fatura İptal et" #. module: account #: selection:account.journal,type:0 @@ -1391,7 +1391,7 @@ msgstr "" #. module: account #: view:account.invoice.cancel:0 msgid "Cancel Invoices" -msgstr "Faturaları İptal Et" +msgstr "Faturaları İptal et" #. module: account #: help:account.journal,code:0 @@ -4048,7 +4048,7 @@ msgstr "Vergi Tablosu" #. module: account #: view:account.journal:0 msgid "Search Account Journal" -msgstr "Günlük Hesabı Ara" +msgstr "Hesap Günlüğü Ara" #. module: account #: model:ir.actions.act_window,name:account.action_invoice_tree_pending_invoice @@ -4869,7 +4869,7 @@ msgstr "" #. module: account #: model:ir.model,name:account.model_account_invoice_cancel msgid "Cancel the Selected Invoices" -msgstr "Seçilen Faturaları İptal Et" +msgstr "Seçilen Faturaları İptal et" #. module: account #: code:addons/account/account_bank_statement.py:423 @@ -5350,7 +5350,7 @@ msgstr "Onaylandı" #. module: account #: report:account.invoice:0 msgid "Cancelled Invoice" -msgstr "İptal Fatura" +msgstr "İptal edilmiş fatura" #. module: account #: view:account.invoice:0 @@ -5681,7 +5681,7 @@ msgstr "KDV Hesabı Bildirimi" #. module: account #: view:account.bank.statement:0 msgid "Cancel Statement" -msgstr "Hesap özeti İptal et" +msgstr "Hesap Özeti İptal" #. module: account #: help:account.config.settings,module_account_accountant:0 @@ -6016,7 +6016,7 @@ msgstr "" #. module: account #: field:account.journal,update_posted:0 msgid "Allow Cancelling Entries" -msgstr "Kayıtları iptale izin ver" +msgstr "Kayıtları İptale İzin ver" #. module: account #: code:addons/account/wizard/account_use_model.py:44 @@ -7243,7 +7243,7 @@ msgstr "Kullanıcı Hatası!" #. module: account #: view:account.open.closed.fiscalyear:0 msgid "Discard" -msgstr "Gözardı et" +msgstr "Vazgeç" #. module: account #: selection:account.account,type:0 @@ -7627,7 +7627,7 @@ msgstr "Elle" #. module: account #: selection:account.invoice.refund,filter_refund:0 msgid "Cancel: create refund and reconcile" -msgstr "İptal: İade oluştur ve uzlaştır" +msgstr "İptal: iade oluştur ve uzlaştır" #. module: account #: code:addons/account/wizard/account_report_aged_partner_balance.py:58 @@ -10617,8 +10617,8 @@ msgid "" "Selected invoice(s) cannot be cancelled as they are already in 'Cancelled' " "or 'Done' state." msgstr "" -"Seçili fatura(lar) halihazırda 'İptal edildi' ya da 'Yapıldı' durumunda " -"olduğundan iptal edilemez." +"Seçili fatura(lar) zaten 'İptal edildi' ya da 'Yapıldı' durumunda olduğundan " +"iptal edilemez." #. module: account #: report:account.analytic.account.quantity_cost_ledger:0 diff --git a/addons/account/installer.py b/addons/account/installer.py index 7ef1b59dcbd..776b4dfe0e2 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -171,7 +171,7 @@ class account_installer(osv.osv_memory): chart = self.read(cr, uid, ids, ['charts'], context=context)[0]['charts'] _logger.debug('Installing chart of accounts %s', chart) - return (modules | set([chart])) - set(['has_default_company']) + return (modules | set([chart])) - set(['has_default_company', 'configurable']) account_installer() diff --git a/addons/account/partner.py b/addons/account/partner.py index ae8d2fc1871..4914a17dd2b 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -236,6 +236,11 @@ class res_partner(osv.osv): 'last_reconciliation_date': fields.datetime('Latest Full Reconciliation Date', help='Date on which the partner accounting entries were fully reconciled last time. It differs from the last date where a reconciliation has been made for this partner, as here we depict the fact that nothing more was to be reconciled at this date. This can be achieved in 2 different ways: either the last unreconciled debit/credit entry of this partner was reconciled, either the user pressed the button "Nothing more to reconcile" during the manual reconciliation process.') } + def _commercial_fields(self, cr, uid, context=None): + return super(res_partner, self)._commercial_fields(cr, uid, context=context) + \ + ['debit_limit', 'property_account_payable', 'property_account_receivable', 'property_account_position', + 'property_payment_term', 'property_supplier_payment_term', 'last_reconciliation_date'] + res_partner() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index 1267e20165b..abded67f6ab 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -73,7 +73,7 @@ - + @@ -103,6 +103,11 @@
+ +
+

Accounting-related settings are managed on

+
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index aa567d2fc79..79a1e76c7e7 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -31,7 +31,7 @@ - + diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py index d53e6153981..6dd451599b4 100644 --- a/addons/account/report/account_entries_report.py +++ b/addons/account/report/account_entries_report.py @@ -81,7 +81,8 @@ class account_entries_report(osv.osv): period_obj = self.pool.get('account.period') for arg in args: if arg[0] == 'period_id' and arg[2] == 'current_period': - current_period = period_obj.find(cr, uid)[0] + ctx = dict(context or {}, account_period_prefer_normal=True) + current_period = period_obj.find(cr, uid, context=ctx)[0] args.append(['period_id','in',[current_period]]) break elif arg[0] == 'period_id' and arg[2] == 'current_year': @@ -100,7 +101,8 @@ class account_entries_report(osv.osv): fiscalyear_obj = self.pool.get('account.fiscalyear') period_obj = self.pool.get('account.period') if context.get('period', False) == 'current_period': - current_period = period_obj.find(cr, uid)[0] + ctx = dict(context, account_period_prefer_normal=True) + current_period = period_obj.find(cr, uid, context=ctx)[0] domain.append(['period_id','in',[current_period]]) elif context.get('year', False) == 'current_year': current_year = fiscalyear_obj.find(cr, uid) diff --git a/addons/account/static/src/js/account_move_reconciliation.js b/addons/account/static/src/js/account_move_reconciliation.js index dbbfe3cc069..cbc0abc4f4d 100644 --- a/addons/account/static/src/js/account_move_reconciliation.js +++ b/addons/account/static/src/js/account_move_reconciliation.js @@ -26,7 +26,7 @@ openerp.account = function (instance) { if (this.partners) { this.$el.prepend(QWeb.render("AccountReconciliation", {widget: this})); this.$(".oe_account_recon_previous").click(function() { - self.current_partner = (self.current_partner - 1) % self.partners.length; + self.current_partner = (((self.current_partner - 1) % self.partners.length) + self.partners.length) % self.partners.length; self.search_by_partner(); }); this.$(".oe_account_recon_next").click(function() { diff --git a/addons/account/wizard/account_reconcile.py b/addons/account/wizard/account_reconcile.py index 81609249fd7..28de637d16f 100644 --- a/addons/account/wizard/account_reconcile.py +++ b/addons/account/wizard/account_reconcile.py @@ -84,7 +84,8 @@ class account_move_line_reconcile(osv.osv_memory): context = {} date = time.strftime('%Y-%m-%d') - ids = period_obj.find(cr, uid, dt=date, context=context) + ctx = dict(context or {}, account_period_prefer_normal=True) + ids = period_obj.find(cr, uid, dt=date, context=ctx) if ids: period_id = ids[0] account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id, @@ -149,7 +150,7 @@ class account_move_line_reconcile_writeoff(osv.osv_memory): context['analytic_id'] = data['analytic_id'][0] if context['date_p']: date = context['date_p'] - + context['account_period_prefer_normal'] = True ids = period_obj.find(cr, uid, dt=date, context=context) if ids: period_id = ids[0] diff --git a/addons/account/wizard/account_tax_chart.py b/addons/account/wizard/account_tax_chart.py index 84859e2077c..da2e9677739 100644 --- a/addons/account/wizard/account_tax_chart.py +++ b/addons/account/wizard/account_tax_chart.py @@ -38,7 +38,8 @@ class account_tax_chart(osv.osv_memory): def _get_period(self, cr, uid, context=None): """Return default period value""" - period_ids = self.pool.get('account.period').find(cr, uid) + ctx = dict(context or {}, account_period_prefer_normal=True) + period_ids = self.pool.get('account.period').find(cr, uid, context=ctx) return period_ids and period_ids[0] or False def account_tax_chart_open_window(self, cr, uid, ids, context=None): diff --git a/addons/account_accountant/i18n/lt.po b/addons/account_accountant/i18n/lt.po index df1844b3347..e105a419419 100644 --- a/addons/account_accountant/i18n/lt.po +++ b/addons/account_accountant/i18n/lt.po @@ -8,16 +8,16 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2013-03-07 08:37+0000\n" -"PO-Revision-Date: 2012-12-21 23:00+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2013-04-24 18:15+0000\n" +"Last-Translator: Giedrius Slavinskas - inovera.lt \n" "Language-Team: Lithuanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-28 05:28+0000\n" -"X-Generator: Launchpad (build 16546)\n" +"X-Launchpad-Export-Date: 2013-04-25 06:05+0000\n" +"X-Generator: Launchpad (build 16580)\n" #. module: account_accountant #: model:ir.actions.client,name:account_accountant.action_client_account_menu msgid "Open Accounting Menu" -msgstr "" +msgstr "Atverti apskaitos meniu" diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index a187f9452f5..89e39c71660 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -206,17 +206,14 @@ class account_analytic_account(osv.osv): return res if child_ids: - cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(amount), 0.0) \ - FROM account_analytic_line \ - JOIN account_analytic_journal \ - ON account_analytic_line.journal_id = account_analytic_journal.id \ - WHERE account_analytic_line.account_id IN %s \ - AND account_analytic_journal.type = 'sale' \ - GROUP BY account_analytic_line.account_id", (child_ids,)) - for account_id, sum in cr.fetchall(): - res[account_id] = round(sum,2) + #Search all invoice lines not in cancelled state that refer to this analytic account + inv_line_obj = self.pool.get("account.invoice.line") + inv_lines = inv_line_obj.search(cr, uid, ['&', ('account_analytic_id', 'in', child_ids), ('invoice_id.state', '!=', 'cancel')], context=context) + for line in inv_line_obj.browse(cr, uid, inv_lines, context=context): + res[line.account_analytic_id.id] += line.price_subtotal for acc in self.browse(cr, uid, res.keys(), context=context): res[acc.id] = res[acc.id] - (acc.timesheet_ca_invoiced or 0.0) + res_final = res return res_final @@ -543,6 +540,23 @@ class account_analytic_account(osv.osv): pass return result + + def hr_to_invoice_timesheets(self, cr, uid, ids, context=None): + domain = [('invoice_id','=',False),('to_invoice','!=',False), ('journal_id.type', '=', 'general'), ('account_id', 'in', ids)] + names = [record.name for record in self.browse(cr, uid, ids, context=context)] + name = _('Timesheets to Invoice of %s') % ','.join(names) + return { + 'type': 'ir.actions.act_window', + 'name': name, + 'view_type': 'form', + 'view_mode': 'tree,form', + 'domain' : domain, + 'res_model': 'account.analytic.line', + 'nodestroy': True, + } + + + class account_analytic_account_summary_user(osv.osv): _name = "account_analytic_analysis.summary.user" _description = "Hours Summary by User" diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml index a9437267611..c70a2493be9 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml @@ -98,8 +98,8 @@ -