Skip to content

Commit

Permalink
Merge pull request #32 from st-aprajapati/11.0
Browse files Browse the repository at this point in the history
[IMP] Modifications as per suggestions.
  • Loading branch information
pedrobaeza committed Apr 14, 2019
2 parents 234e561 + 7f5eb33 commit 8975e10
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 26 deletions.
15 changes: 10 additions & 5 deletions oca_psc_team/demo/github_repository.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,33 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</record>

<!-- Github repository -->
<record id="github_repository_1_demo" model="github.repository">
<field name="name">repository_1</field>
<field name="organization_id" ref="github_organization_1_demo"/>
</record>

<record id="github_repository_2_demo" model="github.repository">
<field name="name">repository_2</field>
<field name="github_login">organization_1/repository_2</field>
<field name="organization_id" ref="github_organization_1_demo"/>
</record>

<record id="github_repository_3_demo" model="github.repository">
<field name="name">repository_3</field>
<field name="github_login">organization_1/repository_3</field>
<field name="organization_id" ref="github_organization_1_demo"/>
</record>

<record id="github_repository_4_demo" model="github.repository">
<field name="name">repository_4</field>
<field name="github_login">organization_1/repository_4</field>
<field name="organization_id" ref="github_organization_1_demo"/>
</record>

<record id="github_repository_5_demo" model="github.repository">
<field name="name">repository_5</field>
<field name="github_login">organization_1/repository_5</field>
<field name="organization_id" ref="github_organization_1_demo"/>
</record>

<record id="github_repository_6_demo" model="github.repository">
<field name="name">repository_6</field>
<field name="github_login">organization_1/repository_6</field>
<field name="organization_id" ref="github_organization_1_demo"/>
</record>

Expand Down
2 changes: 1 addition & 1 deletion oca_psc_team/demo/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
eval="[(4, ref('base.user_demo'))]"/>
<field name="short_description">OCA Apps store module repository.</field>
<field name="github_repository_ids"
eval="[(4, ref('github_repository_1_demo'))]"/>
eval="[(4, ref('github_repository_6_demo'))]"/>
<field name="description">
Providing facility for displaying the module specific information in
a standard Odoo e-commerce website (front-end) and download the zip
Expand Down
3 changes: 2 additions & 1 deletion oca_psc_team/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ def _check_short_description(self):
# up to 3 lines.
if len(self.short_description) >= 75:
raise ValidationError(_(
'Number of characters must be less then or equal to 75.'))
'Number of characters must be less then or equal to 75 for '
'\'Short Description\' field.'))
1 change: 1 addition & 0 deletions oca_psc_team/models/psc_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class PscCategory(models.Model):
_name = 'psc.category'
_order = 'sequence'
_description = 'PSC Categories'

name = fields.Char(
required=True,
Expand Down
3 changes: 2 additions & 1 deletion website_oca_psc_team/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
'author': 'Odoo Community Association (OCA), Surekha Technologies',
'depends': [
'oca_psc_team',
'website'
'website',
'website_crm_partner_assign'
],
'data': [
'templates/assets.xml',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).*/
text-overflow: ellipsis;
display: block;
margin-top: 10px;
padding-bottom: 5px;
}

@media (max-width: 991px) {
Expand Down
2 changes: 1 addition & 1 deletion website_oca_psc_team/static/src/js/psc_team_tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ odoo.define("website_oca_psc_team.psc_team_project_tour", function (require) {
},

{
content: "Clik here to save changes.",
content: "Click here to save changes.",
trigger: "button[data-action=save]",
},

Expand Down
41 changes: 25 additions & 16 deletions website_oca_psc_team/templates/psc_category_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
t-foreach="psc_category.project_ids.sorted(key=lambda p: p.name)"
t-as="project">
<div class="o_web_psc_team_project_detail">
<img t-att-src="'data:image/png;base64,%s'%to_text(project.image)
if project.image else 'website_oca_psc_team/static/src/img/icon.png'"
<img t-att-src="'data:image/png;base64,%s'%to_text(project.image_medium)
if project.image_medium else 'website_oca_psc_team/static/src/img/icon.png'"
height="100"
width="100"/>
<h3>
Expand Down Expand Up @@ -117,12 +117,14 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<div class="o_web_psc_team_project_manager">
<h3>OCA Representative:</h3>
<ul>
<li t-if="project.user_id">
<img t-att-src="'data:image/png;base64,%s'%to_text(project.user_id.image)
if project.user_id.image else '/base/static/src/img/avatar.png'"
<li t-if="project.user_id.partner_id.website_published">
<img t-att-src="'data:image/png;base64,%s'%to_text(project.user_id.image_small)
if project.user_id.image_small else '/base/static/src/img/avatar.png'"
height="48"
width="48"/>
<t t-esc="project.user_id.name"/>
<a t-attf-href="/partners/#{slug(project.user_id.partner_id)}">
<t t-esc="project.user_id.name"/>
</a>
</li>
<h5 t-else="">No OCA Representative found.</h5>
</ul>
Expand All @@ -138,10 +140,9 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<t t-foreach="project.github_repository_ids"
t-as="github_repository">
<li>
<t t-set="github_url" t-value="github_repository.organization_id.github_url
+ '/' + github_repository.name"/>
<a t-attf-href="{{github_url}}">
<t t-esc="github_url"/>
<a t-attf-href="{{github_repository.organization_id.github_url
+ '/' + github_repository.name}}" target="_blank">
<t t-esc="github_repository.github_login"/>
</a>
</li>
</t>
Expand All @@ -153,19 +154,27 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

<template id="project_team_members" name="Project Team Members">
<div class="o_web_psc_team_project_member_list">
<h3>Team Members</h3>
<div class="col-md-12">
<h3>Team Members</h3>
</div>
<t t-set="project_members"
t-value="project.members.filtered('partner_id.website_published')"/>
<div class="col-md-6"
t-foreach="project.members"
t-foreach="project_members"
t-as="member">
<div class="o_web_psc_team_project_member">
<img t-att-src="'data:image/png;base64,%s'%to_text(member.image)
if member.image else '/base/static/src/img/avatar.png'"
<img t-att-src="'data:image/png;base64,%s'%to_text(member.image_small)
if member.image_small else '/base/static/src/img/avatar.png'"
height="48"
width="48"/>
<t t-esc="member.name"/>
<a t-attf-href="/partners/#{slug(member.partner_id)}">
<t t-esc="member.name"/>
</a>
</div>
</div>
<h5 t-if="not project.members">No Team member found.</h5>
<h5 t-if="not project_members">
No Team member found.
</h5>
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion website_oca_psc_team/tests/test_psc_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_psc_project_detail_page(self):
cr = self.registry.cursor()
assert cr == self.registry.test_cr
user_id = self.env.ref(
'website_oca_psc_team.project_manager_partner_demo').id
'website_oca_psc_team.project_manager_user_demo').id
env = Environment(cr, user_id, {})

app_store_project_id = self.browse_ref(
Expand Down

0 comments on commit 8975e10

Please sign in to comment.