Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] Purchase Order Report with Note Operating Unit v9. #50

Open
wants to merge 1 commit into
base: 9.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions purchase_order_report_with_note_operating_unit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.. image:: https://img.shields.io/badge/license-AGPLv3-blue.svg
:target: https://www.gnu.org/licenses/agpl.html
:alt: License: AGPL-3

==============================================
Purchase Order Report With Note Operating Unit
==============================================

This module introduces the following features:

* The particularity of this module is that it replaces the header of the company with that of the Operating Unit (OU) in Purchase Order Report.


Installation
============

To install this module, you need to install its dependant module:

* purchase_order_report_with_notes (https://github.com/OCA/purchase-reporting/)

Configuration
=============

No configuration is required.


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/141/9.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/purchase-reporting/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
------------

* Jordi Ballester Alomar <[email protected]>
* Serpent Consulting Services Pvt. Ltd. <[email protected]>

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.
6 changes: 6 additions & 0 deletions purchase_order_report_with_note_operating_unit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# © 2015 Eficent Business and IT Consulting Services S.L.
# - Jordi Ballester Alomar
# © 2015 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

23 changes: 23 additions & 0 deletions purchase_order_report_with_note_operating_unit/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# © 2015 Eficent Business and IT Consulting Services S.L.
# - Jordi Ballester Alomar
# © 2015 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
'name': 'Purchase Order Report With Note Operating Unit',
'version': '9.0.1.0.0',
'category': 'Reports/Qweb',
'license': 'AGPL-3',
"author": "Eficent, "
"Serpent CS,"
"Odoo Community Association (OCA)",
'website': "https://odoo-community.org/",
'depends': ['purchase_order_report_with_note',
'purchase_operating_unit'],
'data': [
'views/report_purchasequotation_qweb.xml',
'views/report_purchaseorder_qweb.xml',
],
'installable': True,
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<openerp>
<data>
<template id="external_layout_application">
<t t-call="purchase_order_report_with_note_operating_unit.external_layout_header_application" />
<t t-raw="0" />
</template>
<template id="external_layout_header_application">
<t t-set="page_no" t-value="1" />
<t t-foreach="docs" t-as="op">
<div class="header">
<div class="row">
<table width="100%">
<tr>
<td width="30%"><span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/></td>
<td width="40" class="text-center"><span t-esc="op.operating_unit_id.name"/></td>
<td width="30%" class="text-right">
<small>
<span>Page</span>
<span t-esc="page_no" />
of
<span t-esc="len(docs)" />
</small>
</td>
</tr>
</table>
</div>
</div>
<span t-set="page_no" t-value="page_no + 1" />
</t>
</template>
<template id="inherit_layouts_headers" inherit_id="purchase_order_report_with_note.report_purchaseorder_qweb">
<xpath expr="//t[@t-call='report.internal_layout']" position="attributes" primary="True">
<attribute name="t-call">purchase_order_report_with_note_operating_unit.external_layout_application</attribute>
</xpath>
</template>
</data>
</openerp>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<openerp>
<data>
<template id="external_layout_application">
<t t-call="purchase_order_report_with_note_operating_unit.external_layout_header_application" />
<t t-raw="0" />
</template>
<template id="external_layout_header_application">
<t t-set="page_no" t-value="1" />
<t t-foreach="docs" t-as="op">
<div class="header">
<div class="row">
<table width="100%">
<tr>
<td width="30%"><span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/></td>
<td width="40" class="text-center"><span t-esc="op.operating_unit_id.name"/></td>
<td width="30%" class="text-right">
<small>
<span>Page</span>
<span t-esc="page_no" />
of
<span t-esc="len(docs)" />
</small>
</td>
</tr>
</table>
</div>
</div>
<span t-set="page_no" t-value="page_no + 1" />
</t>
</template>
<template id="inherit_layouts_headers_quo" inherit_id="purchase_order_report_with_note.report_purchasequotation_qweb">
<xpath expr="//t[@t-call='report.internal_layout']" position="attributes" primary="True">
<attribute name="t-call">purchase_order_report_with_note_operating_unit.external_layout_application</attribute>
</xpath>
</template>
</data>
</openerp>