-
-
Notifications
You must be signed in to change notification settings - Fork 235
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
10 changed files
with
272 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,56 @@ | ||
.. image:: https://img.shields.io/badge/license-AGPLv3-blue.svg | ||
:target: https://www.gnu.org/licenses/agpl.html | ||
:alt: License: AGPL-3 | ||
|
||
================================================ | ||
Purchase Request Qweb Report With Operating Unit | ||
================================================ | ||
|
||
* This module replaces the webkit Purchase Request report by | ||
a Qweb report and also adds the Operating Unit information to it. | ||
|
||
|
||
Usage | ||
===== | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/213/9.0 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/operating-unit/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smashing it by providing a detailed and welcomed feedback. | ||
|
||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* Eficent Business and IT Consulting Services S.L. <contact@eficent.com> | ||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit https://odoo-community.org. |
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,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 Eficent Business and IT Consulting Services S.L. | ||
# Copyright 2017 Serpent Consulting Services Pvt. Ltd. | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
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,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 Eficent Business and IT Consulting Services S.L. | ||
# Copyright 2017 Serpent Consulting Services Pvt. Ltd. | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
'name': 'Purchase Request Qweb Report With Operating Unit', | ||
'version': '9.0.1.0.0', | ||
'category': 'Reports/Qweb', | ||
'license': 'AGPL-3', | ||
'author': 'Eficent Business and IT Consulting Services S.L., ' | ||
'Serpent Consulting Services Pvt. Ltd.,' | ||
'Odoo Community Association (OCA)', | ||
'website': 'https://odoo-community.org/', | ||
'depends': ['purchase_request_operating_unit', | ||
'report_qweb_operating_unit'], | ||
'data': [ | ||
'views/report_purchase_request_qweb.xml', | ||
], | ||
'installable': True, | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
purchase_request_qweb_operating_unit/views/report_purchase_request_qweb.xml
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,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
|
||
<template id="report_purchaserequests_inherit" inherit_id="purchase_request.report_purchaserequests"> | ||
<xpath expr="//t[@t-call='report.external_layout']" position="attributes"> | ||
<attribute name="t-call">report_qweb_operating_unit.external_layout_ou</attribute> | ||
</xpath> | ||
<xpath expr="//div[@class='oe_structure']" position="after"> | ||
<br/> | ||
</xpath> | ||
<xpath expr="//div[@class='row mt32 mb32']/div[7]" position="after"> | ||
<div class="col-xs-3"> | ||
<strong>Operating Unit:</strong><br/> | ||
<span t-field="o.operating_unit_id"/> | ||
</div> | ||
</xpath> | ||
</template> | ||
|
||
</data> | ||
</openerp> |
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,56 @@ | ||
.. image:: https://img.shields.io/badge/license-AGPLv3-blue.svg | ||
:target: https://www.gnu.org/licenses/agpl.html | ||
:alt: License: AGPL-3 | ||
|
||
================================ | ||
Qweb Report With Operating Unit | ||
================================ | ||
|
||
* This module replaces the webkit report by the Qweb report | ||
adding the Operating Unit information to it. | ||
|
||
|
||
Usage | ||
===== | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/213/9.0 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/operating-unit/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smashing it by providing a detailed and welcomed feedback. | ||
|
||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* Eficent Business and IT Consulting Services S.L. <contact@eficent.com> | ||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit https://odoo-community.org. |
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,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 Eficent Business and IT Consulting Services S.L. | ||
# Copyright 2017 Serpent Consulting Services Pvt. Ltd. | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
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 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 Eficent Business and IT Consulting Services S.L. | ||
# Copyright 2017 Serpent Consulting Services Pvt. Ltd. | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
'name': 'Qweb Report With Operating Unit', | ||
'version': '9.0.1.0.0', | ||
'category': 'Reports/Qweb', | ||
'license': 'AGPL-3', | ||
'author': 'Eficent Business and IT Consulting Services S.L., ' | ||
'Serpent Consulting Services Pvt. Ltd.,' | ||
'Odoo Community Association (OCA)', | ||
'website': 'https://odoo-community.org/', | ||
'depends': ['report', 'operating_unit'], | ||
'data': [ | ||
'views/report_qweb_operating_unit.xml', | ||
], | ||
'installable': True, | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions
90
report_qweb_operating_unit/views/report_qweb_operating_unit.xml
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,90 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
|
||
<template id="external_layout_ou"> | ||
<!-- Multicompany --> | ||
<t t-if="not o and doc"> | ||
<t t-set="o" t-value="doc"/> | ||
</t> | ||
<t t-if="o and 'company_id' in o"> | ||
<t t-set="company" t-value="o.company_id"></t> | ||
</t> | ||
<t t-if="not o or not 'company_id' in o"> | ||
<t t-set="company" t-value="res_company"></t> | ||
</t> | ||
|
||
<t t-call="report_qweb_operating_unit.external_layout_header_ou" /> | ||
<t t-raw="0" /> | ||
<t t-call="report_qweb_operating_unit.external_layout_footer_ou" /> | ||
</template> | ||
|
||
<template id="external_layout_header_ou"> | ||
<div class="header"> | ||
<div class="row"> | ||
<img t-if="o.operating_unit_id.partner_id.parent_id.image" class="col-xs-2" t-att-src="'data:image/png;base64,%s' % o.operating_unit_id.partner_id.parent_id.image" style="max-height: 45px; margin-bottom: 4px;"/> | ||
</div> | ||
<div class="row"> | ||
<img t-if="not o.operating_unit_id.partner_id.parent_id.image" class="col-xs-2" t-att-src="'data:image/png;base64,%s' % o.operating_unit_id.partner_id.image" style="max-height: 45px; margin-bottom: 4px;"/> | ||
</div> | ||
<div class="row zero_min_height"> | ||
<div class="col-xs-12"> | ||
<div style="border-bottom: 1px solid black;"></div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-xs-3" name="ou_address"> | ||
<t t-if="o.operating_unit_id.partner_id.parent_id"> | ||
<div t-field="o.operating_unit_id.partner_id.parent_id" | ||
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' | ||
style="border-bottom: 1px solid black;"/> | ||
</t> | ||
<t t-if="not o.operating_unit_id.partner_id.parent_id"> | ||
<div t-field="o.operating_unit_id.partner_id" | ||
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' | ||
style="border-bottom: 1px solid black;"/> | ||
</t> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<template id="external_layout_footer_ou"> | ||
<div class="footer"> | ||
<div class="text-center" style="border-top: 1px solid black;"> | ||
<ul class="list-inline"> | ||
<li t-if="o.operating_unit_id.partner_id.parent_id.phone">Phone: <span t-field="o.operating_unit_id.partner_id.parent_id.phone"/></li> | ||
<li t-if="not o.operating_unit_id.partner_id.parent_id.phone">Phone: <span t-field="o.operating_unit_id.partner_id.phone"/></li> | ||
|
||
<li t-if="o.operating_unit_id.partner_id.parent_id.fax and o.operating_unit_id.partner_id.parent_id.phone">&bull;</li> | ||
<li t-if="o.operating_unit_id.partner_id.parent_id.fax">Fax: <span t-field="o.operating_unit_id.partner_id.parent_id.fax"/></li> | ||
|
||
<li t-if="not o.operating_unit_id.partner_id.parent_id.fax and not o.operating_unit_id.partner_id.parent_id.phone">&bull;</li> | ||
<li t-if="not o.operating_unit_id.partner_id.parent_id.fax">Fax: <span t-field="o.operating_unit_id.partner_id.fax"/></li> | ||
|
||
<li t-if="o.operating_unit_id.partner_id.parent_id.email and o.operating_unit_id.partner_id.parent_id.fax or o.operating_unit_id.partner_id.parent_id.email and o.operating_unit_id.partner_id.parent_id.phone">&bull;</li> | ||
<li t-if="o.operating_unit_id.partner_id.parent_id.email">Email: <span t-field="o.operating_unit_id.partner_id.parent_id.email"/></li> | ||
|
||
<li t-if="not o.operating_unit_id.partner_id.parent_id.email and not o.operating_unit_id.partner_id.parent_id.fax or not o.operating_unit_id.partner_id.parent_id.email and not o.operating_unit_id.partner_id.parent_id.phone">&bull;</li> | ||
<li t-if="not o.operating_unit_id.partner_id.parent_id.email">Email: <span t-field="o.operating_unit_id.partner_id.email"/></li> | ||
|
||
<li t-if="o.operating_unit_id.partner_id.parent_id.website and o.operating_unit_id.partner_id.parent_id.email or o.operating_unit_id.partner_id.parent_id.website and o.operating_unit_id.partner_id.parent_id.fax or o.operating_unit_id.partner_id.parent_id.website and o.operating_unit_id.partner_id.parent_id.phone">&bull;</li> | ||
<li t-if="o.operating_unit_id.partner_id.parent_id.website">Website: <span t-field="o.operating_unit_id.partner_id.parent_id.website"/></li> | ||
|
||
<li t-if="not o.operating_unit_id.partner_id.parent_id.website and not o.operating_unit_id.partner_id.parent_id.email or not o.operating_unit_id.partner_id.parent_id.website and not o.operating_unit_id.partner_id.parent_id.fax or not o.operating_unit_id.partner_id.parent_id.website and not o.operating_unit_id.partner_id.parent_id.phone">&bull;</li> | ||
<li t-if="not o.operating_unit_id.partner_id.parent_id.website">Website: <span t-field="o.operating_unit_id.partner_id.website"/></li> | ||
|
||
</ul> | ||
|
||
<ul class="list-inline"> | ||
<li>Page:</li> | ||
<li><span class="page"/></li> | ||
<li>/</li> | ||
<li><span class="topage"/></li> | ||
</ul> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
</data> | ||
</openerp> |