[IMP] General improvements to issues and claims.
bzr revid: vta@openerp.com-20121120130824-zmx5yhaalwf3potd
This commit is contained in:
parent
e1bb8e587c
commit
41dad5cf02
|
@ -41,9 +41,11 @@ class base_stage(object):
|
|||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
if not context or not context.get('portal'):
|
||||
if not context:
|
||||
return False
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
if context.get('portal'):
|
||||
return user.partner_id.id
|
||||
if hasattr(user, 'partner_address_id') and user.partner_address_id:
|
||||
return user.partner_address_id
|
||||
return user.company_id.partner_id.id
|
||||
|
@ -65,7 +67,7 @@ class base_stage(object):
|
|||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
if not context or not context.get('portal'):
|
||||
if not context or context.get('portal'):
|
||||
return False
|
||||
return uid
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
<header>
|
||||
<button name="case_close" string="Settle" type="object" class="oe_highlight"
|
||||
states="draft,open,pending" groups="base.group_user"/>
|
||||
<button name="case_cancel" string="Reject" type="object" groups="base.group_user"
|
||||
<button name="case_cancel" string="Reject" type="object" groups="base.group_user"
|
||||
states="draft,open,pending"/>
|
||||
<field name="stage_id" widget="statusbar" clickable="True"/>
|
||||
</header>
|
||||
|
@ -113,9 +113,9 @@
|
|||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="4" col="4" groups="base.group_user">
|
||||
<field name="user_id"/>
|
||||
<field name="priority" groups="base.group_user"/>
|
||||
<field name="priority"/>
|
||||
<field name="section_id"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
|
@ -130,17 +130,17 @@
|
|||
<field name="partner_phone"/>
|
||||
<field name="email_from" widget="email"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<group colspan="2" col="2" groups="base.group_user">
|
||||
<separator colspan="2" string="Responsibilities"/>
|
||||
<field name="user_fault"/>
|
||||
<field name="categ_id" widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<field name="ref"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Claim/Action Description"/>
|
||||
<separator colspan="4" string="Claim/Action Description" groups="base.group_user"/>
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Follow Up">
|
||||
<page string="Follow Up" groups="base.group_user">
|
||||
<group colspan="2" col="2">
|
||||
<separator colspan="2" string="Actions"/>
|
||||
<field name="date_action_next"/>
|
||||
|
|
|
@ -1,14 +1,80 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data>
|
||||
|
||||
<record id="portal_crm_claim_kanban_view" model="ir.ui.view">
|
||||
<field name="name">CRM Claim Kanban</field>
|
||||
<field name="model">crm.claim</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban version="7.0" class="oe_portal_project_issue">
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="priority"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="categ_id"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_card oe_kanban_global_click">
|
||||
<div class="oe_kanban_content">
|
||||
<div class="oe_left">
|
||||
<h1><field name="name"/></h1>
|
||||
</div>
|
||||
<div class="oe_text_right">
|
||||
<h1><field name="stage_id" readonly="1"/></h1>
|
||||
</div>
|
||||
<div class="oe_kanban_footer_left">
|
||||
<field name="partner_id"/>
|
||||
</div>
|
||||
<div class="oe_clear"/>
|
||||
<div>
|
||||
<div class="oe_right">
|
||||
Creation: <field name="date"/>
|
||||
<span class="oe_kanban_highlight">
|
||||
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
|
||||
<a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority">
|
||||
<img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>
|
||||
</a>
|
||||
<a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority">
|
||||
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>
|
||||
</a>
|
||||
<a type="object" name="set_priority" args="['2']" title="High Priority">
|
||||
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>
|
||||
</a>
|
||||
<a type="object" name="set_priority" args="['1']" title="Highest Priority">
|
||||
<img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
|
||||
</a>
|
||||
</span>
|
||||
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())">
|
||||
<span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span>
|
||||
</t>
|
||||
<t t-if="record.user_id">
|
||||
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
|
||||
</t>
|
||||
</div>
|
||||
<t t-if="record.categ_id.raw_value">
|
||||
<div class="oe_left oe_tags">
|
||||
<span class="oe_tag oe_left" t-att-data-categ_id="record.categ_id.raw_value[0]"><t t-raw="record.categ_id.raw_value[1]"/></span>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_categ_claim0" model="ir.actions.act_window">
|
||||
<field name="name">Claims</field>
|
||||
<field name="res_model">crm.claim</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar,form</field>
|
||||
<field name="view_id" ref="crm_claim.crm_case_claims_tree_view"/>
|
||||
<field name="context">{"search_default_user_id":'', "stage_type":'claim'}</field>
|
||||
<field name="view_mode">tree,form,kanban,calendar</field>
|
||||
<field name="view_id" ref="portal_crm_claim_kanban_view"/>
|
||||
<field name="context">{"search_default_user_id":'', "stage_type":'claim', "portal":'True'}</field>
|
||||
<field name="search_view_id" ref="crm_claim.view_crm_case_claims_filter"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_crm_claim,crm.claim,crm_claim.model_crm_claim,portal.group_portal,1,0,0,0
|
||||
access_crm_claim,crm.claim,crm_claim.model_crm_claim,portal.group_portal,1,0,1,0
|
||||
access_crm_claim_stage,crm.claim.stage,crm_claim.model_crm_claim_stage,portal.group_portal,1,0,0,0
|
||||
|
|
|
|
@ -10,7 +10,7 @@
|
|||
<field eval="1" name="perm_unlink"/>
|
||||
<field eval="1" name="perm_write"/>
|
||||
<field eval="1" name="perm_read"/>
|
||||
<field eval="0" name="perm_create"/>
|
||||
<field eval="1" name="perm_create"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
|
|
@ -18,4 +18,3 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
|
|
@ -20,42 +20,39 @@
|
|||
<div class="oe_kanban_content">
|
||||
<div class="oe_left">
|
||||
<h1><field name="name"/></h1>
|
||||
<field name="partner_id"/> <br/>
|
||||
<field name="version_id"/>
|
||||
</div>
|
||||
<div class="oe_kanban_footer_left">
|
||||
<div class="oe_left oe_tags">
|
||||
<t t-foreach="record.categ_ids.raw_value" t-as="categ_id">
|
||||
<span class="oe_tag" t-att-data-categ_id="categ_id"></span>
|
||||
</t>
|
||||
<field name="categ_ids"/>
|
||||
<div class="oe_kanban_footer_left">
|
||||
<field name="partner_id" context="{'portal':1}"/> <br/>
|
||||
<field name="version_id"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_text_right">
|
||||
<h1><field name="stage_id" readonly="1"/></h1>
|
||||
<h1><field name="state" readonly="1"/></h1>
|
||||
</div>
|
||||
<div class="oe_clear"></div>
|
||||
<div class="oe_right">
|
||||
Creation: <field name="create_date"/>
|
||||
<span class="oe_kanban_highlight">
|
||||
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
|
||||
<a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority">
|
||||
<img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>
|
||||
</a>
|
||||
<a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority">
|
||||
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>
|
||||
</a>
|
||||
<a type="object" name="set_priority" args="['2']" title="High Priority">
|
||||
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>
|
||||
</a>
|
||||
<a type="object" name="set_priority" args="['1']" title="Highest Priority">
|
||||
<img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
|
||||
</a>
|
||||
</span>
|
||||
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())">
|
||||
<span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span>
|
||||
</t>
|
||||
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
|
||||
<div class="oe_clear"/>
|
||||
<div>
|
||||
<div class="oe_right">
|
||||
Creation: <field name="create_date"/>
|
||||
<span class="oe_kanban_highlight">
|
||||
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
|
||||
<a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority">
|
||||
<img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>
|
||||
</a>
|
||||
<a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority">
|
||||
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>
|
||||
</a>
|
||||
<a type="object" name="set_priority" args="['2']" title="High Priority">
|
||||
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>
|
||||
</a>
|
||||
<a type="object" name="set_priority" args="['1']" title="Highest Priority">
|
||||
<img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
|
||||
</a>
|
||||
</span>
|
||||
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())">
|
||||
<span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span>
|
||||
</t>
|
||||
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
|
||||
</div>
|
||||
<field name="categ_ids" widget="many2many_tags" class="oe_left"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -72,7 +69,7 @@
|
|||
<field name="view_mode">kanban,form</field>
|
||||
<field name="view_id" ref="portal_project_issue_kanban_view"/>
|
||||
<field name="domain" eval=""/>
|
||||
<field name="context">{"search_default_user_id":'', "search_default_draft":'', "search_default_todo":''}</field>
|
||||
<field name="context">{"search_default_user_id":'', "search_default_draft":'', "search_default_todo":'', "portal":'True'}</field>
|
||||
<field name="search_view_id" ref="project_issue.view_project_issue_filter"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_issues,project_issue,project_issue.model_project_issue,portal.group_portal,1,0,1,0
|
||||
access_case_section,crm_case_section,crm.model_crm_case_section,portal.group_portal,1,0,1,0
|
||||
access_case_section,crm_case_section,crm.model_crm_case_section,portal.group_portal,1,0,0,0
|
||||
|
|
|
|
@ -12,6 +12,7 @@ access_account_move_line,account.move.line,account.model_account_move_line,porta
|
|||
access_account_move_reconcile,account.move.reconcile,account.model_account_move_reconcile,portal.group_portal,1,0,0,0
|
||||
access_account_fiscalyear,account.sequence.fiscalyear,account.model_account_sequence_fiscalyear,portal.group_portal,1,0,0,0
|
||||
access_sale_shop,sale.shop,sale.model_sale_shop,portal.group_portal,1,0,0,0
|
||||
access_product_list,product.pricelist,product.model_product_pricelist,portal.group_portal,1,0,0,0
|
||||
access_res_partner,res.partner,base.model_res_partner,portal.group_portal,1,0,0,0
|
||||
access_account_tax,account.tax,account.model_account_tax,portal.group_portal,1,0,0,0
|
||||
access_account_fiscalyear,account.fiscalyear,account.model_account_fiscalyear,portal.group_portal,1,0,0,0
|
||||
|
|
|
|
@ -474,7 +474,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -107,25 +107,25 @@
|
|||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
<group>
|
||||
<group>
|
||||
<group groups="base.group_user">
|
||||
<field name="user_id"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
|
||||
<field name="email_from"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="priority"/>
|
||||
<label for="project_id"/>
|
||||
<div>
|
||||
<field name="priority" groups="base.group_user"/>
|
||||
<label for="project_id" groups="base.group_user"/>
|
||||
<div groups="base.group_user">
|
||||
<field name="project_id" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/>
|
||||
<button name="case_escalate" string="Escalate" type="object" states="draft,open,pending" class="oe_inline"/>
|
||||
</div>
|
||||
<label for="task_id"/>
|
||||
<div>
|
||||
<label for="task_id" groups="base.group_user"/>
|
||||
<div groups="base.group_user">
|
||||
<field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/>
|
||||
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="categ_ids" widget="many2many_tags"/>
|
||||
<field name="version_id"/>
|
||||
<field name="version_id" groups="base.group_user"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
|
Loading…
Reference in New Issue