-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2020- Coop IT Easy SCRLfs (<http://www.coopiteasy.be>) | ||
# - Manuel Claeys Bouuaert - <[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
'name': 'Portal Partner ISR', | ||
'version': '11.0.1.0.0', | ||
'author': 'Coop IT Easy SCRLfs', | ||
'category': 'Website', | ||
'website': 'https://www.coopiteasy.be', | ||
'license': 'AGPL-3', | ||
'description': """ | ||
This module adds a button on the client portal to an externally generated ISR slip. | ||
""", | ||
'depends': [ | ||
'portal', | ||
'partner_isr', | ||
'distribution_circuits_website_sale', | ||
], | ||
'data': [ | ||
'views/partner_isr.xml' | ||
], | ||
'installable': True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2018 Rémy Taymans <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import http | ||
from odoo.http import request | ||
|
||
|
||
class PortalISR(http.Controller): | ||
|
||
@http.route("/isr", type="http", auth="user", website=True) | ||
def isr(self): | ||
partner = request.env.user.partner_id | ||
if partner.isr_number: | ||
url = "https://tools.hsolutions.ch/outils/bvrlignon/?bvr=" + partner.isr_number | ||
return request.redirect(url) | ||
else: | ||
return request.redirect("my/credit_account") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright 2018 Rémy Taymans <[email protected]> | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
<odoo> | ||
|
||
<template id="partner_isr" name="Partner ISR" inherit_id="distribution_circuits_website_sale.credit_account"> | ||
<xpath expr="//h3" position="after"> | ||
<p t-if="user_id.partner_id.isr_number"> | ||
<span>Your ISR number is:</span> <span t-field="user_id.partner_id.isr_number"/> | ||
<a href="/isr" class="btn btn-default btn-xs">Print ISR slip</a> | ||
</p> | ||
<p t-else=""> | ||
You have not been assigned an ISR number yet. | ||
</p> | ||
</xpath> | ||
</template> | ||
|
||
</odoo> |