[MERGE] Merged with main addons.

bzr revid: tde@openerp.com-20120522075156-psy9wce50hplu4dw
This commit is contained in:
Thibault Delavallée 2012-05-22 09:51:56 +02:00
commit 272ab4a01d
31 changed files with 220 additions and 320 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

@ -227,10 +227,7 @@ class crm_base(object):
return uid
def _get_section(self, cr, uid, context=None):
"""Gives section id for current User
"""
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.context_section_id.id or False
return False
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
"""This function returns value of partner email based on Partner Address
@ -608,20 +605,4 @@ def _links_get(self, cr, uid, context=None):
res = obj.read(cr, uid, ids, ['object', 'name'], context)
return [(r['object'], r['name']) for r in res]
class users(osv.osv):
_inherit = 'res.users'
_description = "Users"
_columns = {
'context_section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
def create(self, cr, uid, vals, context=None):
res = super(users, self).create(cr, uid, vals, context=context)
section_obj=self.pool.get('crm.case.section')
if vals.get('context_section_id'):
section_obj.write(cr, uid, [vals['context_section_id']], {'member_ids':[(4, res)]}, context)
return res
users()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

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', 'search_default_inbox': 1}</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

@ -137,7 +137,7 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
@ -341,7 +341,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}"
@ -514,7 +514,7 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
@ -589,7 +589,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

@ -378,32 +378,6 @@
groups="base.group_no_one" sequence="15"
parent="base.menu_base_config" />
<record model="ir.ui.view" id="view_users_form_simple_modif_inherited1">
<field name="name">view.users.form.crm.modif.inherited1</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="type">form</field>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_section_id" completion="1"
readonly="0"/>
</group>
</field>
</record>
<record id="view_users_form_simple_modif_inherited2" model="ir.ui.view">
<field name="name">view.users.form.crm.modif.inherited2</field>
<field name="model">res.users</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_section_id" completion="1"/>
</group>
</field>
</record>
<!-- menu for the working time -->
<menuitem action="resource.action_resource_calendar_form" id="menu_action_resource_calendar_form" parent="resource.menu_resource_config" sequence="1"/>

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

@ -105,14 +105,5 @@ class ir_action_window(osv.osv):
ir_action_window()
class res_users(osv.osv):
_inherit = 'res.users'
_description = 'User'
_columns = {
'context_department_id': fields.many2one('hr.department', 'Departments'),
}
res_users()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -57,27 +57,5 @@
<menuitem action="open_module_tree_department" id="menu_hr_department_tree" parent="hr.menu_hr_configuration" sequence="5"/>
<record model="ir.ui.view" id="view_users_form_inherit">
<field name="name">res.users.form</field>
<field name="type">form</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_department_id" completion="1" widget="selection" string="Department"/>
</group>
</field>
</record>
<record model="ir.ui.view" id="view_department_form_simple_modif_inherited1">
<field name="name">view.department.form.hr.inherited1</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="type">form</field>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_department_id" widget="selection" readonly="0"/>
</group>
</field>
</record>
</data>
</openerp>

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, 'search_default_inbox': 1}</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

@ -152,7 +152,7 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>

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

@ -898,7 +898,6 @@ class sugar_import(import_framework):
'context_lang' : 'context_lang',
'password' : 'password',
'.id' : '.id',
'context_department_id/id': self.get_users_department,
'user_email' : 'email1',
}
}

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

@ -27,7 +27,7 @@
<field name="notification_email_pref"/>
</field>
<xpath expr="/form/sheet" position="after">
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</xpath>

View File

@ -508,13 +508,6 @@ def Project():
project()
class users(osv.osv):
_inherit = 'res.users'
_columns = {
'context_project_id': fields.many2one('project.project', 'Project')
}
users()
class task(osv.osv):
_name = "project.task"
_description = "Task"
@ -528,11 +521,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]
@ -1380,7 +1373,7 @@ class project_task_history_cumulative(osv.osv):
id as history_id,
date+generate_series(0, CAST((coalesce(end_date,DATE 'tomorrow')::date - date)AS integer)-1) as date,
task_id, type_id, user_id, kanban_state, state,
remaining_hours, planned_hours
greatest(remaining_hours,1) as remaining_hours, greatest(planned_hours,1) as planned_hours
FROM
project_task_history
) as history

View File

@ -100,7 +100,7 @@
</notebook>
<newline/>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
@ -406,7 +406,7 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
@ -626,7 +626,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, 'search_default_inbox': 1}</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>
@ -749,31 +749,6 @@
</record>
<!-- User Form-->
<record id="view_project_users_form_simple" model="ir.ui.view">
<field name="name">res.users.project.form1</field>
<field name="model">res.users</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_project_id"/>
</group>
</field>
</record>
<record model="ir.ui.view" id="view_users_form_project_modif_inherited1">
<field name="name">view.users.form.project.modif.inherited1</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="type">form</field>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_project_id" context="{'user_preference':True}" widget="selection" readonly="0"/>
</group>
</field>
</record>
<act_window context="{'search_default_user_id': [active_id], 'default_user_id': active_id}" domain="[('state', '&lt;&gt;', 'cancelled'),('state', '&lt;&gt;', 'done')]" id="act_res_users_2_project_task_opened" name="Assigned Tasks" res_model="project.task" src_model="res.users" view_mode="tree,form,gantt,calendar,graph" view_type="form"/>
<act_window context="{'search_default_user_id': [active_id], 'default_user_id': active_id}" domain="[('state', '&lt;&gt;', 'cancelled'),('state', '&lt;&gt;', 'done')]" id="act_res_users_2_project_task_opened" name="Assigned Tasks" res_model="project.task" src_model="res.users" view_mode="tree,form,gantt,calendar,graph" view_type="form"/>
</data>
</openerp>

View File

@ -1,42 +1,50 @@
.project_fields {
margin-top: 1px;
margin-bottom: 1px;
font-size: 11px;
padding-left: 0px;
}
margin-top: 1px;
margin-bottom: 1px;
font-size: 11px;
padding-left: 0px;
}
.project_fields td {
border: none;
padding: 2px 0 2px 8px; }
padding: 2px 0 2px 8px;
}
.project_fields th {
padding: 0;
border-right: 1px solid #dddddd;
vertical-align: top;
margin-right: 8px; }
margin-right: 8px;
}
.project_vignettes{
padding: 4px !important }
.project_vignettes li {
padding: 4px !important;
}
.project_vignettes li {
float: left;
}
.project_vignettes .project_avatar {
}
.project_vignettes .project_avatar {
width: 30px;
height: 30px;
padding-left: 0px; }
.project_vignettes .project_fields {
width: 100%; }
.project_vignettes .project_fields th {
width: 120px;
font-weight: normal; }
.project_vignettes .project_fields td {
color: #888888; }
.project_vignettes h4 a {
color: #4c4c4c; }
.project_vignettes > li h4 {
padding-left: 0px;
}
.project_vignettes .project_fields {
width: 100%;
}
.project_vignettes .project_fields th {
width: 120px;
font-weight: normal;
}
.project_vignettes .project_fields td {
color: #888888;
}
.project_vignettes h4 a {
color: #4c4c4c;
}
.project_vignettes > li h4 {
margin-bottom: 2px;
padding-left: 2px; }
padding-left: 2px;
}
.oe_project_buttons {
padding: 2px 2px !important;
background: none !important;
background: none !important;
background-color: transparent !important;
border: hidden !important;
color: #8A89BA !important;
@ -51,8 +59,8 @@
border-radius: 4px;
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.click_button {
background: none !important;
background-color: transparent !important;
@ -68,54 +76,60 @@
-webkit-box-align: baseline;
}
.click_button:hover {
cursor: default !important;
}
.dropdown-menu {
display: none;
position: absolute; }
display: none;
position: absolute;
}
.dropdown {
position: relative; }
position: relative;
}
.dropdown-toggle:after {
width: 0;
height: 0;
display: inline-block;
content: "&darr";
text-indent: -99999px;
vertical-align: top;
margin-top: 8px;
margin-left: 4px;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid white;
filter: alpha(opacity=50);
-khtml-opacity: 0.5;
-moz-opacity: 0.5;
opacity: 0.5; }
.oe_project_kanban_vignette .dropdown-menu .color-chooser {
padding: 0 3px; }
.oe_project_kanban_vignette .dropdown-menu .color-chooser li {
float: left; }
.oe_project_kanban_vignette .dropdown-menu .color-chooser li a {
padding: 2px; }
width: 0;
height: 0;
display: inline-block;
content: "&darr";
text-indent: -99999px;
vertical-align: top;
margin-top: 8px;
margin-left: 4px;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid white;
filter: alpha(opacity=50);
-khtml-opacity: 0.5;
-moz-opacity: 0.5;
opacity: 0.5;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser {
padding: 0 3px;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser li {
float: left;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser li a {
padding: 2px;
}
a.oe_project_kanban_action {
position: absolute;
right: 0;
display: none;
}
a.oe_project_kanban_action:hover {
text-decoration: none; }
a.oe_project_kanban_action .oe_i {
color: #4c4c4c; }
.square {
display: inline-block;
width: 18px;
height: 18px;
border:1px solid grey;
}
position: absolute;
right: 0;
display: none;
}
a.oe_project_kanban_action:hover {
text-decoration: none;
}
a.oe_project_kanban_action .oe_i {
color: #4c4c4c;
}
.square {
display: inline-block;
width: 18px;
height: 18px;
border:1px solid grey;
}
.oe_kanban_color_0 {
background: white;
}
@ -136,85 +150,97 @@ a.oe_project_kanban_action {
}
.open {
display: block;
}
.open .dropdown-menu {
display: block; }
display: block;
}
.open .dropdown-menu {
display: block;
}
a.oe_project_kanban_action {
position: absolute;
right: 0;
}
a.oe_project_kanban_action:hover {
position: absolute;
right: 0;
}
a.oe_project_kanban_action:hover {
text-decoration: none;
}
a.oe_project_kanban_action .eo_i {
color: #4c4c4c; }
}
a.oe_project_kanban_action .eo_i {
color: #4c4c4c;
}
.oe_project_kanban_vignette {
position: relative;
min-height: 50px;
/*background: white;*/
border: 1px solid #d8d8d8;
border-bottom-color: #b9b9b9;
padding: 6px;
margin: 6px 0;
display: inline-block;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
position: relative;
min-height: 50px;
/*background: white;*/
border: 1px solid #d8d8d8;
border-bottom-color: #b9b9b9;
padding: 6px;
margin: 6px 0;
display: inline-block;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
}
.oe_project_kanban_vignette:last-child {
margin-bottom: 0; }
.oe_project_kanban_vignette:hover {
.oe_project_kanban_vignette:last-child {
margin-bottom: 0;
}
.oe_project_kanban_vignette:hover {
-moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); }
.oe_project_kanban_vignette h4 {
margin: 0 0 2px; }
-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}
.oe_project_kanban_vignette h4 {
margin: 0 0 2px;
}
.oe_project_kanban_vignette .dropdown-menu {
top: 30px;
right: -140px;
padding: 4px;
border: 1px solid #afafb6;
width: 160px;
overflow-x: hidden;
z-index: 900;
background: white;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.oe_project_kanban_vignette .dropdown-menu p {
margin-left: 12px; }
.oe_project_kanban_vignette .dropdown-menu li {
top: 30px;
right: -140px;
padding: 4px;
border: 1px solid #afafb6;
width: 160px;
overflow-x: hidden;
z-index: 900;
background: white;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.oe_project_kanban_vignette .dropdown-menu p {
margin-left: 12px;
}
.oe_project_kanban_vignette .dropdown-menu li {
float: none;
display: block;
background-color: none; }
.oe_project_kanban_vignette .dropdown-menu li a {
display: block;
padding: 3px 6px;
clear: both;
font-weight: normal;
line-height: 14px;
color: #4c4c4c;
text-decoration: none; }
.oe_project_kanban_vignette .dropdown-menu li a:hover {
background: #f0f0fa;
background: -moz-linear-gradient(#f0f0fa, #eeeef6);
background: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
background: -webkit-linear-gradient(#f0f0fa, #eeeef6);
-moz-box-shadow: none;
-webkit-box-shadow: none;
-box-shadow: none; }
background-color: none;
}
.oe_project_kanban_vignette .dropdown-menu li a {
display: block;
padding: 3px 6px;
clear: both;
font-weight: normal;
line-height: 14px;
color: #4c4c4c;
text-decoration: none;
}
.oe_project_kanban_vignette .dropdown-menu li a:hover {
background: #f0f0fa;
background: -moz-linear-gradient(#f0f0fa, #eeeef6);
background: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
background: -webkit-linear-gradient(#f0f0fa, #eeeef6);
-moz-box-shadow: none;
-webkit-box-shadow: none;
-box-shadow: none;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser {
padding: 0 3px; }
.oe_project_kanban_vignette .dropdown-menu .color-chooser li {
float: left; }
.oe_project_kanban_vignette .dropdown-menu .color-chooser li a {
padding: 2px; }
padding: 0 3px;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser li {
float: left;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser li a {
padding: 2px;
}

View File

@ -3,31 +3,30 @@ openerp.project = function(openerp) {
bind_events: function() {
var self = this;
self._super();
if(this.view.dataset.model == 'project.project') {
if (this.view.dataset.model == 'project.project') {
/*set avatar title for members.
In many2many fields, returns only list of ids.
we can implement return value of m2m fields like [(1,"Adminstration"),...].
*/
_.each($(this.$element).find('.project_avatar'),function(avatar){
_.each($(this.$element).find('.project_avatar'), function(avatar) {
var dataset = new openerp.web.DataSetSearch(this, 'res.users', self.session.context, [['id','=',avatar.id]]);
dataset.read_slice(['name']).then(function(result){
avatar.setAttribute("title",result[0].name)
dataset.read_slice(['name']).then(function(result) {
avatar.setAttribute("title",result[0].name);
});
});
});
// set sequence like Tasks,Issues,Timesheets and Phases
var my_list = $("#list a")
var my_list = $("#list a");
my_list.sort(function (a, b) {
var aValue = parseInt(a.id);
var bValue = parseInt(b.id);
var aValue = parseInt(a.id, 10);
var bValue = parseInt(b.id, 10);
return aValue == bValue ? 0 : aValue < bValue ? -1 : 1;
});
});
$('#list').replaceWith(my_list);
// when vignette is clicked, it opens the first action in sequence
if (my_list.length != 0) {
var click_button = $(this.$element).find('.click_button')
if (my_list.length !== 0) {
var click_button = $(this.$element).find('.click_button');
click_button.attr('data-name', my_list[0].getAttribute('data-name'));
click_button.attr('data-type', "action");
}
@ -36,13 +35,13 @@ openerp.project = function(openerp) {
we can do other way to implement new widget.
because we need to rpc call for that.
*/
this.$element.find('.bgcolor').click(function(){
var color = parseInt($(this).find('span').attr('class').split(' ')[0].substring(16))
var color_class = $(this).find('span').attr('class').split(' ')[0]
this.$element.find('.bgcolor').click(function() {
var color = parseInt($(this).find('span').attr('class').split(' ')[0].substring(16), 10);
var color_class = $(this).find('span').attr('class').split(' ')[0];
$(this).closest('#oe_project_kanban_vignette').removeClass().addClass(color_class + ' oe_project_kanban_vignette');
self.view.dataset.write(parseInt(this.id), {color:color});
self.view.dataset.write(parseInt(this.id, 10), {color:color});
});
}
}
});
}
};

View File

@ -142,12 +142,6 @@ class project_issue(crm.crm_case, osv.osv):
res[issue.id] = {'progress' : progress}
return res
def _get_project(self, cr, uid, context=None):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if user.context_project_id:
return user.context_project_id.id
return False
def on_change_project(self, cr, uid, ids, project_id, context=None):
return {}
@ -263,7 +257,6 @@ class project_issue(crm.crm_case, osv.osv):
'section_id': crm.crm_case._get_section,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
'priority': crm.AVAILABLE_PRIORITIES[2][0],
'project_id':_get_project,
'categ_id' : lambda *a: False,
}

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, 'search_default_inbox': 1}</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>

View File

@ -265,7 +265,7 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>

View File

@ -942,7 +942,7 @@
<field name="partner_id" on_change="onchange_partner_in(partner_id)" colspan="4" string="Customer"/>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</xpath>
@ -1058,7 +1058,7 @@
<field name="partner_id" on_change="onchange_partner_in(partner_id)" colspan="4" string="Supplier"/>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</xpath>