[FIX] fixing default_context

bzr revid: fp@tinyerp.com-20120521160745-4bir71koyn0vqgww
This commit is contained in:
Fabien Pinckaers 2012-05-21 18:07:45 +02:00
parent ca6283de8e
commit c31a54334c
19 changed files with 29 additions and 38 deletions

View File

@ -53,7 +53,7 @@
<field name="view_mode">form</field>
<field name="view_id" ref="accounting_report_view"/>
<field name="target">new</field>
<field name="context"></field>
<field name="context">{}</field>
<field name="context" eval="{'default_account_report_id':ref('account.account_financial_report_profitandloss0')}"/>
</record>
<menuitem icon="STOCK_PRINT" name="Profit And Loss" action="action_account_report_pl" id="menu_account_report_pl" parent="final_accounting_reports"/>

View File

@ -9,7 +9,7 @@
<field name="domain">['|', ('type','=','lead'), ('type','=',False)]</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="search_view_id" ref="crm.view_crm_case_leads_filter"/>
<field name="context">{'default_type': 'lead', 'search_default_section_id': section_id, 'stage_type': 'lead'}</field>
<field name="context">{'default_type':'lead', 'stage_type':'lead'}</field>
<field name="help">
&lt;img src="http://www.thaicrmsoftware.com/wp-content/uploads/2011/11/lead-conversion.jpg" align="right" style="padding: 6px" width="306" height="223"&gt;
&lt;h2&gt;Create your first OpenERP Lead &lt;/h2&gt;
@ -66,7 +66,7 @@
<field name="res_model">crm.lead</field>
<field name="view_mode">kanban,tree,form,graph,calendar</field>
<field name="domain">[('type','=','opportunity')]</field>
<field name="context">{'search_default_new':1, 'search_default_open':1, 'search_default_section_id':section_id, 'stage_type': 'opportunity', 'default_type': 'opportunity'}</field>
<field name="context">{'search_default_new':1, 'search_default_open':1, 'stage_type': 'opportunity', 'default_type': 'opportunity'}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
<field name="help">With opportunities you can manage and keep track of your sales pipeline by creating specific customer- or prospect-related sales documents to follow up potential sales. Information such as expected revenue, opportunity stage, expected closing date, communication history and much more can be stored. Opportunities can be connected to the email gateway: new emails may create opportunities, each of them automatically gets the history of the conversation with the customer.

View File

@ -358,7 +358,7 @@
context="{'invisible_section': False}">
<filter icon="terp-personal+"
context="{'invisible_section': False}"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)"/>
<filter icon="terp-personal+"
context="{'invisible_section': False}"
@ -605,7 +605,7 @@
context="{'invisible_section': False}"
widget="selection">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
context="{'invisible_section': False}"
help="My Sales Team(s)" />
<filter icon="terp-personal+"

View File

@ -31,7 +31,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_phone_tree_view"/>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
</record>
@ -67,7 +67,7 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_inbound_phone_tree_view"/>
<field name="domain">[]</field>
<field name="context" eval="'{\'search_default_section_id\':section_id}'"/>
<field name="context">{}</field>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
<field name="help">This tool allows you to log your inbound calls on the fly. Each call you get will appear on the partner form to trace every contact you have with a partner. From the phone call form, you can trigger a request for another call, a meeting or an opportunity.</field>
@ -105,7 +105,7 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_phone_tree_view"/>
<field name="domain">[('state','!=','done')]</field>
<field name="context" eval="'{\'search_default_section_id\':section_id, \'default_state\':\'open\'}'"/>
<field name="context" eval="'{\'default_state\':\'open\'}'"/>
<field name="search_view_id" ref="crm.view_crm_case_scheduled_phonecalls_filter"/>
<field name="help">Scheduled calls list all the calls to be done by your sales team. A salesman can record the information about the call in the form view. This information will be stored in the partner form to trace every contact you have with a customer. You can also import a .CSV file with a list of calls to be done by your sales team.</field>
</record>

View File

@ -211,7 +211,7 @@
<field name="section_id"
widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
<newline/>
@ -261,7 +261,7 @@
<field name="section_id"
widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
<newline/>

View File

@ -20,7 +20,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm_case_claims_tree_view"/>
<field name="context">{'search_default_section_id': section_id,"search_default_user_id":uid, "stage_type":'claim'}</field>
<field name="context">{"search_default_user_id":uid, "stage_type":'claim'}</field>
<field name="search_view_id" ref="crm_claim.view_crm_case_claims_filter"/>
<field name="help">Record and track your customers' claims. Claims may be linked to a sales order or a lot. You can send emails with attachments and keep the full history for a claim (emails sent, intervention type and so on). Claims may automatically be linked to an email address using the mail gateway module.</field>
</record>

View File

@ -13,7 +13,7 @@
<field name="res_model">crm.fundraising</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_fundraising.crm_case_tree_view_fund"/>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="crm_fundraising.view_crm_case_fund_filter"/>
<field name="help">If you need to collect money for your organization or a campaign, Fund Raising allows you to track all your fund raising activities. In the search list, filter by funds description, email, history and probability of success.</field>
</record>

View File

@ -234,7 +234,7 @@
</field>
<field name="section_id" widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
</group>

View File

@ -17,7 +17,7 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm_case_tree_view_helpdesk"/>
<field name="search_view_id" ref="view_crm_case_helpdesk_filter"/>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="help">Helpdesk and Support allow you to track your interventions. Select a customer, add notes and categorize interventions with partners if necessary. You can also assign a priority level. Use the OpenERP Issues system to manage your support activities. Issues can be connected to the email gateway: new emails may create issues, each of them automatically gets the history of the conversation with the customer.</field>
</record>

View File

@ -232,7 +232,7 @@
<field name="user_id" widget="selection"/>
<field name="section_id" widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
<newline/>

View File

@ -106,7 +106,6 @@
<search string="Employees">
<field name="name"/>
<field name="department_id" widget="selection">
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]" string="My Departments Employee"/>
</field>
<field name="job_id" widget="selection"/>
<field name="category_ids" select="1"/>
@ -182,7 +181,7 @@
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[]</field>
<field name="context">{"search_default_department_id": department_id}</field>
<field name="context">{}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_employee_filter"/>
<field name="help">Here you can manage your work force by creating employees and assigning them specific properties in the system. Maintain all employee related information and keep track of anything that needs to be recorded for them. The personal information tab will help you maintain their identity data. The Categories tab gives you the opportunity to assign them related employee categories depending on their position and activities within the company. A category can be a seniority level within the company or a department. The Timesheets tab allows to assign them a specific timesheet and analytic journal where they will be able to enter time through the system. In the note tab, you can enter text data that should be recorded for a specific employee.</field>
@ -410,7 +409,6 @@
<separator orientation="vertical"/>
<field name="name"/>
<field name="department_id" widget="selection">
<filter icon="terp-personal+" domain="[('department_id', '=', context.get('department_id', False))]" help="My Departments Jobs"/>
</field>
<newline />
<group expand="0" string="Group By...">
@ -428,7 +426,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_job_filter"/>
<field name="context">{"search_default_Current":1,"search_default_department_id": department_id}</field>
<field name="context">{"search_default_Current":1}</field>
<field name="help">Job Positions are used to define jobs and their requirements. You can keep track of the number of employees you have per job position and how many you expect in the future. You can also attach a survey to a job position that will be used in the recruitment process to evaluate the applicants for this job position.</field>
</record>

View File

@ -148,12 +148,9 @@
<field name="employee_id"/>
<field name="date"/>
<field name="department_id" widget="selection" string="Department" context="{'invisible_department': False}">
<filter icon="terp-personal+" context="{'invisible_department': False}" domain="[('department_id','=',context.get('department_id',False))]" help="My Department"/>
</field>
<field name="name"/>
<field name="user_id" string="User">
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]"
string="Expenses of My Department"/>
</field>
</group>
<newline />

View File

@ -262,7 +262,7 @@
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_id" ref="edit_holiday_new"/>
<field name="context">{"search_default_department_id": department_id}</field>
<field name="context">{}</field>
<field name="domain">[('type','=','remove')]</field>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
<field name="help">Leave requests can be recorded by employees and validated by their managers. Once a leave request is validated, it appears automatically in the agenda of the employee. You can define several allowance types (paid holidays, sickness, etc.) and manage allowances per type.</field>
@ -295,7 +295,7 @@
<field name="name">Requests Approve</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="context">{'default_type': 'add', 'search_default_approve':1,"search_default_department_id": department_id}</field>
<field name="context">{'default_type': 'add', 'search_default_approve':1}</field>
<field name="domain">[('type','=','remove')]</field>
<field name="view_id" ref="edit_holiday_new"/>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
@ -321,7 +321,7 @@
<field name="name">Allocation Requests</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="context">{'default_type':'add',"search_default_department_id": department_id}</field>
<field name="context">{'default_type':'add'}</field>
<field name="domain">[('type','=','add')]</field>
<field name="view_id" ref="allocation_leave_new"/>
<field name="search_view_id" ref="view_hr_holidays_filter"/>

View File

@ -8,7 +8,7 @@
<field name="res_model">hr.applicant</field>
<field name="view_mode">kanban,tree,form,graph,calendar</field>
<field name="view_id" eval="False"/>
<field name="context">{'search_default_filter_inprogress':1,'search_default_filter_new':1,"search_default_department_id": department_id}</field>
<field name="context">{'search_default_filter_inprogress':1,'search_default_filter_new':1}</field>
<field name="search_view_id" ref="view_crm_case_jobs_filter"/>
<field name="help">From this menu you can track applicants in the recruitment process and manage all operations: meetings, interviews, phone calls, etc. If you setup the email gateway, applicants and their attached CV are created automatically when an email is sent to jobs@yourcompany.com. If you install the document management modules, all documents (CV and motivation letters) are indexed automatically, so that you can easily search through their content.</field>
</record>

View File

@ -165,11 +165,7 @@
<separator orientation="vertical"/>
<field name="employee_id"/>
<field name="date_from"/>
<field name="department_id" widget="selection">
<filter icon="terp-personal+"
domain="[('department_id','=',context.get('department_id',False))]"
help="My Departments Timesheet"/>
</field>
<field name="department_id" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Group By...">

View File

@ -738,7 +738,7 @@
<field name="view_mode">form</field>
<field name="view_id" ref="account.accounting_report_view"/>
<field name="target">new</field>
<field name="context"></field>
<field name="context">{}</field>
<field name="context" eval="{'default_account_report_id':ref('account_financial_report_belgiumpl0')}"/>
</record>
<menuitem icon="STOCK_PRINT" name="Profit And Loss" action="action_account_report_be_pl" id="menu_account_report_be_pl" parent="menu_finance_belgian_statement" sequence="2"/>

View File

@ -517,11 +517,11 @@ class task(osv.osv):
context key, or None if it cannot be resolved to a single project.
"""
if context is None: context = {}
if type(context.get('project_id')) in (int, long):
project_id = context['project_id']
if type(context.get('default_project_id')) in (int, long):
project_id = context['default_project_id']
return project_id
if isinstance(context.get('project_id'), basestring):
project_name = context['project_id']
if isinstance(context.get('default_project_id'), basestring):
project_name = context['default_project_id']
project_ids = self.pool.get('project.project').name_search(cr, uid, name=project_name)
if len(project_ids) == 1:
return project_ids[0][0]

View File

@ -624,7 +624,7 @@
<field name="view_mode">kanban,tree,form,calendar,gantt,graph</field>
<field eval="False" name="filter"/>
<field name="view_id" eval="False"/>
<field name="context">{"search_default_project_id": project_id}</field>
<field name="context">{}</field>
<field name="search_view_id" ref="view_task_search_form"/>
<field name="help">A task represents a work that has to be done. Each user works in his own list of tasks where he can record his task work in hours. He can work and close the task itself or delegate it to another user. If you delegate a task to another user, you get a new task in pending state, which will be reopened when you have to review the work achieved. If you install the project_timesheet module, task work can be invoiced based on the project configuration. With the project_mrp module, sales orders can create tasks automatically when they are confirmed.</field>
</record>

View File

@ -12,7 +12,7 @@
<field name="view_mode">kanban,tree,calendar</field>
<field name="view_id" eval="False"/>
<field name="domain" eval=""/>
<field name="context">{"search_default_user_id": uid, "search_default_draft": 1,"search_default_todo": 1,"search_default_project_id":project_id}</field>
<field name="context">{"search_default_user_id": uid, "search_default_draft": 1,"search_default_todo": 1}</field>
<field name="search_view_id" ref="view_project_issue_filter"/>
<field name="help">Issues such as system bugs, customer complaints, and material breakdowns are collected here. You can define the stages assigned when solving the project issue (analysis, development, done). With the mailgateway module, issues can be integrated through an email address (example: support@mycompany.com)</field>
</record>