From e1255aab6f06788042cb279d427fa46d76203b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Wed, 30 Jun 2010 17:13:08 -0300 Subject: [PATCH 01/31] [IMP] mrp: by default MRP work-centers are supposed to be 'material' resources bzr revid: rvalyi@gmail.com-20100630201308-vf1uu5iyzq4qq6n4 --- addons/mrp/mrp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 9ed07cb5f38..0e1a65b1a86 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -59,6 +59,7 @@ class mrp_workcenter(osv.osv): } _defaults = { 'capacity_per_cycle': lambda *a: 1.0, + 'resource_type': lambda *a: 'material', } mrp_workcenter() From 253615e63873115aea50ed855b4416afc5b471d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Fri, 9 Jul 2010 13:40:44 -0300 Subject: [PATCH 02/31] [merge] bzr revid: rvalyi@gmail.com-20100709164044-ubzc4dw9xfeyz6ig --- addons/project_long_term/project_long_term_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 91347f0bbfe..6fb26c26fe6 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -54,7 +54,7 @@ project.resource.allocation gantt - + From a00bcef71cb5f50590f320e8ef4c2af3c608bec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Thu, 15 Jul 2010 15:14:19 -0300 Subject: [PATCH 03/31] [merge] bzr revid: rvalyi@gmail.com-20100715181419-1z3bsocywu7rmano --- addons/project_scrum/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_scrum/__openerp__.py b/addons/project_scrum/__openerp__.py index c42908ff50a..92eb86f381f 100644 --- a/addons/project_scrum/__openerp__.py +++ b/addons/project_scrum/__openerp__.py @@ -62,6 +62,6 @@ 'demo_xml': ['project_scrum_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0084121063261', + 'certificate': '', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 39f886f35cc2ab26dad91acfd01a56d0cf7bc70d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Fri, 23 Jul 2010 11:53:24 -0300 Subject: [PATCH 04/31] [merge] restored original project_long_term/project_long_term_view.xml bzr revid: rvalyi@gmail.com-20100723145324-8nmnmdlb15thu6je --- .../project_long_term_view.xml | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index c31a3f86a55..b338a5bd37a 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -45,36 +45,9 @@ - - - - - project.resource.allocation.calendar - project.resource.allocation - calendar - - - - - - - - - - project.resource.allocation.gantt - project.resource.allocation - gantt - - - - - - - - project.resource.allocation.search @@ -99,8 +72,8 @@ Resource Allocations project.resource.allocation form - tree,form,calendar,gantt - {} + gantt,tree,form + {} @@ -359,4 +332,4 @@ - + \ No newline at end of file From f5707955cdf4beee85a0b02e96e56a4746b9504e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Fri, 23 Jul 2010 13:08:54 -0300 Subject: [PATCH 05/31] [FIX] project_long_term: deleting a phase should delete its affected resources! bzr revid: rvalyi@gmail.com-20100723160854-jdjopucvsl4x2af2 --- addons/project_long_term/project_long_term.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 0ecdcc69a2e..56e2ff9b3d8 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -245,7 +245,7 @@ class project_resource_allocation(osv.osv): _description = 'Project Resource Allocation' _rec_name = 'resource_id' _columns = { - 'resource_id': fields.many2one('resource.resource', 'Resource', required=True), + 'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade', required=True), 'phase_id': fields.many2one('project.phase', 'Project Phase', required=True), 'phase_id_date_start': fields.related('phase_id', 'date_start', type='date', string='Starting Date of the phase'), 'phase_id_date_end': fields.related('phase_id', 'date_end', type='date', string='Ending Date of the phase'), From 934d8adb5af78dbe5a4e93bbbd33ede30d822789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Sun, 25 Jul 2010 12:55:10 -0300 Subject: [PATCH 06/31] [FIX] account chart creation fixed what seems untested code bzr revid: rvalyi@gmail.com-20100725155510-jpbn83g1ap0ef1wd --- addons/account/installer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/installer.py b/addons/account/installer.py index 4dd01f9ec8b..16fe116b481 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -298,6 +298,7 @@ class account_installer(osv.osv_memory): # Creating Journals Sales and Purchase vals_journal={} + data_pool = self.pool.get('ir.model.data') data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_sp_journal_view')]) data = data_pool.browse(cr, uid, data_id[0]) view_id = data.res_id From 717c7c5b11fb0a4bd6821abc8f774bf6f4d5ceb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Sun, 25 Jul 2010 12:55:48 -0300 Subject: [PATCH 07/31] [FIX] project_long_term: it's phase_id that should be ondelete='cascade'; fixed write if only one id provided as it is usually permitted bzr revid: rvalyi@gmail.com-20100725155548-fss28s73p0gvxjrj --- addons/project_long_term/project_long_term.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 56e2ff9b3d8..fc1fea91311 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -190,6 +190,8 @@ class project_phase(osv.osv): return super(project_phase, self).write(cr, uid, ids, vals, context=context) # Consider calendar and efficiency if the phase is performed by a resource # otherwise consider the project's working calendar + if type(ids) == int: + ids = [ids] phase = self.browse(cr, uid, ids[0], context=context) calendar_id = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False resource_id = resource_obj.search(cr, uid, [('user_id', '=', phase.responsible_id.id)],context=context) @@ -245,8 +247,8 @@ class project_resource_allocation(osv.osv): _description = 'Project Resource Allocation' _rec_name = 'resource_id' _columns = { - 'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade', required=True), - 'phase_id': fields.many2one('project.phase', 'Project Phase', required=True), + 'resource_id': fields.many2one('resource.resource', 'Resource', required=True), + 'phase_id': fields.many2one('project.phase', 'Project Phase', ondelete='cascade', required=True), 'phase_id_date_start': fields.related('phase_id', 'date_start', type='date', string='Starting Date of the phase'), 'phase_id_date_end': fields.related('phase_id', 'date_end', type='date', string='Ending Date of the phase'), 'useability': fields.float('Usability', help="Usability of this resource for this project phase in percentage (=50%)"), From 3bc25fb07ef8aa959d2c7df0b9515e6a3147c0c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Sun, 25 Jul 2010 13:58:26 -0300 Subject: [PATCH 08/31] [REF] clean up before merge (clean double work diffs) bzr revid: rvalyi@gmail.com-20100725165826-etg68lktjnt9ih5l --- addons/account/invoice.py | 1 - addons/project_long_term/project_long_term.py | 2 -- addons/project_long_term/project_long_term_view.xml | 2 +- addons/project_scrum/__openerp__.py | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 1c452b54258..f5ebc5b3d3d 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -1261,7 +1261,6 @@ class account_invoice_line(osv.osv): return {'price_unit': price_unit,'invoice_line_tax_id': tax_id} def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): - print "2222*", uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context if context is None: context = {} company_id = context.get('company_id',False) diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index fc1fea91311..9371232745b 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -252,8 +252,6 @@ class project_resource_allocation(osv.osv): 'phase_id_date_start': fields.related('phase_id', 'date_start', type='date', string='Starting Date of the phase'), 'phase_id_date_end': fields.related('phase_id', 'date_end', type='date', string='Ending Date of the phase'), 'useability': fields.float('Usability', help="Usability of this resource for this project phase in percentage (=50%)"), - 'date_start': fields.related('phase_id', 'date_start', type='datetime', string='Start Date'), - 'date_end': fields.related('phase_id', 'date_end', type='datetime', string='End Date'), } _defaults = { 'useability': 100, diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index b338a5bd37a..7d51f79530a 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -332,4 +332,4 @@ - \ No newline at end of file + diff --git a/addons/project_scrum/__openerp__.py b/addons/project_scrum/__openerp__.py index 92eb86f381f..9fa418d6ca3 100644 --- a/addons/project_scrum/__openerp__.py +++ b/addons/project_scrum/__openerp__.py @@ -62,6 +62,5 @@ 'demo_xml': ['project_scrum_demo.xml'], 'installable': True, 'active': False, - 'certificate': '', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 86ed2c87a65f734cb1b7d1db00f1e9ab3b333e3d Mon Sep 17 00:00:00 2001 From: Rga <> Date: Fri, 30 Jul 2010 11:36:43 +0530 Subject: [PATCH 09/31] [IMP]:removed unncessary 'nodestroy' from wizard bzr revid: nch@tinyerp.com-20100730060643-qpp6peczbz631gd8 --- .../account/wizard/account_balance_report.py | 2 - addons/account/wizard/account_bs_report.py | 2 - .../account/wizard/account_central_journal.py | 1 - .../account_compare_account_balance_report.py | 8 --- .../account/wizard/account_general_journal.py | 1 - .../wizard/account_general_ledger_report.py | 4 -- .../wizard/account_partner_balance_report.py | 2 - addons/account/wizard/account_pl_report.py | 2 - .../account/wizard/account_print_journal.py | 1 - .../wizard/account_third_party_ledger.py | 3 - addons/account/wizard/account_vat.py | 61 +++++++++---------- .../wizard/account_crossovered_analytic.py | 1 - .../wizard/account_followup_print.py | 1 - .../wizard/hr_payroll_employees_detail.py | 1 - .../wizard/hr_payroll_year_salary.py | 1 - .../marketing_campaign/marketing_campaign.py | 1 - addons/survey/survey.py | 2 - 17 files changed, 30 insertions(+), 64 deletions(-) diff --git a/addons/account/wizard/account_balance_report.py b/addons/account/wizard/account_balance_report.py index 5d02f9fa972..0d2a56d96d6 100644 --- a/addons/account/wizard/account_balance_report.py +++ b/addons/account/wizard/account_balance_report.py @@ -109,7 +109,6 @@ class account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data, - 'nodestroy':True, } def _check_date(self, cr, uid, data, context=None): @@ -128,7 +127,6 @@ class account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data, - 'nodestroy':True, } else: raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) diff --git a/addons/account/wizard/account_bs_report.py b/addons/account/wizard/account_bs_report.py index dfd035680f2..193e33395f5 100644 --- a/addons/account/wizard/account_bs_report.py +++ b/addons/account/wizard/account_bs_report.py @@ -139,14 +139,12 @@ class account_bs_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.balancesheet.horizontal', 'datas': data, - 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.balancesheet', 'datas': data, - 'nodestroy':True, } else: raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) diff --git a/addons/account/wizard/account_central_journal.py b/addons/account/wizard/account_central_journal.py index b1a0f3c2849..dc213f159ab 100644 --- a/addons/account/wizard/account_central_journal.py +++ b/addons/account/wizard/account_central_journal.py @@ -52,7 +52,6 @@ class account_central_journal(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.central.journal', 'datas': datas, - 'nodestroy':True, } account_central_journal() diff --git a/addons/account/wizard/account_compare_account_balance_report.py b/addons/account/wizard/account_compare_account_balance_report.py index af844854271..629e1ae798e 100644 --- a/addons/account/wizard/account_compare_account_balance_report.py +++ b/addons/account/wizard/account_compare_account_balance_report.py @@ -74,14 +74,12 @@ class account_compare_account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.landscape', 'datas': data, - 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.balance.account.balance', 'datas': data, - 'nodestroy':True, } if data['form']['format_perc']==1: if len(data['form']['fiscalyear'])<=2: @@ -90,14 +88,12 @@ class account_compare_account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.landscape', 'datas': data, - 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.balance.account.balance', 'datas': data, - 'nodestroy':True, } else: if len(data['form']['fiscalyear'])==3: @@ -106,7 +102,6 @@ class account_compare_account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.landscape', 'datas': data, - 'nodestroy':True, } else: raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.')) @@ -119,7 +114,6 @@ class account_compare_account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.landscape', 'datas': data, - 'nodestroy':True, } else: raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.')) @@ -129,14 +123,12 @@ class account_compare_account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.landscape', 'datas': data, - 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.balance.account.balance', 'datas': data, - 'nodestroy':True, } account_compare_account_balance_report() diff --git a/addons/account/wizard/account_general_journal.py b/addons/account/wizard/account_general_journal.py index 8bd2913ae62..f22846f1637 100644 --- a/addons/account/wizard/account_general_journal.py +++ b/addons/account/wizard/account_general_journal.py @@ -52,7 +52,6 @@ class account_general_journal(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.general.journal', 'datas': datas, - 'nodestroy':True, } account_general_journal() diff --git a/addons/account/wizard/account_general_ledger_report.py b/addons/account/wizard/account_general_ledger_report.py index ad5e74786b0..f8c7794673b 100644 --- a/addons/account/wizard/account_general_ledger_report.py +++ b/addons/account/wizard/account_general_ledger_report.py @@ -107,14 +107,12 @@ class account_general_ledger_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger_landscape', 'datas': data, - 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger', 'datas': data, - 'nodestroy':True, } else: raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) @@ -141,14 +139,12 @@ class account_general_ledger_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger_landscape', 'datas': data, - 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger', 'datas': data, - 'nodestroy':True, } account_general_ledger_report() diff --git a/addons/account/wizard/account_partner_balance_report.py b/addons/account/wizard/account_partner_balance_report.py index c6d82128256..5d023d8f8ec 100644 --- a/addons/account/wizard/account_partner_balance_report.py +++ b/addons/account/wizard/account_partner_balance_report.py @@ -82,7 +82,6 @@ class account_partner_balance(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.partner.balance', 'datas': data, - 'nodestroy':True, } def _check_date(self, cr, uid, data, context): @@ -98,7 +97,6 @@ class account_partner_balance(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.partner.balance', 'datas': data, - 'nodestroy':True, } else: raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) diff --git a/addons/account/wizard/account_pl_report.py b/addons/account/wizard/account_pl_report.py index 9ae7a4dbedf..87f5accf068 100644 --- a/addons/account/wizard/account_pl_report.py +++ b/addons/account/wizard/account_pl_report.py @@ -136,14 +136,12 @@ class account_pl_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'pl.account.horizontal', 'datas': data, - 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'pl.account', 'datas': data, - 'nodestroy':True, } else: raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) diff --git a/addons/account/wizard/account_print_journal.py b/addons/account/wizard/account_print_journal.py index f40efe3eb99..53c73e66355 100644 --- a/addons/account/wizard/account_print_journal.py +++ b/addons/account/wizard/account_print_journal.py @@ -59,7 +59,6 @@ class account_print_journal(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.journal.period.print', 'datas': datas, - 'nodestroy':True, } account_print_journal() diff --git a/addons/account/wizard/account_third_party_ledger.py b/addons/account/wizard/account_third_party_ledger.py index daff801f3bd..fa40cd0bdc6 100644 --- a/addons/account/wizard/account_third_party_ledger.py +++ b/addons/account/wizard/account_third_party_ledger.py @@ -97,14 +97,12 @@ class account_partner_ledger(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.third_party_ledger', 'datas': data, - 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.third_party_ledger_other', 'datas': data, - 'nodestroy':True, } def _check_date(self, cr, uid, data, context=None): @@ -122,7 +120,6 @@ class account_partner_ledger(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.third_party_ledger', 'datas': data, - 'nodestroy':True, } else: raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) diff --git a/addons/account/wizard/account_vat.py b/addons/account/wizard/account_vat.py index 15c5a55203a..80f4f8360a1 100644 --- a/addons/account/wizard/account_vat.py +++ b/addons/account/wizard/account_vat.py @@ -22,43 +22,42 @@ from osv import osv, fields class account_vat_declaration(osv.osv_memory): - _name = 'account.vat.declaration' - _description = 'Account Vat Declaration' + _name = 'account.vat.declaration' + _description = 'Account Vat Declaration' - _columns = { + _columns = { 'based_on': fields.selection([('invoices','Invoices'), - ('payments','Payments'),], - 'Based On', required=True), + ('payments','Payments'),], + 'Based On', required=True), 'company_id': fields.many2one('res.company', 'Company', required=True), - 'periods': fields.many2many('account.period', 'vat_period_rel', 'vat_id', 'period_id', 'Periods', help="All periods if empty"), - } + 'periods': fields.many2many('account.period', 'vat_period_rel', 'vat_id', 'period_id', 'Periods', help="All periods if empty"), + } - def _get_company(self, cr, uid, context={}): - user_obj = self.pool.get('res.users') - company_obj = self.pool.get('res.company') - user = user_obj.browse(cr, uid, uid, context=context) - if user.company_id: - return user.company_id.id - else: - return company_obj.search(cr, uid, [('parent_id', '=', False)])[0] + def _get_company(self, cr, uid, context={}): + user_obj = self.pool.get('res.users') + company_obj = self.pool.get('res.company') + user = user_obj.browse(cr, uid, uid, context=context) + if user.company_id: + return user.company_id.id + else: + return company_obj.search(cr, uid, [('parent_id', '=', False)])[0] - _defaults = { - 'based_on': 'invoices', - 'company_id': _get_company - } + _defaults = { + 'based_on': 'invoices', + 'company_id': _get_company + } - def create_vat(self, cr, uid, ids, context={}): - if context is None: - context = {} - datas = {'ids': context.get('active_ids', [])} - datas['model'] = 'account.tax.code' - datas['form'] = self.read(cr, uid, ids)[0] - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.vat.declaration', - 'datas': datas, - 'nodestroy':True, - } + def create_vat(self, cr, uid, ids, context={}): + if context is None: + context = {} + datas = {'ids': context.get('active_ids', [])} + datas['model'] = 'account.tax.code' + datas['form'] = self.read(cr, uid, ids)[0] + return { + 'type': 'ir.actions.report.xml', + 'report_name': 'account.vat.declaration', + 'datas': datas, + } account_vat_declaration() diff --git a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py index 825ab26aaf9..2429650a800 100644 --- a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py +++ b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py @@ -67,7 +67,6 @@ class account_crossovered_analytic(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.analytic.account.crossovered.analytic', 'datas': datas, - 'nodestroy': True } account_crossovered_analytic() diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py index 868249365ee..c3fd73370eb 100644 --- a/addons/account_followup/wizard/account_followup_print.py +++ b/addons/account_followup/wizard/account_followup_print.py @@ -304,7 +304,6 @@ class account_followup_print_all(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account_followup.followup.print', 'datas': datas, - 'nodestroy': True } account_followup_print_all() diff --git a/addons/hr_payroll/wizard/hr_payroll_employees_detail.py b/addons/hr_payroll/wizard/hr_payroll_employees_detail.py index 314dcfa94bb..c2d0e3c4116 100755 --- a/addons/hr_payroll/wizard/hr_payroll_employees_detail.py +++ b/addons/hr_payroll/wizard/hr_payroll_employees_detail.py @@ -63,7 +63,6 @@ class hr_payroll_employees_detail(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'employees.salary', 'datas': datas, - 'nodestroy':True, } hr_payroll_employees_detail() diff --git a/addons/hr_payroll/wizard/hr_payroll_year_salary.py b/addons/hr_payroll/wizard/hr_payroll_year_salary.py index 0445d559f58..a7091540894 100755 --- a/addons/hr_payroll/wizard/hr_payroll_year_salary.py +++ b/addons/hr_payroll/wizard/hr_payroll_year_salary.py @@ -65,7 +65,6 @@ class hr_payroll_year_salary(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'year.salary', 'datas': datas, - 'nodestroy':True, } hr_payroll_year_salary() diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py index 46e1e28ade7..787557145e3 100644 --- a/addons/marketing_campaign/marketing_campaign.py +++ b/addons/marketing_campaign/marketing_campaign.py @@ -674,7 +674,6 @@ class marketing_campaign_workitem(osv.osv): 'type' : 'ir.actions.report.xml', 'report_name': wi_obj.activity_id.report_id.report_name, 'datas' : datas, - 'nodestroy': True, } else: raise osv.except_osv(_('No preview'),_('The current step for this item has no email or report to preview.')) diff --git a/addons/survey/survey.py b/addons/survey/survey.py index 8cac202fe40..a78fe55ea2d 100644 --- a/addons/survey/survey.py +++ b/addons/survey/survey.py @@ -124,7 +124,6 @@ class survey(osv.osv): 'type': 'ir.actions.report.xml', 'report_name': 'survey.browse.response', 'datas': datas, - 'nodestroy': True, 'context' : context } else: @@ -135,7 +134,6 @@ class survey(osv.osv): 'type': 'ir.actions.report.xml', 'report_name': 'survey.form', 'datas': datas, - 'nodestroy':True, 'context' : context } return report From 46eda1ff973d5c1964c6283078ae06c2923acb89 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Fri, 30 Jul 2010 12:42:41 +0530 Subject: [PATCH 10/31] [IMP]: crm: Put warning on lead creation for stage in comment bzr revid: rpa@tinyerp.com-20100730071241-sip39pg464ss1u5a --- addons/crm/crm_lead.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 0ad779d403f..56a30c4791a 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -164,8 +164,9 @@ class crm_lead(osv.osv, crm_case): } def create(self, cr, uid, vals, context=None): - if not vals.get('stage_id',False): - raise osv.except_osv('Error', _('There is no stage defined for this Sales Team')) +# FIXME: Do we really need this? if yes, this is not a correct way to check for stage +# if not vals.get('stage_id',False): +# raise osv.except_osv('Error', _('There is no stage defined for this Sales Team')) return super(crm_lead, self).create(cr, uid, vals, context=context) def onchange_partner_address_id(self, cr, uid, ids, add, email=False): From 9a245f625aa8aab3dbb1ccb9faf0581851dc681c Mon Sep 17 00:00:00 2001 From: "RME(OpenERP)" <> Date: Fri, 30 Jul 2010 13:22:45 +0530 Subject: [PATCH 11/31] [IMP] Icon improvements lp bug: https://launchpad.net/bugs/610845 fixed bzr revid: jvo@tinyerp.com-20100730075245-f0ehjauj3pq8oumy --- addons/account/account_invoice_view.xml | 4 ++-- addons/account/account_view.xml | 12 ++++++------ addons/account/wizard/account_invoice_state_view.xml | 2 +- .../account/wizard/account_journal_select_view.xml | 2 +- .../wizard/account_move_bank_reconcile_view.xml | 2 +- addons/account/wizard/account_move_journal_view.xml | 2 +- .../account_move_line_reconcile_select_view.xml | 2 +- .../account/wizard/account_move_line_select_view.xml | 2 +- .../account_move_line_unreconcile_select_view.xml | 2 +- .../wizard/account_open_closed_fiscalyear_view.xml | 2 +- .../wizard/account_partner_balance_report_view.xml | 2 +- addons/account/wizard/account_use_model_view.xml | 2 +- addons/account_voucher/voucher_view.xml | 4 ++-- addons/crm_claim/report/crm_claim_report_view.xml | 2 +- .../report/crm_fundraising_report_view.xml | 2 +- .../hr_holidays/report/hr_holidays_report_view.xml | 2 +- .../hr_timesheet_sheet/hr_timesheet_sheet_view.xml | 2 +- addons/lunch/lunch_view.xml | 2 +- 18 files changed, 25 insertions(+), 25 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index ac82fc1b6cc..22df9059305 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -138,7 +138,7 @@