[ADD] website_customer_crm_partner_assign: glue module for website_customer when having crm_partner_assign.
This module adds in view the management of implemented by / customer references. It is based on new fields currently defined in crm_partner_assign. data is added by inheriting from website_customer view. bzr revid: tde@openerp.com-20131008152233-lwqti6x18gjgz2hf
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
@@ -0,0 +1,42 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
'name': 'Public Customer References + Partner Assign',
|
||||
'category': 'Website',
|
||||
'summary': 'Add Partner Assignment Info to your Customer References',
|
||||
'version': '1.0',
|
||||
'description': """
|
||||
OpenERP Customer References + Partner Assign
|
||||
============================================
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': [
|
||||
'crm_partner_assign',
|
||||
'website_customer'
|
||||
],
|
||||
'data': [
|
||||
'views/website_customer.xml',
|
||||
],
|
||||
'qweb': [],
|
||||
'installable': True,
|
||||
'auto_install': True,
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<template id="partner_assign" inherit_id="website_customer.index" name="Partner Assignation">
|
||||
<xpath expr="//div[@t-field='partner.website_short_description']" position="after">
|
||||
<t t-if="partner.assigned_partner_id">
|
||||
<small>Implemented by
|
||||
<a t-href="/customers/#{ partner.assigned_partner_id.id }">
|
||||
<t t-esc="partner.assigned_partner_id.name"/>
|
||||
</a>
|
||||
</small>
|
||||
</t>
|
||||
<t t-if="partner.implemented_partner_ids">
|
||||
<small>
|
||||
<a t-href="/customers/#{ partner.id }#references">
|
||||
<t t-esc="len(partner.implemented_partner_ids)"/> references
|
||||
</a>
|
||||
</small>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="references" inherit_id="website_customer.details" name="Partner References">
|
||||
<xpath expr="//div[@t-field='partner_id.website_description']" position="after">
|
||||
<h3 id="references">References</h3>
|
||||
<div>
|
||||
<div t-foreach="partner_id.implemented_partner_ids" t-as="partner" class="media thumbnail" data-publish="">
|
||||
<t t-call="website.publish_management"><t t-set="object" t-value="partner"/></t>
|
||||
<a class="pull-left" t-attf-href="/customers/#{ partner.id }/">
|
||||
<img class="media-object" t-att-src="partner.img('image_small')"/>
|
||||
</a>
|
||||
<div class="media-body" style="min-height: 64px;">
|
||||
<a class="media-heading" t-attf-href="/customers/#{ partner.id }/"><span t-field="partner.parent_id"/> <span t-field="partner.name"/></a>
|
||||
<div t-field="partner.website_short_description"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="text-center">
|
||||
<img t-att-src="partner_id.img('image_medium')"/>
|
||||
</div>
|
||||
<address>
|
||||
<address>
|
||||
<table style="margin: auto;" class="well">
|
||||
<colgroup>
|
||||
<col width="100"/>
|
||||
|
||||
Reference in New Issue
Block a user