From 9ba6f6ca86280a369af7c648da947c76d07f3bcd Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Mon, 24 May 2010 10:34:52 +0530 Subject: [PATCH] [IMP] Apply changes in search view bzr revid: ksa@tinyerp.co.in-20100524050452-ejojxuazb72l6tev --- .../report/account_analytic_report_view.xml | 27 +++--- .../report/account_invoice_report_view.xml | 43 ++++----- addons/audittrail/audittrail.py | 28 ++++++ addons/base_calendar/base_calendar_view.xml | 30 +++---- .../base_module_record/base_module_record.py | 46 +++++----- addons/crm/crm_installer.py | 17 ++-- addons/crm/crm_installer_view.xml | 1 + addons/crm/crm_lead_view.xml | 2 +- addons/crm/crm_meeting_view.xml | 4 +- addons/crm/crm_opportunity_view.xml | 8 +- addons/crm/crm_phonecall_view.xml | 14 +-- addons/crm/report/crm_lead_report_view.xml | 70 +++++++-------- .../crm/report/crm_phonecall_report_view.xml | 66 +++++++------- addons/crm_claim/crm_claim_view.xml | 2 +- .../report/crm_claim_report_view.xml | 83 +++++++++-------- .../crm_fundraising/crm_fundraising_view.xml | 2 +- .../report/crm_fundraising_report_view.xml | 66 +++++++------- addons/crm_helpdesk/crm_helpdesk_view.xml | 2 +- .../report/crm_helpdesk_report_view.xml | 54 ++++++------ addons/document/document_data.xml | 10 ++- addons/document/document_view.xml | 7 +- .../report/hr_evaluation_report_view.xml | 25 +++--- .../report/hr_expense_report_view.xml | 31 +++---- addons/hr_recruitment/hr_recruitment_view.xml | 2 +- .../report/hr_recruitment_report_view.xml | 33 +++---- .../hr_timesheet_invoice_report_view.xml | 25 +++--- .../report/timesheet_report_view.xml | 27 +++--- .../mrp/report/mrp_production_order_view.xml | 34 +++---- addons/product/product_view.xml | 9 +- addons/project/report/project_report_view.xml | 31 +++---- .../report/project_issue_report_view.xml | 88 +++++++++---------- .../purchase/report/purchase_report_view.xml | 32 +++---- addons/sale/report/sale_report_view.xml | 34 +++---- addons/wiki/wiki_view.xml | 11 +++ 34 files changed, 516 insertions(+), 448 deletions(-) diff --git a/addons/account/report/account_analytic_report_view.xml b/addons/account/report/account_analytic_report_view.xml index de97bfcb798..4c19e0caee9 100644 --- a/addons/account/report/account_analytic_report_view.xml +++ b/addons/account/report/account_analytic_report_view.xml @@ -53,7 +53,20 @@ - + + + + + + + + + + + + + + @@ -78,18 +91,6 @@ - - - - - - - - - - - - diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 5a833e454fb..bb08e92af5c 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -92,26 +92,7 @@ - - - - - - - - - - - - - - + @@ -132,6 +113,28 @@ + + + + + + + + + + + + + + + + diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py index 39930dceca8..0c212005317 100644 --- a/addons/audittrail/audittrail.py +++ b/addons/audittrail/audittrail.py @@ -533,6 +533,34 @@ class audittrail_objects_proxy(osv_pool): cr.close() + def exec_action(self, db, uid, object, action, *args, **argv): + print "actionnnnnnnnnnn" + pool = pooler.get_pool(db) + cr = pooler.get_db(db).cursor() + cr.autocommit(True) + logged_uids = [] + fct_src = super(audittrail_objects_proxy, self).exec_action + field = method + rule = False + obj_ids = pool.get('ir.model').search(cr, uid, [('model', '=', object)]) + for obj_name in pool.obj_list(): + if obj_name == 'audittrail.rule': + rule = True + rule_ids = pool.get('audittrail.rule').search(cr, uid, [('object_id', '=', obj_ids[0]), ('state', '=', 'subscribed')]) + if not rule_ids: + return super(audittrail_objects_proxy, self).exec_action(db, uid, object, action, *args, **argv) + + for thisrule in pool.get('audittrail.rule').browse(cr, uid, rule_ids): + for user in thisrule.user_id: + logged_uids.append(user.id) + if not logged_uids or uid in logged_uids: + if thisrule.log_workflow: + # return self.workflow_log(db, uid, object, method, *args,**argv) + return super(audittrail_objects_proxy, self).exec_action(db, uid, object, action, *args, **argv) + + cr.close() + + audittrail_objects_proxy() diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index 0c8a52260ef..a9cc6f9b750 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -102,8 +102,8 @@ - - + + Event Invitations ir.actions.act_window @@ -113,11 +113,11 @@ {'default_sent_by_uid': uid} - + - + - - + + Available Alarms ir.actions.act_window @@ -176,8 +176,8 @@ action="base_calendar.action_res_alarm_view" parent="base.menu_calendar_configuration" /> - - + + Event Form calendar.event @@ -338,7 +338,7 @@ - + @@ -354,9 +354,9 @@ - + - + Calendar Events Search calendar.event @@ -377,7 +377,7 @@ - + - + Events ir.actions.act_window @@ -403,11 +403,11 @@ tree,form,calendar - + - + diff --git a/addons/base_module_record/base_module_record.py b/addons/base_module_record/base_module_record.py index 9eb3f2eda7f..a48bf6841cc 100644 --- a/addons/base_module_record/base_module_record.py +++ b/addons/base_module_record/base_module_record.py @@ -43,12 +43,12 @@ class recording_objects_proxy(osv_pool): res = super(recording_objects_proxy, self).execute(*args, **argv) pool = pooler.get_pool(args[0]) mod = pool.get('ir.module.record') - + if mod and mod.recording: if args[3] not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc', 'unlink'): if _old_args is not None: if args[3] != 'write' and args[3] != 'create' and len(args) > 5 and isinstance(args[5], dict): - args=list(args) + args=list(args) args[5]=_old_args args=tuple(args) mod.recording_data.append(('osv_memory_action', args, argv ,None)) @@ -69,7 +69,7 @@ class recording_objects_proxy(osv_pool): return res recording_objects_proxy() - + class xElement(minidom.Element): """dom.Element with compact print The Element in minidom has a problem: if printed, adds whitespace @@ -88,7 +88,7 @@ def doc_createXElement(xdoc, tagName): return e import yaml - + class record(yaml.YAMLObject): yaml_tag = u'!record' def __init__(self, model, id=None, attrs={}): @@ -106,7 +106,7 @@ class workflow(yaml.YAMLObject): self.action=action def __repr__(self): return '!workflow {model: %s, action: %s, ref: %s}' % (str(self.model,), str(self.action,), str(self.ref,)) - + class ref(yaml.YAMLObject): yaml_tag = u'!ref' def __init__(self, expr="False"): @@ -129,7 +129,7 @@ class function(yaml.YAMLObject): self.attrs=attrs def __repr__(self): return '!python {model: %s}: |' % (str(self.model), ) - + class base_module_record(osv.osv): _name = "ir.module.record" _columns = { @@ -169,16 +169,16 @@ class base_module_record(osv.osv): obj = dt.browse(cr, uid, dtids[0]) self.depends[obj.module] = True return obj.module+'.'+obj.name, obj.noupdate - + def _create_record(self, cr, uid, doc, model, data, record_id, noupdate=False): data_pool = self.pool.get('ir.model.data') model_pool = self.pool.get(model) - + record = doc.createElement('record') record.setAttribute("id", record_id) record.setAttribute("model", model) record_list = [record] - + lids = data_pool.search(cr, uid, [('model','=',model)]) res = data_pool.read(cr, uid, lids[:1], ['module']) if res: @@ -207,7 +207,7 @@ class base_module_record(osv.osv): noupdate = noupdate or update if not id: relation_pool = self.pool.get(fields[key]['relation']) - + field.setAttribute("model", fields[key]['relation']) fld_nm = relation_pool._rec_name name = relation_pool.read(cr, uid, val,[fld_nm])[fld_nm] or False @@ -231,7 +231,7 @@ class base_module_record(osv.osv): newid = self._create_id(cr, uid, fields[key]['relation'], valitem[2]) valitem[1]=newid self.ids[(fields[key]['relation'], valitem[1])] = newid - + childrecord, update = self._create_record(cr, uid, doc, fields[key]['relation'],valitem[2], newid) noupdate = noupdate or update record_list += childrecord @@ -260,11 +260,11 @@ class base_module_record(osv.osv): def _create_yaml_record(self, cr, uid, model, data, record_id): record={'model': model, 'id': str(record_id)} - + model_pool = self.pool.get(model) data_pool = self.pool.get('ir.model.data') lids = data_pool.search(cr, uid, [('model','=',model)]) - + res = data_pool.read(cr, uid, lids[:1], ['module']) attrs={} if res: @@ -275,7 +275,7 @@ class base_module_record(osv.osv): defaults[model] = model_pool.default_get(cr, uid, data) except: defaults[model]={} - for key,val in data.items(): + for key,val in data.items(): if ((key in defaults[model]) and (val == defaults[model][key])) and not(fields[key].get('required',False)): continue if fields[key]['type'] in ('integer','float'): @@ -303,7 +303,7 @@ class base_module_record(osv.osv): else: fname = model_pool._inherit_fields[key][2]._fields_id del valitem[2][fname] #delete parent_field from child's fields list - + childrecord = self._create_yaml_record(cr, uid, fields[key]['relation'],valitem[2], None) items[0].append(childrecord['attrs']) attrs[key] = items @@ -343,7 +343,7 @@ class base_module_record(osv.osv): for f in filter(lambda a: isinstance(obj._columns[a], fields.function)\ and (not obj._columns[a].store),obj._columns): del data[f] - + for key,val in data.items(): if result.has_key(key): continue @@ -378,6 +378,7 @@ class base_module_record(osv.osv): return result def _create_function(self, cr, uid, doc, model, name, record_id): + print "creareeeeeeeeeeeeeeeeee" record = doc.createElement('function') record.setAttribute("name", name) record.setAttribute("model", model) @@ -402,7 +403,7 @@ class base_module_record(osv.osv): record,update = self._create_record(cr, uid, doc, rec[2], rec[5], id) noupdate = noupdate or update record_list += record - + elif rec[4] in ('menu_create',): for id in rec[5]: id,update = self._get_id(cr, uid, rec[3], id) @@ -460,6 +461,7 @@ class base_module_record(osv.osv): return record def _generate_function_yaml(self, cr, uid, args): + print "geberareeeeeeeeeeeeeeee",args db, uid, model, action, ids, context = args temp_context = context.copy() active_id = temp_context['active_id'] @@ -484,7 +486,7 @@ class base_module_record(osv.osv): attrs=str(attrs)+'})' function['attrs'] = attrs return function - + def _generate_assert_xml(self, rec, doc): pass @@ -526,7 +528,7 @@ class base_module_record(osv.osv): self.ids = {} if len(self.recording_data): yaml_file='''\n''' - + for rec in self.recording_data: if rec[1][3] == 'create': self.mode="create" @@ -565,21 +567,21 @@ class base_module_record(osv.osv): yaml_file += str(object) + '''\n''' attrs=yaml.dump(object.attrs, default_flow_style=False) yaml_file += attrs + '''\n\n''' - + yaml_result='''''' for line in yaml_file.split('\n'): line=line.replace("''","'") if (line.find('!record') == 0) or (line.find('!workflow') == 0) or (line.find('!python') == 0): line = "- \n" + " " + line elif line.find('!comment') == 0: - line=line.replace('!comment','- \n ') + line=line.replace('!comment','- \n ') elif line.find('- -') != -1: line=line.replace('- -',' -') line = " " + line else: line = " " + line yaml_result += line + '''\n''' - + return yaml_result base_module_record() diff --git a/addons/crm/crm_installer.py b/addons/crm/crm_installer.py index 1d9235feac6..d915b2082b7 100644 --- a/addons/crm/crm_installer.py +++ b/addons/crm/crm_installer.py @@ -30,18 +30,19 @@ import tools class crm_installer(osv.osv_memory): _name = 'crm.installer' _inherit = 'res.config.installer' - + _columns = { - 'name': fields.char('Name', size=64), - 'crm_helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."), - 'crm_fundraising': fields.boolean('Fundraising', help="This may help associations in their fund raising process and tracking."), - 'crm_claim': fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."), - 'crm_caldav': fields.boolean('Calendar Synchronizing', help="Help you to synchronize the meetings with other calender clients(e.g.: Sunbird)."), + 'name': fields.char('Name', size=64), + 'crm_helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."), + 'crm_fundraising': fields.boolean('Fundraising', help="This may help associations in their fund raising process and tracking."), + 'crm_claim': fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."), + 'crm_caldav': fields.boolean('Calendar Synchronizing', help="Help you to synchronize the meetings with other calender clients(e.g.: Sunbird)."), 'sale_crm': fields.boolean('Create Quotation from Opportunity', help="This module relates sale to opportunity cases in the CRM."), + 'wiki_sale_faq': fields.boolean('Sales FAQ', help="This module relates to Document & CRM."), 'fetchmail': fields.boolean('Fetch Emails', help="Fetchmail Server."), - 'thunderbird': fields.boolean('Thunderbird', help="Thunderbird Interface."), + 'thunderbird': fields.boolean('Thunderbird', help="Thunderbird Interface."), } - + def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): res = super(crm_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) #Checking sale module is installed or not diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml index 370285352d1..9986e247232 100644 --- a/addons/crm/crm_installer_view.xml +++ b/addons/crm/crm_installer_view.xml @@ -36,6 +36,7 @@ + diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index f521f734b1f..8f5769dcb01 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -309,7 +309,7 @@ help="Show Sales Team"/> - + diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml index 803e0ffedbe..b0d5364ab07 100644 --- a/addons/crm/crm_meeting_view.xml +++ b/addons/crm/crm_meeting_view.xml @@ -281,7 +281,7 @@ - + - + diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml index 38e12d7a6b8..b61ef69da3c 100644 --- a/addons/crm/crm_opportunity_view.xml +++ b/addons/crm/crm_opportunity_view.xml @@ -306,7 +306,7 @@ help="My section" /> - + - + @@ -343,11 +343,11 @@ - + - +