From 7d968c359059af9a856cab30d8a5f50bbcacd66c Mon Sep 17 00:00:00 2001 From: "Ajay Chauhan (OpenERP)" Date: Fri, 30 Nov 2012 14:20:46 +0530 Subject: [PATCH 1/6] [IMP] account_analytic_analysis: made changes in filters bzr revid: cha@tinyerp.com-20121130085046-0p4etgeiwdismala --- .../account_analytic_analysis_menu.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml index 9eb8fe90895..368dd7f3b65 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml @@ -8,7 +8,7 @@ form tree,form [('invoice_id','=',False)] - {'search_default_to_invoice': 1} + {'search_default_to_invoice': 1, 'search_default_sales': 1}

@@ -34,7 +34,7 @@ - + From 2c130707a7f99ef879e605090f1beda89f821167 Mon Sep 17 00:00:00 2001 From: "Rajesh Prajapati (OpenERP)" Date: Fri, 30 Nov 2012 15:22:39 +0530 Subject: [PATCH 2/6] [IMP] General : Mark Read and Mark Unread removed from all objects bzr revid: rpr@tinyerp.com-20121130095239-e60l299dut71x5ng --- addons/base_calendar/crm_meeting_view.xml | 37 ---------- addons/crm/crm_lead_view.xml | 36 --------- addons/crm/crm_phonecall_view.xml | 36 --------- addons/event/event_view.xml | 73 ------------------ addons/hr_holidays/hr_holidays_view.xml | 37 ---------- addons/hr_recruitment/hr_recruitment_view.xml | 37 ---------- addons/project/project_view.xml | 74 ------------------- addons/project_issue/project_issue_view.xml | 37 ---------- addons/purchase/purchase_view.xml | 37 ---------- addons/sale/sale_view.xml | 37 ---------- 10 files changed, 441 deletions(-) diff --git a/addons/base_calendar/crm_meeting_view.xml b/addons/base_calendar/crm_meeting_view.xml index 84c03d68dbd..a6f7ada54ba 100644 --- a/addons/base_calendar/crm_meeting_view.xml +++ b/addons/base_calendar/crm_meeting_view.xml @@ -2,43 +2,6 @@ - - - - CRM Meeting: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_crm_meeting_read - - - action - - crm.meeting - client_action_multi - - - - CRM Meeting: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_crm_meeting_unread - - - action - - crm.meeting - client_action_multi - diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index c552b1835f2..3bbdf05655e 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -2,42 +2,6 @@ - - - CRM Lead: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_crm_lead_unread - - - action - - crm.lead - client_action_multi - - - - CRM Lead: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_crm_lead_read - - - action - - crm.lead - client_action_multi - - - CRM Phonecall: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_crm_phonecall_unread - - - action - - crm.phonecall - client_action_multi - - - - CRM Phonecall: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_crm_phonecall_read - - - action - - crm.phonecall - client_action_multi - diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index a9a60570735..efdbf1be3b2 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -57,43 +57,6 @@ - - - Event: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_event_event_unread - - - action - - event.event - client_action_multi - - - - Event: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_event_event_read - - - action - - event.event - client_action_multi - - Events event.event @@ -375,42 +338,6 @@ - - - Event registration : Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_event_registration_unread - - - action - - event.registration - client_action_multi - - - - Event registration : Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_event_registration_read - - - action - - event.registration - client_action_multi - event.registration.tree diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index aba6dd36538..0d2e958728d 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -1,43 +1,6 @@ - - - Holidays: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_holidays_unread - - - action - - hr.holidays - client_action_multi - - - - Holidays: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_holidays_read - - - action - - hr.holidays - client_action_multi - - hr.holidays.filter hr.holidays diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 8282c5a300c..e686ee32665 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -35,43 +35,6 @@ - - - HR Applicant: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_project_unread - - - action - - hr.applicant - client_action_multi - - - - HR Applicant: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_project_read - - - action - - hr.applicant - client_action_multi - - Applicants hr.applicant diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 840d9b47ae0..07cbbce63d9 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -19,43 +19,6 @@ {'search_default_project_id': [active_id], 'default_project_id': active_id} - - - Project: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_project_unread - - - action - - project.project - client_action_multi - - - - Project: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_project_read - - - action - - project.project - client_action_multi - - project.project.form @@ -342,43 +305,6 @@ - - - Task: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_project_task_unread - - - action - - project.task - client_action_multi - - - - Task: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_project_task_read - - - action - - project.task - client_action_multi - - project.task.form project.task diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 60cc6448a46..069f6d8c684 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -4,43 +4,6 @@ - - - Issue: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_project_issue_unread - - - action - - project.issue - client_action_multi - - - - Issue: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_project_issue_read - - - action - - project.issue - client_action_multi - - Issue Version project.issue.version diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index f0be9e56dec..39455e36c7e 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -132,43 +132,6 @@ - - - Purchase: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_purchase_order_unread - - - action - - purchase.order - client_action_multi - - - - Purchase: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_purchase_order_read - - - action - - purchase.order - client_action_multi - - purchase.order.calendar purchase.order diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index dd9cfad066a..45dc7a5819d 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -66,43 +66,6 @@ - - - Sale: Mark unread - True - ir.actions.server - - code - self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) - - - action_sale_order_unread - - - action - - sale.order - client_action_multi - - - - Sale: Mark read - True - ir.actions.server - - code - self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) - - - action_sale_order_read - - - action - - sale.order - client_action_multi - - sale.order.calendar sale.order From 72e6e33475675ff650cd34c1605970a036eb1f8c Mon Sep 17 00:00:00 2001 From: "Ajay Chauhan (OpenERP)" Date: Fri, 30 Nov 2012 16:47:05 +0530 Subject: [PATCH 3/6] [IMP] crm: changed filter string & help bzr revid: cha@tinyerp.com-20121130111705-gii2q1i5v13f3pfd --- addons/crm/crm_phonecall_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index a6e8dbe397a..29e7e961394 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -220,8 +220,8 @@ - + From 1626eca850dde534ba68c15488eea9a4d28ecca6 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 7 Dec 2012 14:41:10 +0100 Subject: [PATCH 4/6] [IMP] product: set the product.uom names to be optionnaly plural, so that you can display the field after a value without having to care for the singular/plural bzr revid: qdp-launchpad@openerp.com-20121207134110-xx0482e7kiemsl4s --- addons/product/product_data.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/product/product_data.xml b/addons/product/product_data.xml index 8e5280d036a..49362e380f4 100644 --- a/addons/product/product_data.xml +++ b/addons/product/product_data.xml @@ -33,13 +33,13 @@ --> - Unit + Unit(s) - Dozen + Dozen(s) bigger @@ -55,13 +55,13 @@ smaller - Hour + Hour(s) smaller - Day + Day(s) @@ -91,7 +91,7 @@ smaller - Litre + Liter(s) 1.0 From 87644c5c3ddcb694b8136cf791fc17eddaf77c58 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 7 Dec 2012 15:43:17 +0100 Subject: [PATCH 5/6] [FIX] account: traceback when opening the report 'general ledger' on a given list of account.account + fixed the fields_view_get bzr revid: qdp-launchpad@openerp.com-20121207144317-vgm0gjf0y4iliv78 --- addons/account/wizard/account_report_common.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py index 4438484aaaf..2c1448b5e6f 100644 --- a/addons/account/wizard/account_report_common.py +++ b/addons/account/wizard/account_report_common.py @@ -24,6 +24,7 @@ from lxml import etree from osv import fields, osv from tools.translate import _ +from openerp.osv.orm import setup_modifiers class account_common_report(osv.osv_memory): _name = "account.common.report" @@ -67,16 +68,16 @@ class account_common_report(osv.osv_memory): (_check_company_id, 'The fiscalyear, periods or chart of account chosen have to belong to the same company.', ['chart_account_id','fiscalyear_id','period_from','period_to']), ] - def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): if context is None:context = {} res = super(account_common_report, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False) - if context.get('active_model', False) == 'account.account' and view_id: + if context.get('active_model', False) == 'account.account': doc = etree.XML(res['arch']) nodes = doc.xpath("//field[@name='chart_account_id']") for node in nodes: node.set('readonly', '1') node.set('help', 'If you print the report from Account list/form view it will not consider Charts of account') + setup_modifiers(node, res['fields']['chart_account_id']) res['arch'] = etree.tostring(doc) return res @@ -121,8 +122,8 @@ class account_common_report(osv.osv_memory): now = time.strftime('%Y-%m-%d') company_id = False ids = context.get('active_ids', []) - if ids: - company_id = self.browse(cr, uid, ids[0], context=context).company_id.id + if ids and context.get('active_model') == 'account.account': + company_id = self.pool.get('account.account').browse(cr, uid, ids[0], context=context).company_id.id fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now), ('company_id', '=', company_id)], limit=1) return fiscalyears and fiscalyears[0] or False From 87e36fb9f706846831beda36e4eedea200a0495c Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 7 Dec 2012 15:54:48 +0100 Subject: [PATCH 6/6] [FIX] project_timesheet: fixing the redbot bzr revid: qdp-launchpad@openerp.com-20121207145448-2vgdjrekxt2cp4gn --- addons/project_timesheet/test/work_timesheet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_timesheet/test/work_timesheet.yml b/addons/project_timesheet/test/work_timesheet.yml index 4867f92b4b1..d8367e9f7d8 100644 --- a/addons/project_timesheet/test/work_timesheet.yml +++ b/addons/project_timesheet/test/work_timesheet.yml @@ -18,5 +18,5 @@ task_ids = self.browse(cr, uid, task_work, context) assert task_ids.user_id.id == ref("base.user_demo"), 'Error, The User in Timesheet is not Correct' assert task_ids.date == start, 'Error, The Date in Timesheet is not ok' - assert task_ids.product_uom_id.name == "Hour", 'Error, The Hour in Timesheet is not ok' + assert task_ids.product_uom_id.name == "Hour(s)", 'Error, The Hour in Timesheet is not ok'