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 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 @@ - + diff --git a/addons/base_calendar/crm_meeting_view.xml b/addons/base_calendar/crm_meeting_view.xml index 77018898c84..ec62b24dd7c 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 - @@ -220,8 +184,8 @@ - + @@ -236,4 +200,4 @@ - \ No newline at end of file + 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/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 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 1d4ee4fc2d1..279fec28411 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/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' diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index eba27492974..3124c5ebc51 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