From 62354263a2cabc0df4925ecacc20723ee7032624 Mon Sep 17 00:00:00 2001 From: "Reporting Team(JNI OpenERP)" <> Date: Tue, 7 Sep 2010 14:34:08 +0530 Subject: [PATCH 01/39] [IMP] hr_*:Improve dashboards as per piratepad bzr revid: psi@tinyerp.co.in-20100907090408-oxk6zfi4u3370yhf --- addons/hr_holidays/board_hr_holidays_view.xml | 114 +++++++++++------- .../board_hr_recruitment_statistical_view.xml | 35 ++++++ .../board_hr_timesheet_invoice.xml | 43 ++++++- .../security/ir.model.access.csv | 1 + .../board_hr_timesheet_view.xml | 37 ++++-- 5 files changed, 177 insertions(+), 53 deletions(-) diff --git a/addons/hr_holidays/board_hr_holidays_view.xml b/addons/hr_holidays/board_hr_holidays_view.xml index 4f3f2142447..54fe8153bf2 100644 --- a/addons/hr_holidays/board_hr_holidays_view.xml +++ b/addons/hr_holidays/board_hr_holidays_view.xml @@ -2,50 +2,78 @@ - - My Leaves - ir.actions.act_window - hr.holidays - form - tree,form - [('user_id','=',uid)] - - - - - Remaining Leaves by User - ir.actions.act_window - hr.holidays.remaining.leaves.user - form - graph,tree - [('user_id','=',uid)] - - + + My Leaves + ir.actions.act_window + hr.holidays + form + tree,form + [('user_id','=',uid)] + + - - board.hr.holidays.form - board.board - - form - - - - - + + Remaining Leaves by User + ir.actions.act_window + hr.holidays.remaining.leaves.user + form + graph,tree + [('user_id','=',uid)] + + + + + hr.holidays.awaited.response.tree + hr.holidays + tree + + + + + + + + + + + + + Holidays Awaited For Response + ir.actions.act_window + hr.holidays + form + tree,form + [('state','in',('confirm','validate1'))] + + + + + board.hr.holidays.form + board.board + + form + + + + + + + + + - - board.hr.holidays.remaining.form - board.board - form - - - - - - - - + --> + diff --git a/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml b/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml index 14710cf8f37..59b9aaca546 100644 --- a/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml +++ b/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml @@ -2,5 +2,40 @@ + + applicants.status.tree + hr.applicant + tree + + + + + + + + + + + + + Applicants Status + ir.actions.act_window + hr.applicant + form + tree,form + [('state','in',('draft','open'))] + + + + + board.hr.applicants.status.form + board.board + + + + + + + diff --git a/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml b/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml index 78945f73f4e..2d38011f279 100644 --- a/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml +++ b/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml @@ -28,13 +28,50 @@ board.hr.timesheet.invoice board.board - form + form - - + + + + + timesheet.uninvoiced.line.tree + report.timesheet.line + tree + + + + + + + + + + + + + Uninvoice lines with billing rate + report.timesheet.line + form + form,tree + [('invoice_id','=',False)] + + + + + board.hr.timesheet.uninvoiced.form + board.board + form + + + + + + + + diff --git a/addons/hr_timesheet_invoice/security/ir.model.access.csv b/addons/hr_timesheet_invoice/security/ir.model.access.csv index 0d65ae44f1b..619fc6344cf 100644 --- a/addons/hr_timesheet_invoice/security/ir.model.access.csv +++ b/addons/hr_timesheet_invoice/security/ir.model.access.csv @@ -11,3 +11,4 @@ "access_report_random_timesheet_lines","random_timesheet_lines","model_random_timesheet_lines","base.group_hr_manager",1,0,0,0 "access_report_analytic_account_close_system","report.analytic.account.close system","model_report_analytic_account_close","base.group_system",1,1,1,1 "access_report_account_analytic_line_to_invoice_system","report.account.analytic.line.to.invoice system","model_report_account_analytic_line_to_invoice","base.group_system",1,1,1,1 +"access_report_timesheet_line","report.timesheet.line","model_report_timesheet_line","base.group_hr_manager",1,0,0,0 diff --git a/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml b/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml index 70d36184980..aefed275256 100644 --- a/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml +++ b/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml @@ -1,7 +1,8 @@ - + + Timesheets by Month ir.actions.act_window timesheet.report @@ -9,9 +10,9 @@ graph,tree [('user_id','=',uid), ('month', '=' , time.strftime('%m')), ('year', '=', time.strftime('%Y'))] - + - + Timesheets ir.actions.act_window hr_timesheet_sheet.sheet @@ -20,17 +21,39 @@ + + Employee Attendance Graph + timesheet.report + graph + + + + + + + + + + + Employee Attendance Graph + timesheet.report + form + graph + + + board.hr.timesheet.form board.board - + form - - - + + + + hr.timesheet.sheet.tree.simplified.board hr_timesheet_sheet.sheet From b46bbb5e6565624c1bd3ca797ac4b3b225272e2d Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Tue, 7 Sep 2010 14:47:38 +0530 Subject: [PATCH 02/39] [FIX] Account: Bank statement => onchange on partner with st. line -> if line does not save then amount taken from context bzr revid: mra@mra-laptop-20100907091738-b9abe0896v252zrb --- addons/account/account_bank_statement.py | 2 +- addons/account/account_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 91d8efc72ce..8ab1c6d7ac9 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -644,7 +644,7 @@ class account_bank_statement_line(osv.osv): account_id = part.property_account_receivable.id res['value']['account_id'] = account_id - if account_id and (not line or (line and not line[0].amount)): + if account_id and (not line or (line and not line[0].amount)) and not context.get('amount', False): company_currency_id = res_users_obj.browse(cursor, user, user, context=context).company_id.currency_id.id if not currency_id: diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 47b675386f6..6643370f0c4 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -538,7 +538,7 @@ - + From f2aa58f49666c2cd095713c4704409e21b22a6d9 Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Tue, 7 Sep 2010 16:39:30 +0530 Subject: [PATCH 03/39] [FIX] hr_recruitment: Fix the dashboard view bzr revid: psi@tinyerp.co.in-20100907110930-b48cbzexhggpsrlb --- addons/hr_recruitment/board_hr_recruitment_statistical_view.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml b/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml index 59b9aaca546..5304f95ea52 100644 --- a/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml +++ b/addons/hr_recruitment/board_hr_recruitment_statistical_view.xml @@ -31,6 +31,8 @@ board.hr.applicants.status.form board.board + form + From 59f2e4dcbd39996b551f9f9cfa759a367b7ca48c Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 7 Sep 2010 17:24:14 +0530 Subject: [PATCH 04/39] [FIX]: fix a problem for selecting a correct account on change payment method bzr revid: mga@tinyerp.com-20100907115414-heu14yxy06ewp89j --- addons/account_voucher/voucher.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index 012a386fa13..6d4e6dc871e 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -427,23 +427,23 @@ class account_voucher(osv.osv): # TODO def onchange_payment(self, cr, uid, ids, pay_now, journal_id, partner_id, ttype='sale'): + res = {} if not partner_id: - return {} - partner_pool = self.pool.get('res.partner') + return res res = {'account_id':False} + partner_pool = self.pool.get('res.partner') + journal_pool = self.pool.get('account.journal') if pay_now == 'pay_later': partner = partner_pool.browse(cr, uid, partner_id) - if ttype == 'sale': - res.update({ - 'account_id':partner.property_account_receivable.id, - }) - elif ttype == 'purchase': - res.update({ - 'account_id':partner.property_account_payable.id, - }) - return { - 'value':res - } + journal = journal_pool.browse(cr, uid, journal_id) + if journal.type in ('sale','sale_refund'): + account_id = partner.property_account_receivable.id + elif journal.type in ('purchase', 'purchase_refund','expense'): + account_id = partner.property_account_payable.id + else: + account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id + res['account_id'] = account_id + return {'value':res} def action_move_line_create(self, cr, uid, ids, *args): From 039ef25d0da26ebdd88259486ce84ae1c14fb481 Mon Sep 17 00:00:00 2001 From: vra Date: Tue, 7 Sep 2010 17:27:28 +0530 Subject: [PATCH 05/39] [ADD] added access rights for Analytic Accounting group including menus. [REM] Extended group for analytic related menus. [FIX] Analytic Entries date Order. [FIX] Assigning sale price with proper sign in product_id onchange in analytic line. bzr revid: vra@tinyerp.com-20100907115728-n09gkjycdr32ej77 --- addons/account/account_analytic_line.py | 24 +++++++++--- addons/account/account_menuitem.xml | 6 +-- addons/account/project/project_view.xml | 5 ++- .../wizard/account_analytic_chart_view.xml | 3 +- .../account_analytic_entries_report_view.xml | 2 +- addons/account/security/account_security.xml | 2 +- addons/account/security/analytic_security.xml | 38 +++++++++++++++---- .../account_analytic_plans_view.xml | 2 +- .../analytic/security/analytic_security.xml | 2 +- addons/analytic/security/ir.model.access.csv | 7 ++++ 10 files changed, 68 insertions(+), 23 deletions(-) diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 9126a610aea..5a8ee0d4e8c 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -46,7 +46,7 @@ class account_analytic_line(osv.osv): 'date': lambda *a: time.strftime('%Y-%m-%d'), 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c), } - _order = 'date' + _order = 'date desc' def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): if context is None: @@ -73,13 +73,16 @@ class account_analytic_line(osv.osv): # Compute the cost based on the price type define into company # property_valuation_price_type property def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount,company_id, - unit=False, context=None): + unit=False, journal_id=False, context=None): if context==None: context={} uom_obj = self.pool.get('product.uom') product_obj = self.pool.get('product.product') company_obj=self.pool.get('res.company') + analytic_journal_obj=self.pool.get('account.analytic.journal') + product_price_type_obj = self.pool.get('product.price.type') if prod_id: + result = 0.0 prod = product_obj.browse(cr, uid, prod_id) a = prod.product_tmpl_id.property_account_expense.id if not a: @@ -91,16 +94,27 @@ class account_analytic_line(osv.osv): (prod.name, prod.id,)) if not company_id: company_id=company_obj._company_default_get(cr, uid, 'account.analytic.line', context) - + flag = False # Compute based on pricetype - pricetype=self.pool.get('product.price.type').browse(cr, uid, company_obj.browse(cr,uid,company_id).property_valuation_price_type.id) + pricetype=product_price_type_obj.browse(cr, uid, company_obj.browse(cr,uid,company_id).property_valuation_price_type.id) + if journal_id: + journal = analytic_journal_obj.browse(cr, uid, journal_id) + if journal.type == 'sale': + product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context) + if product_price_type_ids: + pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0] # Take the company currency as the reference one + if pricetype.field == 'list_price': + flag = True amount_unit = prod.price_get(pricetype.field, context)[prod.id] amount = amount_unit*unit_amount or 1.0 prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') amount = amount_unit*unit_amount or 1.0 + result = round(amount, prec) + if not flag: + result *= -1 return {'value': { - 'amount': - round(amount, prec), + 'amount': result, 'general_account_id': a, }} return {} diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml index 4860f937966..050a12580fc 100644 --- a/addons/account/account_menuitem.xml +++ b/addons/account/account_menuitem.xml @@ -19,11 +19,11 @@ - - + + - + + @@ -174,7 +175,7 @@ - + @@ -259,7 +260,7 @@ - + diff --git a/addons/account/project/wizard/account_analytic_chart_view.xml b/addons/account/project/wizard/account_analytic_chart_view.xml index 9cc7a32633b..ebfdb1a1194 100644 --- a/addons/account/project/wizard/account_analytic_chart_view.xml +++ b/addons/account/project/wizard/account_analytic_chart_view.xml @@ -38,8 +38,7 @@ parent="account.menu_finance_charts" action="action_account_analytic_chart" id="menu_action_analytic_account_tree2" - icon="STOCK_INDENT" - groups="base.group_extended"/> + icon="STOCK_INDENT"/> diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml index bc40e6235d7..f7e543cb22c 100644 --- a/addons/account/report/account_analytic_entries_report_view.xml +++ b/addons/account/report/account_analytic_entries_report_view.xml @@ -107,7 +107,7 @@ A tool search lets you know statistics on your analytics records that match your needs. - + diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml index 43e3e32eefd..7344c40754e 100644 --- a/addons/account/security/account_security.xml +++ b/addons/account/security/account_security.xml @@ -13,7 +13,7 @@ Accounting / Manager - + Accounting / Accountant and Manager diff --git a/addons/account/security/analytic_security.xml b/addons/account/security/analytic_security.xml index b2543f5fa05..87584a4ef28 100644 --- a/addons/account/security/analytic_security.xml +++ b/addons/account/security/analytic_security.xml @@ -2,27 +2,51 @@ - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml index ae2b6612a64..e732b483730 100644 --- a/addons/account_analytic_plans/account_analytic_plans_view.xml +++ b/addons/account_analytic_plans/account_analytic_plans_view.xml @@ -196,7 +196,7 @@ parent="account.menu_analytic_accounting" name="Multi Plans" id="menu_account_analytic_multi_plan_action" - /> + groups="analytic.group_analytic_accounting"/> [('company_id','=',user.company_id.id)] - + Analytic Accounting diff --git a/addons/analytic/security/ir.model.access.csv b/addons/analytic/security/ir.model.access.csv index 0343f29f43a..73dba08900c 100644 --- a/addons/analytic/security/ir.model.access.csv +++ b/addons/analytic/security/ir.model.access.csv @@ -1 +1,8 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_account_analytic_line_analytic_accounting","account.analytic.line","analytic.model_account_analytic_line","analytic.group_analytic_accounting",1,1,1,1 +"access_account_analytic_account_analytic_accounting","account.analytic.account","analytic.model_account_analytic_account","analytic.group_analytic_accounting",1,1,1,1 +"access_account_analytic_journal_analytic_accounting","account.analytic.journal","account.model_account_analytic_journal","analytic.group_analytic_accounting",1,1,1,1 +"access_account_account_analytic_accounting","account.account","account.model_account_account","analytic.group_analytic_accounting",1,0,0,0 +"access_product_template_analytic_accounting","product.template","product.model_product_template","analytic.group_analytic_accounting",1,0,0,0 +"access_product_product_analytic_accounting","product.product","product.model_product_product","analytic.group_analytic_accounting",1,0,0,0 +"access_product_category_analytic_accounting","product.category","product.model_product_category","analytic.group_analytic_accounting",1,0,0,0 From 56cc7bd843e022a422b3a4caf05b174fcb7cdee8 Mon Sep 17 00:00:00 2001 From: vra Date: Tue, 7 Sep 2010 19:47:36 +0530 Subject: [PATCH 06/39] [IMP] account, account_voucher: Improved the account voucher report. bzr revid: vra@tinyerp.com-20100907141736-5uacdxkioctsmo1o --- addons/account/report/voucher_print.rml | 372 ++++++++------- .../account_voucher/report/report_voucher.py | 2 +- .../account_voucher/report/report_voucher.rml | 328 +++++++------ .../report/report_voucher_amount.py | 2 +- .../report/report_voucher_amount.rml | 447 +++++++++--------- 5 files changed, 590 insertions(+), 561 deletions(-) diff --git a/addons/account/report/voucher_print.rml b/addons/account/report/voucher_print.rml index ac380c0a5a5..08e2f378c6a 100644 --- a/addons/account/report/voucher_print.rml +++ b/addons/account/report/voucher_print.rml @@ -2,7 +2,7 @@ @@ -10,37 +10,80 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + @@ -50,35 +93,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - + @@ -130,72 +157,62 @@ + + - [[ repeatIn(objects,'voucher') ]] - [[ company.name ]] - [[ company.partner_id.address and company.partner_id.address[0].street ]] - [[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]] - [[ company.partner_id.address and company.partner_id.address[0].phone ]] - [[ company.partner_id.address and company.partner_id.address[0].email ]] - - + + [[ repeatIn(objects,'voucher') ]] - [[ voucher.journal_id.name ]] - - - - + - Name: + Type: - [[ voucher.name ]] + [[ voucher.journal_id.name ]] - - - + Name: - Dated : - - - [[ formatLang(voucher.date, date=True) or '' ]] - - - - - State : - - - PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]] - Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]] - Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]] - Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]] - - - - - - - - Ref. : - - - [[ voucher.ref]] + [[ voucher.name ]] - + + + + Date: + + + [[ formatLang(voucher.date , date=True) or '' ]] + + + State: + + + PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]] + Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]] + Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]] + Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]] + + + Ref. : + + + [[ voucher.ref]] + + + + - + - + Particulars @@ -213,7 +230,7 @@
[[ repeatIn(voucher.line_id,'line_id') ]] - + [[ (line_id.partner_id and line_id.partner_id.name) or 'Account']] @@ -242,7 +259,7 @@ - [[ line_id.name ]]-[[voucher.ref]] + [[ line_id.name ]]-[[voucher.ref]] @@ -260,13 +277,73 @@
- + - + - Through : + Through : + + + + + + + + + + + + + + + [[ voucher.narration or '']] + + + + + + + + + + + + + + + On Account of : + + + + + + + + + + + + + + + [[ voucher.line_id and voucher.line_id.name and voucher.line_id.name[1] or removeParentNode('para') ]] + + + + + + + + + + + + + + + Amount (in words) : @@ -281,82 +358,27 @@ - [[ voucher.narration or '']] + [[ convert(voucher.amount) ]] - + - + + + + + + - On Account of : - - - - - - - - - - - - - - - [[ voucher.line_id and voucher.line_id.name and voucher.line_id.name[1] or removeParentNode('para') ]] - - - - - - - - - - - - - - - Amount (in words) : - - - - - - - - - - - - - - - [[ convert(voucher.amount) ]] - - - - - - - - - - - - - - - + @@ -368,57 +390,57 @@ - + - + - + - + - + - + - + - + - + - Receiver's Signature + Receiver's Signature - + - + - Authorised Signatory + Authorised Signatory diff --git a/addons/account_voucher/report/report_voucher.py b/addons/account_voucher/report/report_voucher.py index a3f3bb0380d..8c7b1ccbbea 100644 --- a/addons/account_voucher/report/report_voucher.py +++ b/addons/account_voucher/report/report_voucher.py @@ -61,5 +61,5 @@ report_sxw.report_sxw( 'report.voucher.cash_receipt.drcr', 'account.voucher', 'addons/account_voucher/report/report_voucher.rml', - parser=report_voucher,header=False + parser=report_voucher,header="external" ) diff --git a/addons/account_voucher/report/report_voucher.rml b/addons/account_voucher/report/report_voucher.rml index 23cab480414..cec3972358a 100755 --- a/addons/account_voucher/report/report_voucher.rml +++ b/addons/account_voucher/report/report_voucher.rml @@ -2,7 +2,7 @@ @@ -10,11 +10,73 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + @@ -26,22 +88,6 @@ - - - - - - - - - - - - - - - - @@ -51,31 +97,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -92,13 +126,13 @@ - + - - + + @@ -133,81 +167,73 @@ - [[ repeatIn(objects,'voucher') ]] - [[ company.name ]] - [[ company.partner_id.address and company.partner_id.address[0].street ]] - [[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]] - [[ company.partner_id.address and company.partner_id.address[0].phone ]] - [[ company.partner_id.address and company.partner_id.address[0].email ]] - + [[ repeatIn(objects,'voucher') ]] + - Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]] - Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]] - Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]] - Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]] - - - - + - No. + Type: - [[ voucher.number ]] + [[ voucher.type ]] - - - + Number: - Dated : + [[ voucher.number ]] - [[ formatLang(voucher.date, date=True) or '' ]] - - - - - State : + Date: - PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]] - Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]] - Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]] - Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]] - - - - - - - - Ref. : - - - [[ voucher.reference ]] + [[ formatLang(voucher.date , date=True) or '' ]] - - - - - - - + - Particulars + State: - Debit + PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]] + Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]] + Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]] + Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]] - Credit + Ref: + + + [[ voucher.reference or '' ]] + + + Account: + + + [[ voucher.account_id.name ]] + + + + + + + + + + + + + Particulars + + + Debit + + + Credit @@ -216,12 +242,10 @@
[[ repeatIn(voucher.move_ids,'move_ids') ]] - + - - [[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']] - + [[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']] [[ formatLang(move_ids.debit) ]] @@ -232,9 +256,7 @@ - - [[ move_ids.account_id.name ]] - + [[ move_ids.account_id.name ]] @@ -249,7 +271,7 @@ - [[ move_ids.name ]] - [[ voucher.reference ]] + [[ move_ids.name ]] - [[ get_ref(voucher.id,move_ids) ]] @@ -267,165 +289,167 @@
- + - + - Through : + Through : - + - + - [[ voucher.narration or '']] + [[ voucher.narration or '']] - + - + - On Account of : + On Account of : - + - + - [[ voucher.name ]] + [[ voucher.name ]] - + - + - Amount (in words) : + Amount (in words) : - + - + - [[ convert(voucher.amount,voucher.currency_id.name) ]] + [[ convert(voucher.amount,voucher.currency_id.name) ]] - + - + - - - - - - - - [[ debit(voucher.move_ids)]] - - - [[ credit(voucher.move_ids) ]] - - - + - + - + + + [[ debit(voucher.move_ids)]] + + + [[ credit(voucher.move_ids) ]] + + + + + + + + + + - + - + - + - + - + - Receiver's Signature + Receiver's Signature - + - + - Authorised Signatory + Authorised Signatory diff --git a/addons/account_voucher/report/report_voucher_amount.py b/addons/account_voucher/report/report_voucher_amount.py index 2cb113ae4ed..b691ca638f0 100644 --- a/addons/account_voucher/report/report_voucher_amount.py +++ b/addons/account_voucher/report/report_voucher_amount.py @@ -40,5 +40,5 @@ report_sxw.report_sxw( 'report.voucher.cash_amount', 'account.voucher', 'addons/account_voucher/report/report_voucher_amount.rml', - parser=report_voucher_amount,header=False + parser=report_voucher_amount,header="external" ) diff --git a/addons/account_voucher/report/report_voucher_amount.rml b/addons/account_voucher/report/report_voucher_amount.rml index 71e18a23a69..c23c94a792d 100755 --- a/addons/account_voucher/report/report_voucher_amount.rml +++ b/addons/account_voucher/report/report_voucher_amount.rml @@ -2,7 +2,7 @@ @@ -10,9 +10,51 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -23,21 +65,21 @@ - - - - - + - + + + + + - - + + @@ -48,30 +90,11 @@ - + - - - - - - - - - - - - - - - - - - - - - - + + + @@ -79,7 +102,7 @@ - + @@ -126,98 +149,65 @@ + - [[ repeatIn(objects,'voucher') ]] - [[ company.name ]] - [[ company.partner_id.address and company.partner_id.address[0].street ]] - [[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]] - [[ company.partner_id.address and company.partner_id.address[0].phone ]] - [[ company.partner_id.address and company.partner_id.address[0].email ]] - - - - Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]] - Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]] - Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]] - Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]] - - - - + [[ repeatIn(objects,'voucher') ]] + - No. + Type: - [[ voucher.number ]] + [[ voucher.type ]] - - - + Number: - Dated : + [[ voucher.number ]] - [[ formatLang(voucher.date, date=True) or '' ]] - - - - - State : + Date: - PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]] - Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]] - Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]] - Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]] - - - - - - - - Ref. : - - - [[ voucher.reference ]] - - - - - Account : - - - [[ voucher.account_id.name ]] - - - - - - - - - - - - - - - + [[ formatLang(voucher.date , date=True) or '' ]] - + + + + State: + + + PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]] + Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]] + Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]] + Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]] + + + Ref: + + + [[ voucher.reference ]] + + + Account: + + + [[ voucher.account_id.name ]] + + + + - + - + Particulars @@ -227,190 +217,183 @@ - - - - - - -
- [[ repeatIn(voucher.line_ids,'line_ids') ]] - - - - [[ line_ids.partner_id and line_ids.partner_id.name or '' ]] - - - [[ line_ids.amount ]] - - - - - [[ line_ids.account_id.name ]] - - - - - - - - - - [[ line_ids.ref ]] [[ line_ids.amount ]] - - - - - - - - - - [[ line_ids.type ]] - - - - - - - - - + + + +
+ [[ repeatIn(voucher.payment_ids,'payment_ids') ]] + + + + [[ payment_ids.partner_id and payment_ids.partner_id.name or '' ]] + + + [[ payment_ids.amount ]] + + + + + [[ payment_ids.account_id.name ]] + + + -
- + + + + + [[ payment_ids.ref ]] [[ payment_ids.amount ]] + + + + + + + + + + [[ payment_ids.type ]] + + + + + + + + + + + +
+ + + + + + + Through : + + + - + + + + + [[ voucher.narration or '' ]] + + + + + + + + + + On Account of : + + + + + + + + + + [[ voucher.name ]] + + + + + + + + + + Amount (in words) : + + + + + + + + + + [[ convert(voucher.amount,voucher.currency_id.name) ]] + + + - + + + + - - Through : - - - - - [[ voucher.narration or '' ]] - - - - - - - - - - On Account of : - - - - - - - - - - [[ voucher.name ]] - - - - - - - - - - Amount (in words) : - - - - - - - - - - [[ convert(voucher.amount,voucher.currency_id.name) ]] - - - - - - - - - - - - - [[ voucher.amount ]] - + - + - + - + - - - - + - + - + - + - Receiver's Signature + Receiver's Signature - + - + - Authorised Signatory + Authorised Signatory From d0ff9dfc6ab6b0f86bc63e80ee2470f9fcc63aae Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 8 Sep 2010 08:22:42 +0530 Subject: [PATCH 07/39] [REF] Account: manual recurring (remove wizard from journal items => moved it to periodical processing) bzr revid: mra@mra-laptop-20100908025242-iljuyqt87jtafo51 --- addons/account/wizard/account_use_model_view.xml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/addons/account/wizard/account_use_model_view.xml b/addons/account/wizard/account_use_model_view.xml index 232c1b8df88..f6ab3949abd 100644 --- a/addons/account/wizard/account_use_model_view.xml +++ b/addons/account/wizard/account_use_model_view.xml @@ -32,15 +32,7 @@ {'model_line':'model_line'}
- - - - Manual Recurring - client_action_multi - - action - account.move.line - + account.use.model.create.entry.form From 25bf7f31302c81d524410b4c454610c7bf420b93 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 8 Sep 2010 09:09:05 +0530 Subject: [PATCH 08/39] [ADD] Account: Add search and improved tree view for recurring entries bzr revid: mra@mra-laptop-20100908033905-158prmik835xzstq --- addons/account/account_view.xml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 6643370f0c4..9740dcc84b1 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1769,13 +1769,38 @@ tree - + + + + + account.subscription.search + account.subscription + search + + + + + + + + + + + + + + + + + + + account.subscription.form account.subscription @@ -1818,6 +1843,7 @@ account.subscription form tree,form + From 0d467eeea01a357ff900af7e3c1985980995335f Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 8 Sep 2010 09:44:22 +0530 Subject: [PATCH 09/39] [FIX] Account: Fiscal year overlap problem (Add constraint) bzr revid: mra@mra-laptop-20100908041422-vpxitbhcjbaisfyz --- addons/account/account.py | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index df54affe012..dbbf8400318 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -758,14 +758,45 @@ class account_fiscalyear(osv.osv): } _order = "date_start" + def _check_fiscal_year(self, cr, uid, ids, context=None): + current_fiscal_yr = self.browse(cr, uid, ids, context=context)[0] + obj_fiscal_ids = self.search(cr, uid, [('company_id', '=', current_fiscal_yr.company_id.id)], context=context) + obj_fiscal_ids.remove(ids[0]) + data_fiscal_yr = self.browse(cr, uid, obj_fiscal_ids, context=context) + +# # To check for gap between fiscal year +# old_latest_fy = self.search(cr, uid, [('date_stop', '<', datetime.strptime(current_fiscal_yr['date_start'], '%Y-%m-%d') ), ('company_id', '=', current_fiscal_yr.company_id.id), ('id', '!=', current_fiscal_yr.id )], order='date_stop desc', limit=1, context=context) +# data_old_latest_fy = self.browse(cr, uid, old_latest_fy, context=context) +# if data_old_latest_fy and data_old_latest_fy[0].company_id.id == current_fiscal_yr['company_id'].id and \ +# datetime.strptime(data_old_latest_fy[0].date_stop, '%Y-%m-%d') + timedelta(days=1) != datetime.strptime(current_fiscal_yr['date_start'], '%Y-%m-%d'): +# return False +# +# next_latest_fy = self.search(cr, uid, [('date_start', '>', datetime.strptime(current_fiscal_yr['date_stop'], '%Y-%m-%d') ), ('company_id', '=', current_fiscal_yr.company_id.id), ('id', '!=', current_fiscal_yr.id )], order='date_start', limit=1, context=context) +# data_next_latest_fy = self.browse(cr, uid, next_latest_fy, context=context) +# if data_next_latest_fy and data_next_latest_fy[0].company_id.id == current_fiscal_yr['company_id'].id and \ +# datetime.strptime(current_fiscal_yr['date_stop'], '%Y-%m-%d') + timedelta(days=1) != datetime.strptime(data_next_latest_fy[0].date_start, '%Y-%m-%d'): +# return False + + for old_fy in data_fiscal_yr: + if old_fy.company_id.id == current_fiscal_yr['company_id'].id: + # Condition to check if the current fiscal year falls in between any previously defined fiscal year + if old_fy.date_start <= current_fiscal_yr['date_start'] <= old_fy.date_stop or \ + old_fy.date_start <= current_fiscal_yr['date_stop'] <= old_fy.date_stop: + return False + # Condition to check whether there exist any previously defined fiscal year falling in between the newly created fiscal year + # elif current_fiscal_yr['date_start'] <= old_fy.date_start <= current_fiscal_yr['date_stop'] or current_fiscal_yr['date_start'] <= old_fy.date_stop <= current_fiscal_yr['date_stop']: +# return False + return True + def _check_duration(self,cr,uid,ids): - obj_fy=self.browse(cr,uid,ids[0]) + obj_fy = self.browse(cr,uid,ids[0]) if obj_fy.date_stop < obj_fy.date_start: return False return True _constraints = [ - (_check_duration, 'Error ! The duration of the Fiscal Year is invalid. ', ['date_stop']) + (_check_duration, 'Error ! The duration of the Fiscal Year is invalid. ', ['date_stop']), + (_check_fiscal_year, 'Error ! This Fiscal Year overlaps an existing Fiscal Year',['date_start', 'date_stop']) ] def create_period3(self,cr, uid, ids, context={}): From a53fe6eba12c9457b767db7024125677f77dd309 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 8 Sep 2010 10:40:21 +0530 Subject: [PATCH 10/39] [REF] bzr revid: mra@mra-laptop-20100908051021-zs0dtyvtq13k8l2i --- addons/account/wizard/account_automatic_reconcile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py index 436d320456e..757b42b6acc 100644 --- a/addons/account/wizard/account_automatic_reconcile.py +++ b/addons/account/wizard/account_automatic_reconcile.py @@ -18,6 +18,7 @@ # along with this program. If not, see . # ############################################################################## + import time import netsvc @@ -54,7 +55,7 @@ class account_automatic_reconcile(osv.osv_memory): 'date2': time.strftime('%Y-%m-%d'), 'reconciled': _get_reconciled, 'unreconciled': _get_unreconciled, - 'power':2 + 'power': 2 } #TODO: cleanup and comment this code... For now, it is awfulllll @@ -240,9 +241,9 @@ class account_automatic_reconcile(osv.osv_memory): 'type': 'ir.actions.act_window', 'target': 'new', 'context': context, - 'nodestroy':True, + 'nodestroy':True, #remove me } account_automatic_reconcile() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file From 92a04d862cef2fe9cbf62b95c7b20a4026223173 Mon Sep 17 00:00:00 2001 From: vra Date: Wed, 8 Sep 2010 11:46:52 +0530 Subject: [PATCH 11/39] [REM][IMP] account, analytic: remove extended group from analytic related menu and improved analytic object. bzr revid: vra@tinyerp.com-20100908061652-e2e5nabdo3uflfxv --- addons/account/project/project_view.xml | 18 ++++++++---------- addons/analytic/analytic.py | 2 +- addons/analytic/security/analytic_security.xml | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index bda1b5f22a2..b4ad0977520 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -8,7 +8,7 @@ tree - + @@ -52,7 +52,7 @@ tree child_ids - + @@ -106,7 +106,7 @@ - + Accounts to Renew @@ -120,16 +120,14 @@ Chart of Analytic Accounts - ir.actions.act_window account.analytic.account - [('parent_id','=',False)] tree - form,graph + [('parent_id','=',False)] Analytic Charts of Accounts allows you to access to reports by analytic accounts (or cost accounts) . From this menu you can access to analytic balance, a report that relates the analytic accounts to the general accounts. It is useful for analyzing the profitability of projects, giving you the profitability of a project for the different operations that you used to carry out the project. - + account.analytic.line.form @@ -335,7 +333,7 @@ tree,form,search - + # # Open journal entries @@ -347,7 +345,7 @@ form tree,form - + # # Reporting @@ -359,7 +357,7 @@ tree To print an analytics (or costs) journal for a given period. The report give code, move name, account number, general amount and analytic amount. - + # # Statistics diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index db5e554717d..26f57c984c0 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -222,7 +222,7 @@ class account_analytic_account(osv.osv): def check_recursion(self, cr, uid, ids, parent=None): return super(account_analytic_account, self).check_recursion(cr, uid, ids, parent=parent) - _order = 'parent_id desc,code' + _order = 'date_start desc,parent_id desc,code' _constraints = [ (check_recursion, 'Error! You can not create recursive analytic accounts.', ['parent_id']) ] diff --git a/addons/analytic/security/analytic_security.xml b/addons/analytic/security/analytic_security.xml index fcd4b8d7009..ff521f7cd1b 100644 --- a/addons/analytic/security/analytic_security.xml +++ b/addons/analytic/security/analytic_security.xml @@ -8,7 +8,7 @@ [('company_id','=',user.company_id.id)] - + Analytic Accounting From 68464d2e8adc26cc6cbade3f829ab919e98963b0 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 8 Sep 2010 13:16:18 +0530 Subject: [PATCH 12/39] [FIX] Account: automatic reconciliation bzr revid: mra@mra-laptop-20100908074618-k5lvbkbe10m2vv28 --- .../wizard/account_automatic_reconcile.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py index 757b42b6acc..e9a8ab04aac 100644 --- a/addons/account/wizard/account_automatic_reconcile.py +++ b/addons/account/wizard/account_automatic_reconcile.py @@ -144,18 +144,21 @@ class account_automatic_reconcile(osv.osv_memory): form = self.read(cr, uid, ids, [])[0] max_amount = form.get('max_amount', 0.0) power = form['power'] + allow_write_off = form['allow_write_off'] reconciled = unreconciled = 0 if not form['account_ids']: raise osv.except_osv(_('UserError'), _('You must select accounts to reconcile')) for account_id in form['account_ids']: - if not context.get('allow_write_off', False): + if not allow_write_off: query = "SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \ AND state <> 'draft' GROUP BY partner_id \ - HAVING ABS(SUM(debit-credit)) <> %s AND count(*)>0"%(account_id, 0.0) + HAVING ABS(SUM(debit-credit)) = %s AND count(*)>0"%(account_id, 0.0) +# HAVING ABS(SUM(debit-credit)) <> %s AND count(*)>0"%(account_id, 0.0) +# HAVING count(*)>0"%(account_id,) else: query = "SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \ AND state <> 'draft' GROUP BY partner_id \ - HAVING ABS(SUM(debit-credit)) <= %s AND count(*)>0"%(account_id, max_amount or 0.0) + HAVING ABS(SUM(debit-credit)) < %s AND count(*)>0"%(account_id, max_amount or 0.0) # reconcile automatically all transactions from partners whose balance is 0 cr.execute(query) partner_ids = [id for (id,) in cr.fetchall()] @@ -171,10 +174,12 @@ class account_automatic_reconcile(osv.osv_memory): line_ids = [id for (id,) in cr.fetchall()] if len(line_ids): reconciled += len(line_ids) - if not context.get('allow_write_off', False): - move_line_obj.reconcile_partial(cr, uid, line_ids, 'manual', context={}) - else: + if allow_write_off: move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context) +# move_line_obj.reconcile_partial(cr, uid, line_ids, 'manual', context={}) + else: + move_line_obj.reconcile_partial(cr, uid, line_ids, 'manual', context={}) +# move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context) # get the list of partners who have more than one unreconciled transaction cr.execute( @@ -241,7 +246,6 @@ class account_automatic_reconcile(osv.osv_memory): 'type': 'ir.actions.act_window', 'target': 'new', 'context': context, - 'nodestroy':True, #remove me } account_automatic_reconcile() From 3e776eb15cb50a5017de601a187c6b970e0ea5ed Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 8 Sep 2010 13:33:49 +0530 Subject: [PATCH 13/39] [REF] Account bzr revid: mra@mra-laptop-20100908080349-o33nxa2w3w6qx24h --- addons/account/installer.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/account/installer.py b/addons/account/installer.py index a6376694175..ee279701eef 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -469,7 +469,7 @@ class account_installer(osv.osv_memory): def execute(self, cr, uid, ids, context=None): if context is None: context = {} - res_obj = self.pool.get('account.fiscalyear') + fy_obj = self.pool.get('account.fiscalyear') data_pool = self.pool.get('ir.model.data') obj_acc = self.pool.get('account.account') super(account_installer, self).execute(cr, uid, ids, context=context) @@ -531,7 +531,7 @@ class account_installer(osv.osv_memory): 'company_id': company_id.id, 'sign': 1, 'parent_id':pur_tax_parent_id - } + } new_tax_code = self.pool.get('account.tax.code').create(cr, uid, vals_tax_code) purchase_tax = obj_tax.create(cr, uid, {'name':'TAX%s%%'%(p_tax*100), @@ -566,11 +566,11 @@ class account_installer(osv.osv_memory): 'date_stop': res['date_stop'], 'company_id': res['company_id'] } - period_id = res_obj.create(cr, uid, vals, context=context) + fy_id = fy_obj.create(cr, uid, vals, context=context) if res['period'] == 'month': - res_obj.create_period(cr, uid, [period_id]) + fy_obj.create_period(cr, uid, [fy_id]) elif res['period'] == '3months': - res_obj.create_period3(cr, uid, [period_id]) + fy_obj.create_period3(cr, uid, [fy_id]) # #fially inactive the demo chart of accounts # data_id = data_pool.search(cr, uid, [('model','=','account.account'), ('name','=','chart0')]) From db59baafca70c06c9f34b165f5859074b484e83c Mon Sep 17 00:00:00 2001 From: "pap (openerp)" Date: Wed, 8 Sep 2010 15:02:25 +0530 Subject: [PATCH 14/39] [IMP] Account: while configuring chart of accounts, skip fiscal year creation if there already exist a fiscal year with given range(date_start to date_stop) for given company bzr revid: pap@tinyerp.co.in-20100908093225-lahshzklbrahw68i --- addons/account/account.py | 64 ++++++++++++++++++------------------- addons/account/installer.py | 32 ++++++++++--------- 2 files changed, 49 insertions(+), 47 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index dbbf8400318..1f7812615bc 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -162,8 +162,8 @@ class account_account_type(osv.osv): 'note': fields.text('Description'), } _defaults = { - 'close_method': lambda *a: 'none', - 'sign': lambda *a: 1, + 'close_method': 'none', + 'sign': 1, } _order = "code" @@ -753,7 +753,7 @@ class account_fiscalyear(osv.osv): 'state': fields.selection([('draft','Open'), ('done','Closed')], 'State', readonly=True), } _defaults = { - 'state': lambda *a: 'draft', + 'state': 'draft', 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, } _order = "date_start" @@ -988,8 +988,8 @@ class account_journal_period(osv.osv): return super(account_journal_period, self).unlink(cr, uid, ids, context) _defaults = { - 'state': lambda *a: 'draft', - 'active': lambda *a: True, + 'state': 'draft', + 'active': True, } _order = "period_id" @@ -1117,10 +1117,10 @@ class account_move(osv.osv): 'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company',store=True), } _defaults = { - 'name': lambda *a: '/', - 'state': lambda *a: 'draft', + 'name': '/', + 'state': 'draft', 'period_id': _get_period, - 'date': lambda *a:time.strftime('%Y-%m-%d'), + 'date': time.strftime('%Y-%m-%d'), 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, } @@ -1611,8 +1611,8 @@ class account_tax_code(osv.osv): return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0] _defaults = { 'company_id': _default_company, - 'sign': lambda *args: 1.0, - 'notprintable': lambda *a: False, + 'sign': 1.0, + 'notprintable': False, } def copy(self, cr, uid, id, default=None, context=None): @@ -2125,11 +2125,11 @@ class account_subscription(osv.osv): 'lines_id': fields.one2many('account.subscription.line', 'subscription_id', 'Subscription Lines') } _defaults = { - 'date_start': lambda *a: time.strftime('%Y-%m-%d'), - 'period_type': lambda *a: 'month', - 'period_total': lambda *a: 12, - 'period_nbr': lambda *a: 1, - 'state': lambda *a: 'draft', + 'date_start': time.strftime('%Y-%m-%d'), + 'period_type': 'month', + 'period_total': 12, + 'period_nbr': 1, + 'state': 'draft', } def state_draft(self, cr, uid, ids, context={}): self.write(cr, uid, ids, {'state':'draft'}) @@ -2246,9 +2246,9 @@ class account_account_template(osv.osv): } _defaults = { - 'reconcile': lambda *a: False, - 'type' : lambda *a :'view', - 'nocreate': lambda *a: False, + 'reconcile': False, + 'type' : 'view', + 'nocreate': False, } _check_recursion = check_cycle @@ -2341,8 +2341,8 @@ class account_tax_code_template(osv.osv): } _defaults = { - 'sign': lambda *args: 1.0, - 'notprintable': lambda *a: False, + 'sign': 1.0, + 'notprintable': False, } def name_get(self, cr, uid, ids, context=None): @@ -2442,17 +2442,17 @@ class account_tax_template(osv.osv): _defaults = { 'python_compute': lambda *a: '''# price_unit\n# address : res.partner.address object or False\n# product : product.product object or None\n# partner : res.partner object or None\n\nresult = price_unit * 0.10''', 'python_compute_inv': lambda *a: '''# price_unit\n# address : res.partner.address object or False\n# product : product.product object or False\n\nresult = price_unit * 0.10''', - 'applicable_type': lambda *a: 'true', - 'type': lambda *a: 'percent', - 'amount': lambda *a: 0, - 'sequence': lambda *a: 1, - 'tax_group': lambda *a: 'vat', - 'ref_tax_sign': lambda *a: 1, - 'ref_base_sign': lambda *a: 1, - 'tax_sign': lambda *a: 1, - 'base_sign': lambda *a: 1, - 'include_base_amount': lambda *a: False, - 'type_tax_use': lambda *a: 'all', + 'applicable_type': 'true', + 'type': 'percent', + 'amount': 0, + 'sequence': 1, + 'tax_group': 'vat', + 'ref_tax_sign': 1, + 'ref_base_sign': 1, + 'tax_sign': 1, + 'base_sign': 1, + 'include_base_amount': False, + 'type_tax_use': 'all', } _order = 'sequence' @@ -2533,7 +2533,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): _defaults = { 'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, [uid], c)[0].company_id.id, 'chart_template_id': _get_chart, - 'code_digits': lambda *a:6, + 'code_digits': 6, 'seq_journal': True } diff --git a/addons/account/installer.py b/addons/account/installer.py index ee279701eef..1481850608d 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -556,21 +556,23 @@ class account_installer(osv.osv_memory): ir_values.set(cr, uid, key='default', key2=False, name=name, models =[('product.product',False)], value=[value]) if 'date_start' in res and 'date_stop' in res: - name = code = res['date_start'][:4] - if int(name) != int(res['date_stop'][:4]): - name = res['date_start'][:4] +'-'+ res['date_stop'][:4] - code = res['date_start'][2:4] +'-'+ res['date_stop'][2:4] - vals = {'name': name, - 'code': code, - 'date_start': res['date_start'], - 'date_stop': res['date_stop'], - 'company_id': res['company_id'] - } - fy_id = fy_obj.create(cr, uid, vals, context=context) - if res['period'] == 'month': - fy_obj.create_period(cr, uid, [fy_id]) - elif res['period'] == '3months': - fy_obj.create_period3(cr, uid, [fy_id]) + f_ids = res_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id','=',res['company_id'])]) + if not f_ids: + name = code = res['date_start'][:4] + if int(name) != int(res['date_stop'][:4]): + name = res['date_start'][:4] +'-'+ res['date_stop'][:4] + code = res['date_start'][2:4] +'-'+ res['date_stop'][2:4] + vals = {'name': name, + 'code': code, + 'date_start': res['date_start'], + 'date_stop': res['date_stop'], + 'company_id': res['company_id'] + } + period_id = res_obj.create(cr, uid, vals, context=context) + if res['period'] == 'month': + res_obj.create_period(cr, uid, [period_id]) + elif res['period'] == '3months': + res_obj.create_period3(cr, uid, [period_id]) # #fially inactive the demo chart of accounts # data_id = data_pool.search(cr, uid, [('model','=','account.account'), ('name','=','chart0')]) From 21b34c1889460bf690634d48edc7ab8cd3c73023 Mon Sep 17 00:00:00 2001 From: "pap (openerp)" Date: Wed, 8 Sep 2010 15:09:38 +0530 Subject: [PATCH 15/39] [REM] Account: removed unused code from account/wizard/account_reconcile.py bzr revid: pap@tinyerp.co.in-20100908093938-lmsvthaebraf4pu1 --- addons/account/wizard/account_reconcile.py | 46 ---------------------- 1 file changed, 46 deletions(-) diff --git a/addons/account/wizard/account_reconcile.py b/addons/account/wizard/account_reconcile.py index bb272eb68b0..7ec3ada5a4b 100644 --- a/addons/account/wizard/account_reconcile.py +++ b/addons/account/wizard/account_reconcile.py @@ -23,20 +23,6 @@ import time from osv import fields, osv from tools.translate import _ -class account_move_line_reconcile_prompt(osv.osv_memory): - """ - Asks user he wants to reconcile entries or not. - """ - _name = 'account.move.line.reconcile.prompt' - _description = 'Account move line reconcile' - _columns = { - } - - def ask_reconcilation(self, cr, uid, ids, context): - return self.pool.get('account.move.line.reconcile').partial_check(cr, uid, ids, context) - -account_move_line_reconcile_prompt() - class account_move_line_reconcile(osv.osv_memory): """ Account move line reconcile wizard, it checks for the write off the reconcile entry or directly reconcile. @@ -63,38 +49,6 @@ class account_move_line_reconcile(osv.osv_memory): res.update({'writeoff':data['writeoff']}) return res - def partial_check(self, cr, uid, ids, context=None): - mod_obj = self.pool.get('ir.model.data') - data = self.trans_rec_get(cr, uid, ids, context) - if context is None: - context = {} - if data['writeoff'] == 0: - model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_account_move_line_reconcile_full')], context=context) - resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] - return { - 'name': _('Reconcile'), - 'context': context, - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'account.move.line.reconcile', - 'views': [(resource_id,'form')], - 'type': 'ir.actions.act_window', - 'target': 'new', - } - else : - model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_account_move_line_reconcile_partial')], context=context) - resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] - return { - 'name': _('Reconcile'), - 'context': context, - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'account.move.line.reconcile', - 'views': [(resource_id,'form')], - 'type': 'ir.actions.act_window', - 'target': 'new', - } - def trans_rec_get(self, cr, uid, ids, context=None): account_move_line_obj = self.pool.get('account.move.line') if context is None: From c3981b6983b3a120869a163d2278b003e377b030 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 8 Sep 2010 15:59:04 +0530 Subject: [PATCH 16/39] [FIx]: fix a context problem of all Journal Items bzr revid: mga@tinyerp.com-20100908102904-xxei8twlzbtrbkb5 --- addons/account/wizard/account_move_journal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index 7f89e700b74..8b9cf48d48c 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -161,7 +161,7 @@ class account_move_journal(osv.osv_memory): 'view_mode': 'tree,graph,form', 'res_model': 'account.move.line', 'view_id': False, - 'context': "{'visible_id':%s, 'journal_id': %d, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (journal_id, journal_id, journal_id, period_id), + 'context': "{'visible_id':%s, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (journal_id, journal_id, period_id), 'type': 'ir.actions.act_window', 'search_view_id': res_id } From 3efbdcbd09af33152a4eb96d381dac29dccc26cb Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 8 Sep 2010 16:06:30 +0530 Subject: [PATCH 17/39] [FIX]: fix a problem for defult get in account_move_line bzr revid: mga@tinyerp.com-20100908103630-0d09s3m6m67myp5f --- addons/account/account_move_line.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 04578cdd92b..80487e9518d 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -159,7 +159,10 @@ class account_move_line(osv.osv): return context def _default_get(self, cr, uid, fields, context={}): - + + if not context.get('journal_id', False) and context.get('search_default_journal_id', False): + context['journal_id'] = context.get('search_default_journal_id') + period_obj = self.pool.get('account.period') context = self.convert_to_period(cr, uid, context) From eaa8f0be8c3492623a6a649d62a55f332933636c Mon Sep 17 00:00:00 2001 From: "pap (openerp)" Date: Wed, 8 Sep 2010 16:13:18 +0530 Subject: [PATCH 18/39] [REM] Account: removed current date from account_model, code cleaning bzr revid: pap@tinyerp.co.in-20100908104318-hcdzvgrvmspxpwkb --- addons/account/account.py | 2 -- addons/account/account_view.xml | 3 +-- addons/account/installer.py | 8 ++++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 1f7812615bc..e4c70fd398e 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2006,13 +2006,11 @@ class account_model(osv.osv): 'company_id': fields.many2one('res.company', 'Company', required=True), 'lines_id': fields.one2many('account.model.line', 'model_id', 'Model Entries'), 'legend' :fields.text('Legend', readonly=True, size=100), - 'date': fields.selection([('today','Date of the day'), ('partner','Partner Payment Term')], 'Current Date', required=True, help="The date of the generated entries"), } _defaults = { 'legend': lambda self, cr, uid, context:_('You can specify year, month and date in the name of the model using the following labels:\n\n%(year)s : To Specify Year \n%(month)s : To Specify Month \n%(date)s : Current Date\n\ne.g. My model on %(date)s'), 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, - 'date': 'today' } def generate(self, cr, uid, ids, datas={}, context={}): move_ids = [] diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 9740dcc84b1..d42e75bfee6 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1577,9 +1577,9 @@ - + @@ -1594,7 +1594,6 @@ - diff --git a/addons/account/installer.py b/addons/account/installer.py index 1481850608d..72327cb79ca 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -556,7 +556,7 @@ class account_installer(osv.osv_memory): ir_values.set(cr, uid, key='default', key2=False, name=name, models =[('product.product',False)], value=[value]) if 'date_start' in res and 'date_stop' in res: - f_ids = res_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id','=',res['company_id'])]) + f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id','=',res['company_id'])]) if not f_ids: name = code = res['date_start'][:4] if int(name) != int(res['date_stop'][:4]): @@ -568,11 +568,11 @@ class account_installer(osv.osv_memory): 'date_stop': res['date_stop'], 'company_id': res['company_id'] } - period_id = res_obj.create(cr, uid, vals, context=context) + fiscal_id = fy_obj.create(cr, uid, vals, context=context) if res['period'] == 'month': - res_obj.create_period(cr, uid, [period_id]) + fy_obj.create_period(cr, uid, [fiscal_id]) elif res['period'] == '3months': - res_obj.create_period3(cr, uid, [period_id]) + fy_obj.create_period3(cr, uid, [fiscal_id]) # #fially inactive the demo chart of accounts # data_id = data_pool.search(cr, uid, [('model','=','account.account'), ('name','=','chart0')]) From 3519efd5a8f46f01750837c1922d05707d9ccfbc Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 8 Sep 2010 16:15:53 +0530 Subject: [PATCH 19/39] [FIX]: fix a journal_id problem for the Accounting/Journal Entry bzr revid: mga@tinyerp.com-20100908104553-vl5uunhuoz3rfqi9 --- addons/account/account_move_line.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 80487e9518d..00c1b0b82b9 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -159,6 +159,9 @@ class account_move_line(osv.osv): return context def _default_get(self, cr, uid, fields, context={}): + + if not context.get('journal_id', False) and not context.get('search_default_journal_id', False): + raise osv.except_osv(_('Warning !'), _('Select the journal to encode entry !')) if not context.get('journal_id', False) and context.get('search_default_journal_id', False): context['journal_id'] = context.get('search_default_journal_id') From 84d412dd02dc5e5ab39e634e65b87243232f5d68 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 9 Sep 2010 09:50:37 +0530 Subject: [PATCH 20/39] [FIX] Account: Use model YAML bzr revid: mra@mra-laptop-20100909042037-z0m2h8zm0lwbl6fx --- addons/account/test/account_use_model.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/account/test/account_use_model.yml b/addons/account/test/account_use_model.yml index 20487fa86f4..4eb03a13026 100644 --- a/addons/account/test/account_use_model.yml +++ b/addons/account/test/account_use_model.yml @@ -3,7 +3,6 @@ - !record {model: account.model, id: account_model_mymodelonyears0}: journal_id: account.expenses_journal - date: today lines_id: - account_id: account.a_recv credit: 0.0 From 4f50060561e54a527963e5d486fd597dfabcdc0f Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Thu, 9 Sep 2010 10:46:01 +0530 Subject: [PATCH 21/39] [IMP] account:replace the %(year)s, %(month), %(day) with current datetime info for recurring entries bzr revid: psi@tinyerp.co.in-20100909051601-0fnvcn3ml5k4ilp2 --- addons/account/account.py | 4 +++- addons/account/wizard/account_use_model.py | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index e4c70fd398e..35302850b51 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2014,6 +2014,7 @@ class account_model(osv.osv): } def generate(self, cr, uid, ids, datas={}, context={}): move_ids = [] + entry = {} 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') @@ -2027,8 +2028,9 @@ class account_model(osv.osv): period_id = period_id[0] for model in self.browse(cr, uid, ids, context): + entry['name'] = model.name%{'year':time.strftime('%Y'), 'month':time.strftime('%m'), 'date':time.strftime('%d')} move_id = account_move_obj.create(cr, uid, { - 'ref': model.name, + 'ref': entry['name'], 'period_id': period_id, 'journal_id': model.journal_id.id, 'date': context.get('date',time.strftime('%Y-%m-%d')) diff --git a/addons/account/wizard/account_use_model.py b/addons/account/wizard/account_use_model.py index b1087cbbcdc..edac082f32e 100644 --- a/addons/account/wizard/account_use_model.py +++ b/addons/account/wizard/account_use_model.py @@ -55,21 +55,22 @@ class account_use_model(osv.osv_memory): 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']) else: data_model = account_model_obj.browse(cr, uid, context['active_ids']) - move_ids = [] 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': model.name, + 'ref': entry['name'], 'period_id': period_id, 'journal_id': model.journal_id.id, }) From 648cc187697a22ac8b4e37c207069d8884e48597 Mon Sep 17 00:00:00 2001 From: mtr Date: Thu, 9 Sep 2010 10:55:01 +0530 Subject: [PATCH 22/39] [IMP] sale and sale_* modules:-changed the string 'Sale order' to 'Sales order' bzr revid: mtr@mtr-20100909052501-ilbxhug0o49a7qu9 --- addons/sale/board_sale_view.xml | 2 +- addons/sale/sale_view.xml | 22 +++++++++++----------- addons/sale_crm/__openerp__.py | 6 +++--- addons/sale_crm/sale_crm_view.xml | 2 +- addons/sale_journal/sale_journal_view.xml | 10 +++++----- addons/sale_layout/__openerp__.py | 2 +- addons/sale_margin/__openerp__.py | 2 +- addons/sale_mrp/__openerp__.py | 4 ++-- addons/sale_order_dates/__openerp__.py | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/addons/sale/board_sale_view.xml b/addons/sale/board_sale_view.xml index 3e19e2fb4ee..6da7f9e312b 100644 --- a/addons/sale/board_sale_view.xml +++ b/addons/sale/board_sale_view.xml @@ -27,7 +27,7 @@ - Sale Dashboard + Sales Dashboard board.board form form diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 6f21e925e1a..bfbec5808a1 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -108,7 +108,7 @@ - + @@ -256,15 +256,15 @@ search - + - + - + @@ -288,11 +288,11 @@ form tree,form,calendar,graph - The sale order manages the invoicing, the product fullfilment and the + The sales order manages the invoicing, the product fullfilment and the delivery processes. OpenERP can handle products, services and -consumables so that a sale order can trigger tasks, manufacturing +consumables so that a sales order can trigger tasks, manufacturing orders, purchases, etc. It support several invoicing methods according -to your configuration: from the sale order, from the pickings, etc. +to your configuration: from the sales order, from the pickings, etc. @@ -438,7 +438,7 @@ to your configuration: from the sale order, from the pickings, etc. - + @@ -519,7 +519,7 @@ to your configuration: from the sale order, from the pickings, etc. - Configure Picking Policy for Sale Order + Configure Picking Policy for Sales Order sale.config.picking_policy form @@ -530,7 +530,7 @@ to your configuration: from the sale order, from the pickings, etc. Configure Sale Order Logistic + >Configure Sales Order Logistic Setup your sales workflow and default values. @@ -552,7 +552,7 @@ to your configuration: from the sale order, from the pickings, etc. - Configure Picking Policy for Sale Order + Configure Picking Policy for Sales Order ir.actions.act_window sale.config.picking_policy diff --git a/addons/sale_crm/__openerp__.py b/addons/sale_crm/__openerp__.py index 68226183320..8d83aded5f7 100644 --- a/addons/sale_crm/__openerp__.py +++ b/addons/sale_crm/__openerp__.py @@ -20,15 +20,15 @@ ############################################################################## { - 'name': 'Creates Sale orders from Opportunity', + 'name': 'Creates Sales order from Opportunity', 'version': '1.0', 'category': 'Generic Modules/Sales & Purchases', 'description': """ This module adds a shortcut on one or several opportunity cases in the CRM. -This shortcut allows you to generate a sale order based on the selected case. +This shortcut allows you to generate a sales order based on the selected case. If different cases are open (a list), it generates one sale order by case. -The case is then closed and linked to the generated sale order. +The case is then closed and linked to the generated sales order. We suggest you to install this module if you installed both the sale and the crm modules. diff --git a/addons/sale_crm/sale_crm_view.xml b/addons/sale_crm/sale_crm_view.xml index 545083ab037..391d4141969 100644 --- a/addons/sale_crm/sale_crm_view.xml +++ b/addons/sale_crm/sale_crm_view.xml @@ -33,7 +33,7 @@ - + - - - - - + + + + + diff --git a/addons/sale_layout/__openerp__.py b/addons/sale_layout/__openerp__.py index 2e2c23edff8..ee9fdadf8c3 100755 --- a/addons/sale_layout/__openerp__.py +++ b/addons/sale_layout/__openerp__.py @@ -24,7 +24,7 @@ "depends" : ["sale", "account_invoice_layout"], "author" : "OpenERP SA", "description": """ - This module provides features to improve the layout of the Sale Order. + This module provides features to improve the layout of the Sales Order. It gives you the possibility to * order all the lines of an sale order diff --git a/addons/sale_margin/__openerp__.py b/addons/sale_margin/__openerp__.py index 1f10066de91..b74da67da6d 100644 --- a/addons/sale_margin/__openerp__.py +++ b/addons/sale_margin/__openerp__.py @@ -19,7 +19,7 @@ ############################################################################## { - "name":"Margins in Sale Orders", + "name":"Margins in Sales Order", "version":"1.0", "category" : "Generic Modules/Sales & Purchases", "description": """ diff --git a/addons/sale_mrp/__openerp__.py b/addons/sale_mrp/__openerp__.py index aae9ca8c7a2..a8380dcb370 100644 --- a/addons/sale_mrp/__openerp__.py +++ b/addons/sale_mrp/__openerp__.py @@ -27,8 +27,8 @@ 'description': """ This module provides facility to the user to install mrp and sale modules at a time. It is basically used when we want to keep track of production - orders generated from sale orders. - It adds sale name and sale Reference on production order + orders generated from sales order. + It adds sales name and sales Reference on production order """, 'author': 'OpenERP SA', 'website': 'http://www.openerp.com', diff --git a/addons/sale_order_dates/__openerp__.py b/addons/sale_order_dates/__openerp__.py index 2fa7fad6ca1..5a66d8111de 100644 --- a/addons/sale_order_dates/__openerp__.py +++ b/addons/sale_order_dates/__openerp__.py @@ -25,7 +25,7 @@ 'version': '1.0', 'category': 'Generic Modules/CRM & SRM', 'description': """ -Add commitment, requested and effective dates on the sale order. +Add commitment, requested and effective dates on the sales order. """, 'author': 'OpenERP SA', 'website': 'http://www.openerp.com', From cbd0b7effd72771c988573f7b447fd590daf51c0 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 9 Sep 2010 11:21:55 +0530 Subject: [PATCH 23/39] [FIX] Account: manuall reconcilation=> used stop_reconcile in context when we recocile partner and go to next one bzr revid: mra@mra-laptop-20100909055155-h96s41mqdtka3eja --- addons/account/wizard/account_reconcile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/wizard/account_reconcile.py b/addons/account/wizard/account_reconcile.py index 7ec3ada5a4b..57b52c223e2 100644 --- a/addons/account/wizard/account_reconcile.py +++ b/addons/account/wizard/account_reconcile.py @@ -85,6 +85,7 @@ class account_move_line_reconcile(osv.osv_memory): ids = self.pool.get('account.period').find(cr, uid, dt=date, context=context) if len(ids): period_id = ids[0] + context.update({'stop_reconcile': True}) account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id, period_id, journal_id, context=context) return {} @@ -151,6 +152,7 @@ class account_move_line_reconcile_writeoff(osv.osv_memory): if len(ids): period_id = ids[0] + context.update({'stop_reconcile': True}) account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id, period_id, journal_id, context=context) return {} From 05b5623cd9dcfa532f2f17d5021aca5dfd329805 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 9 Sep 2010 11:31:30 +0530 Subject: [PATCH 24/39] [FIX] Account payment bzr revid: mra@mra-laptop-20100909060130-y20mvd7t2sscshcn --- addons/account_payment/wizard/account_payment_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py index 696160c35ef..97a66e937ca 100644 --- a/addons/account_payment/wizard/account_payment_order.py +++ b/addons/account_payment/wizard/account_payment_order.py @@ -66,7 +66,7 @@ class payment_order_create(osv.osv_memory): if not line_ids: return {} payment = order_obj.browse(cr, uid, context['active_id'], context=context) - t = payment.mode and payment.mode.type.id or None + t = None line2bank = line_obj.line2bank(cr, uid, line_ids, t, context) ## Finally populate the current payment with new lines: From 0a2b5ca83438242580e1a83455ce54515782f334 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 9 Sep 2010 11:42:55 +0530 Subject: [PATCH 25/39] [FIX] Account payment: make payment bzr revid: mra@mra-laptop-20100909061255-l86l3hxy7awikubj --- addons/account_payment/wizard/account_payment_pay.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account_payment/wizard/account_payment_pay.py b/addons/account_payment/wizard/account_payment_pay.py index 4b41b0dfc89..49858151670 100644 --- a/addons/account_payment/wizard/account_payment_pay.py +++ b/addons/account_payment/wizard/account_payment_pay.py @@ -33,7 +33,8 @@ class account_payment_make_payment(osv.osv_memory): # obj_model = self.pool.get('ir.model.data') # obj_act = self.pool.get('ir.actions.act_window') # order = obj_payment_order.browse(cr, uid, context['active_id'], context) - return obj_payment_order.set_done(cr, uid, context['active_id'], context) + obj_payment_order.set_done(cr, uid, context['active_id'], context) + return {} # t = order.mode and order.mode.type.code or 'manual' # if t == 'manual' : # obj_payment_order.set_done(cr,uid,context['active_id'],context) From e787ac6651085ce7eceec76ec3f7e6e800ad1e2f Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 9 Sep 2010 12:39:55 +0530 Subject: [PATCH 26/39] [REM] Account payment: Remove unused code bzr revid: mra@mra-laptop-20100909070955-oa9148a7h4xxyo4a --- addons/account_payment/account_payment.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py index 045e5f81627..346bc4a6ae8 100644 --- a/addons/account_payment/account_payment.py +++ b/addons/account_payment/account_payment.py @@ -238,19 +238,6 @@ class payment_line(osv.osv): line.amount_currency, context=ctx) return res - def _value_date(self, cursor, user, ids, name, args, context=None): - if not ids: - return {} - res = {} - for line in self.browse(cursor, user, ids, context=context): - if line.order_id.date_prefered == 'fixed': - res[line.id] = line.order_id.date_scheduled - elif line.order_id.date_prefered == 'due': - res[line.id] = line.due_date or time.strftime('%Y-%m-%d') - else: - res[line.id] = time.strftime('%Y-%m-%d') - return res - def _get_currency(self, cr, uid, context): user = self.pool.get('res.users').browse(cr, uid, uid) if user.company_id: From 52725e844f3e11d12fc7d67d9ab28901386b0001 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 9 Sep 2010 12:43:55 +0530 Subject: [PATCH 27/39] [REF] bzr revid: mra@mra-laptop-20100909071355-xyifur8ktejk9otq --- addons/account_payment/account_invoice.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/account_payment/account_invoice.py b/addons/account_payment/account_invoice.py index 4b2824103f4..9a45ae29c0b 100644 --- a/addons/account_payment/account_invoice.py +++ b/addons/account_payment/account_invoice.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,13 +15,14 @@ # 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 . +# along with this program. If not, see . # ############################################################################## -from osv import fields, osv from mx import DateTime +from osv import fields, osv + class Invoice(osv.osv): _inherit = 'account.invoice' @@ -49,5 +50,4 @@ class Invoice(osv.osv): Invoice() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file From acad9fa69c406eaa8b5fe9b261cc846bf04dfca3 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Thu, 9 Sep 2010 16:03:01 +0530 Subject: [PATCH 28/39] [FIX]: fix small probelm in the journal vouchers bzr revid: mga@tinyerp.com-20100909103301-d605s006chtwwqct --- addons/account_voucher/voucher_view.xml | 5 +++-- addons/account_voucher/wizard/account_voucher_open.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml index a8b86f5877e..18817b8c6e3 100644 --- a/addons/account_voucher/voucher_view.xml +++ b/addons/account_voucher/voucher_view.xml @@ -13,6 +13,7 @@ +