From c8a0a2a19165323500a15b4080512286174bf0d3 Mon Sep 17 00:00:00 2001 From: "pap (openerp)" Date: Thu, 17 Jun 2010 18:47:58 +0530 Subject: [PATCH 01/56] [IMP]: 1) added missing wizards under Financial Management/Periodical Processing 2) added entry_type on move line for different types of invoices bzr revid: pap@tinyerp.co.in-20100617131758-668hhpu1q1qkmt20 --- addons/account/account_view.xml | 22 +++++++++---------- addons/account/invoice.py | 21 +++++++++++++++--- .../account_subscription_generate_view.xml | 2 +- .../account/wizard/account_use_model_view.xml | 4 ++-- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index cf117613189..694a48177d9 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1022,7 +1022,7 @@ - Journal Entries + Journal Vouchers account.move form tree,form @@ -1033,7 +1033,7 @@ - Journal Items + Receivable Entries account.move form tree,form @@ -1045,7 +1045,7 @@ - Transaction Journals + Payable Entries account.move form tree,form @@ -1167,20 +1167,20 @@ form,tree - - - - - + - - - + company_currency # create one move line for the total and possibly adjust the other lines amount @@ -847,7 +854,7 @@ class account_invoice(osv.osv): line = self.finalize_invoice_move_lines(cr, uid, inv, line) - move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date} + move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date, 'type': entry_type} period_id=inv.period_id and inv.period_id.id or False 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'))]) @@ -1070,10 +1077,18 @@ class account_invoice(osv.osv): else: amount_currency = False currency_id = False + entry_type='' if invoice.type in ('in_invoice', 'in_refund'): ref = invoice.reference + entry_type = 'journal_pur_voucher' + if invoice.type in ('in_refund'): + entry_type = 'cont_voucher' else: ref = self._convert_ref(cr, uid, invoice.number) + entry_type = 'journal_sale_vou' + if invoice.type in ('out_refund'): + entry_type = 'cont_voucher' + # Pay attention to the sign for both debit/credit AND amount_currency l1 = { 'debit': direction * pay_amount>0 and direction * pay_amount, @@ -1104,7 +1119,7 @@ class account_invoice(osv.osv): l2['name'] = name lines = [(0, 0, l1), (0, 0, l2)] - move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date} + move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date, 'type': entry_type} move_id = self.pool.get('account.move').create(cr, uid, move, context=context) line_ids = [] diff --git a/addons/account/wizard/account_subscription_generate_view.xml b/addons/account/wizard/account_subscription_generate_view.xml index cfe91171621..ad0e4f958d1 100644 --- a/addons/account/wizard/account_subscription_generate_view.xml +++ b/addons/account/wizard/account_subscription_generate_view.xml @@ -32,7 +32,7 @@ new - + diff --git a/addons/account/wizard/account_use_model_view.xml b/addons/account/wizard/account_use_model_view.xml index 6ca3de7aa65..9ff781ea53c 100644 --- a/addons/account/wizard/account_use_model_view.xml +++ b/addons/account/wizard/account_use_model_view.xml @@ -41,8 +41,8 @@ account.move.line - - + account.use.model.open.entry.form From d07e43933180eddde1232c133425bb7c49a094de Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 18 Jun 2010 11:54:39 +0530 Subject: [PATCH 02/56] [Fix] Stock: Fix the problem of key error orgin for outgoing picking bzr revid: sbh@tinyerp.com-20100618062439-91tah2gr61jqgdvq --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 06f3fa44e55..ff9318739e3 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -559,7 +559,7 @@ class stock_picking(osv.osv): } new_id = super(stock_picking, self).create(cr, user, vals, context) if not vals.get('auto_picking', False): - message = type_list.get(vals.get('type', False), _('Picking')) + " '" + (vals['name'] or "n/a") + _(" with origin")+" '" + (vals['origin'] or "n/a") + "' "+ _("is created.") + message = type_list.get(vals.get('type', False), _('Picking')) + " '" + (vals['name'] or "n/a") + _(" with origin")+" '" + (vals.get('origin') or "n/a") + "' "+ _("is created.") self.log(cr, user, new_id, message) return new_id From 360afadc80f2ff97c1e41a21c402c99ba9205645 Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Fri, 18 Jun 2010 11:55:20 +0530 Subject: [PATCH 03/56] [IMP] account: Improve the wizard view, accunt_analytic_plan:Improve form view bzr revid: psi@tinyerp.co.in-20100618062520-b0ry32hrod0cmtsr --- addons/account/project/project_view.xml | 2 +- ...ic_cost_ledger_for_journal_report_view.xml | 26 ++++++++++--------- .../account_analytic_plans_view.xml | 6 ++--- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 067fbd38ab1..6f2f6e39fe5 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -148,7 +148,7 @@ - + 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 1ad974e8650..204bb7c8de8 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 @@ -7,18 +7,20 @@ account.analytic.cost.ledger.journal.report form -
- - - - - - - -