From 683ab59cfd576b0b25e096b76254847f2b3ba718 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 16 Sep 2010 16:45:39 +0200 Subject: [PATCH 1/5] fix bzr revid: fp@tinyerp.com-20100916144539-gpu2uyk7eynf7wqx --- addons/account_voucher/voucher.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index c5d3f605e9a..57b74d948d8 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -547,9 +547,6 @@ class account_voucher(osv.osv): if inv.move_id: continue - if not inv.line_ids: - raise osv.except_osv(_('Error !'), _('You can not validate a voucher without lines !')) - if inv.journal_id.sequence_id: name = self.pool.get('ir.sequence').get_id(cr, uid, inv.journal_id.sequence_id.id) else: From be2f05745fa3907793dd76a723ac4ae12f76a33b Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 16 Sep 2010 16:44:05 +0200 Subject: [PATCH 2/5] [IMP] hr_*,idea,stock_planning: enforce unambiguous ISO date format for date[time] fields in YAML tests bzr revid: odo@openerp.com-20100916144405-ktoka7d1m4re1rg2 --- addons/hr_holidays/test/test_hr_holiday.yml | 4 ++-- .../test/test_hr_recruitment.yml | 2 +- .../test/test_hr_timesheet_sheet.yml | 4 ++-- addons/idea/test/test_idea.yml | 2 +- addons/stock_planning/test/stock_planning.yml | 18 +++++++++--------- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/addons/hr_holidays/test/test_hr_holiday.yml b/addons/hr_holidays/test/test_hr_holiday.yml index f5a3b21c7a3..f32afa737b2 100644 --- a/addons/hr_holidays/test/test_hr_holiday.yml +++ b/addons/hr_holidays/test/test_hr_holiday.yml @@ -47,8 +47,8 @@ holiday_status_id: hr_holidays_status_sick0 name: Sick Leaves for Phil Graves number_of_days_temp: 12.0 - date_from: '05/20/2010 13:59:00' - date_to: '05/22/2010 13:59:00' + date_from: '2010-05-20 13:59:00' + date_to: '2010-05-22 13:59:00' type: add - I confirmed the allocation by clicking on "Confirm" button. diff --git a/addons/hr_recruitment/test/test_hr_recruitment.yml b/addons/hr_recruitment/test/test_hr_recruitment.yml index f5689b67787..32f49ca4ad5 100644 --- a/addons/hr_recruitment/test/test_hr_recruitment.yml +++ b/addons/hr_recruitment/test/test_hr_recruitment.yml @@ -63,7 +63,7 @@ - !record {model: hr.recruitment.job2phonecall, id: hr_recruitment_forinterview0}: user_id: base.user_root - deadline: '05/28/2010 11:51:00' + deadline: '2010-05-28 11:51:00' note: 'For interview.' category_id: 'crm_case_categ_employee0' diff --git a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml index d75968f5f16..bb5752d6c9e 100644 --- a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml +++ b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml @@ -93,7 +93,7 @@ !record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}: timesheet_ids: - account_id: account.analytic_sednacom - date: '05/26/2010' + date: '2010-05-26' name: 'Develop yaml for hr module' unit_amount: 3.00 amount: -90.00 @@ -124,7 +124,7 @@ !record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}: timesheet_ids: - account_id: account.analytic_sednacom - date: '05/26/2010' + date: '2010-05-26' name: 'Develop yaml for hr module' unit_amount: 2.0 amount: -90.00 diff --git a/addons/idea/test/test_idea.yml b/addons/idea/test/test_idea.yml index bdf66af961e..4f6ea4bd568 100644 --- a/addons/idea/test/test_idea.yml +++ b/addons/idea/test/test_idea.yml @@ -11,7 +11,7 @@ - !record {model: idea.idea, id: idea_idea_0}: category_id: idea_category_technical0 - created_date: '05/13/2010 19:16:26' + created_date: '2010-05-13 19:16:26' description: I want that Technical presentation are arranged for 1 hours in every day.\nso, on that presentation, we can know all things what improvement and development are done in our company.\n\n\n\n\n diff --git a/addons/stock_planning/test/stock_planning.yml b/addons/stock_planning/test/stock_planning.yml index 178c361a10c..23cfc43c821 100644 --- a/addons/stock_planning/test/stock_planning.yml +++ b/addons/stock_planning/test/stock_planning.yml @@ -8,35 +8,35 @@ - !record {model: stock.period, id: stock_period_01}: date_start: '2010-07-01 00:00:00' - date_stop: '2010/07/06 23:59:00' + date_stop: '2010-07-06 23:59:00' name: 2010, week 27 - I create stock period for the second week of July. - !record {model: stock.period, id: stock_period_02}: - date_start: '2010/07/07 00:00:00' - date_stop: '2010/07/12 23:59:00' + date_start: '2010-07-07 00:00:00' + date_stop: '2010-07-12 23:59:00' name: 2010, week 28 - I create stock period for the third week of July. - !record {model: stock.period, id: stock_period_03}: - date_start: '2010/07/15 00:00:00' - date_stop: '2010/07/20 23:59:00' + date_start: '2010-07-15 00:00:00' + date_stop: '2010-07-20 23:59:00' name: 2010, week 29 - I create stock period for the fourth week of July. - !record {model: stock.period, id: stock_period_04}: - date_start: '2010/07/22 00:00:00' - date_stop: '2010/07/27 23:59:00' + date_start: '2010-07-22 00:00:00' + date_stop: '2010-07-27 23:59:00' name: 2010, week 30 - I create stock period for the fifth week of July. - !record {model: stock.period, id: stock_period_05}: - date_start: '2010/07/29 00:00:00' - date_stop: '2010/07/31 23:59:00' + date_start: '2010-07-29 00:00:00' + date_stop: '2010-07-31 23:59:00' name: 2010, week 31 - Now I create the forecast for this period for all PCs. From d038e3ae854f0b7a52990a514c17a68eeaf96670 Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Thu, 16 Sep 2010 17:25:10 +0200 Subject: [PATCH 3/5] [IMP] account: entries analysis improvement bzr revid: qdp-launchpad@tinyerp.com-20100916152510-efxsemur24plb6pt --- .../account/report/account_entries_report.py | 6 ++++++ .../report/account_entries_report_view.xml | 20 +++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py index acf15ce53c1..5d9062dff7a 100644 --- a/addons/account/report/account_entries_report.py +++ b/addons/account/report/account_entries_report.py @@ -21,6 +21,7 @@ import tools from osv import fields,osv +import decimal_precision as dp class account_entries_report(osv.osv): _name = "account.entries.report" @@ -39,6 +40,8 @@ class account_entries_report(osv.osv): 'day': fields.char('Day', size=128, readonly=True), 'year': fields.char('Year', size=4, readonly=True), 'date': fields.date('Date', size=128, readonly=True), + 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True), + 'amount_currency': fields.float('Amount Currency', digits_compute=dp.get_precision('Account'), readonly=True), 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True), @@ -68,6 +71,7 @@ class account_entries_report(osv.osv): "partners accounts (for debit/credit computations), closed for depreciated accounts."), 'company_id': fields.many2one('res.company', 'Company', readonly=True), } + _order = 'date desc' def search(self, cr, uid, args, offset=0, limit=None, order=None, @@ -133,6 +137,8 @@ class account_entries_report(osv.osv): a.user_type as user_type, 1 as nbr, l.quantity as quantity, + l.currency_id as currency_id, + l.amount_currency as amount_currency, l.debit as debit, l.credit as credit, l.debit-l.credit as balance diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml index 046eb8852d7..2d87f6a4f06 100644 --- a/addons/account/report/account_entries_report_view.xml +++ b/addons/account/report/account_entries_report_view.xml @@ -13,6 +13,8 @@ + + @@ -77,20 +79,18 @@ + - - - - - - + + + - - - - + + + + From 61d7b4a0836be209ab67f2b6ef80879160c4008c Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 16 Sep 2010 17:26:24 +0200 Subject: [PATCH 4/5] [IMP] marketing_campaign: prevent deletion of a segment's ir_filter as it opens the segment completely bzr revid: odo@openerp.com-20100916152624-1rgfgmarqna28ko8 --- addons/marketing_campaign/marketing_campaign.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py index 4fd4fda5253..bdfe825781c 100644 --- a/addons/marketing_campaign/marketing_campaign.py +++ b/addons/marketing_campaign/marketing_campaign.py @@ -223,7 +223,8 @@ class marketing_campaign_segment(osv.osv): 'name': fields.char('Name', size=64,required=True), 'campaign_id': fields.many2one('marketing.campaign', 'Campaign', required=True, select=1, ondelete="cascade"), 'object_id': fields.related('campaign_id','object_id', type='many2one', relation='ir.model', string='Resource'), - 'ir_filter_id': fields.many2one('ir.filters', 'Filter', help="Filter to select the matching resource records that belong to this segment. New filters can be created and saved using the advanced search on the list view of the Resource. If no filter is set, all records are selected without filtering. The synchronization mode may also add a criterion to the filter."), + 'ir_filter_id': fields.many2one('ir.filters', 'Filter', ondelete="restrict", + help="Filter to select the matching resource records that belong to this segment. New filters can be created and saved using the advanced search on the list view of the Resource. If no filter is set, all records are selected without filtering. The synchronization mode may also add a criterion to the filter."), 'sync_last_date': fields.datetime('Last Synchronization', help="Date on which this segment was synchronized last time (automatically or manually)"), 'sync_mode': fields.selection([('create_date', 'Only records created after last sync'), ('write_date', 'Only records modified after last sync (no duplicates)'), From f78c1bd613edb2673aaaaa32d2101707350975bf Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 16 Sep 2010 18:45:13 +0200 Subject: [PATCH 5/5] [IMP] crm: all crm default data (sales team, categories) must be in noupdate mode bzr revid: odo@openerp.com-20100916164513-fwl69wsikb0mtjp9 --- addons/crm/crm_data.xml | 2 +- addons/crm/crm_lead_data.xml | 2 +- addons/crm/crm_opportunity_data.xml | 2 +- addons/crm/crm_phonecall_data.xml | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml index 60af74e9359..e494db325e5 100644 --- a/addons/crm/crm_data.xml +++ b/addons/crm/crm_data.xml @@ -1,6 +1,6 @@ - + Sales Department Sales diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml index 41eeb529154..566976c1d52 100644 --- a/addons/crm/crm_lead_data.xml +++ b/addons/crm/crm_lead_data.xml @@ -1,6 +1,6 @@ - + diff --git a/addons/crm/crm_opportunity_data.xml b/addons/crm/crm_opportunity_data.xml index fd4d76d5865..59e0828d0ee 100644 --- a/addons/crm/crm_opportunity_data.xml +++ b/addons/crm/crm_opportunity_data.xml @@ -1,6 +1,6 @@ - + Existing Customer diff --git a/addons/crm/crm_phonecall_data.xml b/addons/crm/crm_phonecall_data.xml index 723cfeaca26..097540bada4 100644 --- a/addons/crm/crm_phonecall_data.xml +++ b/addons/crm/crm_phonecall_data.xml @@ -1,8 +1,6 @@ --> -