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

[17.0][MIG] stock_card_report: Migration to 17.0 #301

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9e58048
[12.0][ADD] stock_card_report
ps-tubtim Nov 7, 2019
5d3d13d
[12.0][fix] stock_card_report
ps-tubtim Mar 19, 2020
e2d49f7
[UPD] Update stock_card_report.pot
oca-travis Mar 19, 2020
72b0d06
[UPD] README.rst
OCA-git-bot Mar 19, 2020
5eee65a
[IMP] stock_card_report: black, isort
ps-tubtim Mar 20, 2020
10e7507
[MIG] stock_card_report: Migration to 13.0
ps-tubtim Mar 20, 2020
4809f65
[UPD] Update stock_card_report.pot
oca-travis Mar 25, 2020
c2e01ea
[UPD] README.rst
OCA-git-bot Mar 25, 2020
24e26a0
Added translation using Weblate (Spanish)
johnnypiguave Sep 29, 2020
6c3192b
Added translation using Weblate (Spanish (Ecuador))
johnnypiguave Sep 29, 2020
5b9e8bf
Translated using Weblate (Spanish (Ecuador))
johnnypiguave Sep 29, 2020
fc9518c
Translated using Weblate (Spanish (Ecuador))
johnnypiguave Sep 29, 2020
414f2da
[IMP] stock_card_report: black, isort, prettier
PrapassornS Nov 17, 2020
5bd824f
[MIG]stock_card_report: Migration to 14.0
PrapassornS Nov 19, 2020
df13863
[UPD] Update stock_card_report.pot
oca-travis Apr 20, 2021
f8b43ed
[UPD] README.rst
OCA-git-bot Apr 20, 2021
c9b0953
[14.0][IMP] stock_card_report, add origin to display_name on report
kittiu Apr 22, 2021
828453d
[14.0][FIX] stock_card_report, fix action access error
kittiu Apr 29, 2021
6d57828
stock_card_report 14.0.1.0.1
OCA-git-bot Apr 29, 2021
bd3b1b6
[UPD] Update stock_card_report.pot
oca-travis Apr 29, 2021
64f765e
stock_card_report 14.0.1.0.2
OCA-git-bot Apr 29, 2021
e6c3dbb
Update translation files
oca-transbot Apr 29, 2021
b371c49
[MIG] stock_card_report: Migration to 15.0
emadshaaban92 Mar 20, 2022
1b13cc4
[UPD] Update stock_card_report.pot
Oct 3, 2022
b5faa4d
[UPD] README.rst
OCA-git-bot Oct 3, 2022
09674c2
[IMP] stock_card_report: black, isort, prettier (copier update)
Mar 7, 2023
0a653bb
[IMP] stock_card_report: pre-commit stuff
dsolanki-initos May 8, 2023
256c09c
[MIG] stock_card_report: Migration to 16.0
dsolanki-initos May 9, 2023
d412faf
[UPD] Update stock_card_report.pot
Dec 9, 2023
717adb4
[BOT] post-merge updates
OCA-git-bot Dec 9, 2023
17f5e37
Update translation files
weblate Dec 9, 2023
b3a2bb7
Translated using Weblate (Spanish)
Ivorra78 Dec 9, 2023
d199b9e
Added translation using Weblate (Italian)
mymage Dec 11, 2023
fe68489
Translated using Weblate (Italian)
mymage Dec 11, 2023
1a933f8
[IMP] stock_card_report: pre-commit auto fixes
Youstina-NR Jan 18, 2024
df5353b
[MIG] stock_card_report: Migration to 17.0
Youstina-NR Jan 18, 2024
6cd8e2e
[MIG] stock_card_report: Migration to 17.0
Youstina-NR Jan 18, 2024
e02b0a6
[FIX] stock_card_report: E741 Ambiguous variable name: LICENSE pando…
Youstina-NR Jan 18, 2024
e308c08
[FIX] stock_card_report: fix view action
Youstina-NR Jan 23, 2024
2882f9e
[FIX] stock_card_report: pre-commit auto fixes
Youstina-NR Jan 28, 2024
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
Binary file added pandoc-3.1.11.1-1-amd64.deb
Binary file not shown.
89 changes: 89 additions & 0 deletions stock_card_report/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
=================
Stock Card Report
=================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8356238311401bcf9756a9bf152b332bba56fba1def3f5a49a35fe1da35074fa
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-reporting/tree/17.0/stock_card_report
:alt: OCA/stock-logistics-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-reporting-17-0/stock-logistics-reporting-17-0-stock_card_report
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-reporting&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Stock Card Report is the report that display movement (in/out) of a
product in a specified location and date range.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Go to Inventory > Reporting > Stock Card.
2. Select Start date, End date, Products, Location.
3. Choose View or Export PDF or Export XLSX or Cancel.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-reporting/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/stock-logistics-reporting/issues/new?body=module:%20stock_card_report%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Ecosoft

Contributors
------------

- Pimolnat Suntian <pimolnats@ecosoft.co.th>
- Prapassorn Sornkaew <prapassorn.s@prothaitechnology.com>
- Emad Shaaban <emad.shaaban92@gmail.com>
- Dhara Solanki <dhara.solanki@initos.com>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

This module is part of the `OCA/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/17.0/stock_card_report>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
6 changes: 6 additions & 0 deletions stock_card_report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2019 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import wizard
from . import reports
from . import controllers
27 changes: 27 additions & 0 deletions stock_card_report/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2019 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Stock Card Report",
"summary": "Add stock card report on Inventory Reporting.",
"version": "17.0.1.0.0",
"category": "Warehouse",
"website": "https://github.com/OCA/stock-logistics-reporting",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["stock", "date_range", "report_xlsx_helper"],
"data": [
"security/ir.model.access.csv",
"data/paper_format.xml",
"data/report_data.xml",
"reports/stock_card_report.xml",
"wizard/stock_card_report_wizard_view.xml",
],
"assets": {
"web.assets_backend": [
"stock_card_report/static/src/css/**/*",
"stock_card_report/static/src/js/**/*",
]
},
"installable": True,
}
1 change: 1 addition & 0 deletions stock_card_report/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
52 changes: 52 additions & 0 deletions stock_card_report/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from odoo import http
from odoo.http import request


class StockCardReportController(http.Controller):
@http.route(
"/stock/stock_card_report/<string:output_format>", type="http", auth="user"
)
def report(self, output_format, report_name=False, **kw):
if output_format == "pdf":
report_ref = request.env.ref(

Check warning on line 11 in stock_card_report/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

stock_card_report/controllers/main.py#L11

Added line #L11 was not covered by tests
"stock_card_report.action_stock_card_report_pdf"
)
method_name = "_render_qweb_pdf"
report = getattr(report_ref, method_name)(

Check warning on line 15 in stock_card_report/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

stock_card_report/controllers/main.py#L14-L15

Added lines #L14 - L15 were not covered by tests
report_ref,
res_ids=[int(kw["active_id"])],
data={"report_type": "pdf"},
)[0]
return request.make_response(

Check warning on line 20 in stock_card_report/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

stock_card_report/controllers/main.py#L20

Added line #L20 was not covered by tests
report,
headers=[
("Content-Type", "application/pdf"),
(
"Content-Disposition",
"attachment; filename= Stock_Card_Report.pdf",
),
],
)
else:
report_ref = request.env.ref(

Check warning on line 31 in stock_card_report/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

stock_card_report/controllers/main.py#L31

Added line #L31 was not covered by tests
"stock_card_report.action_stock_card_report_xlsx"
)
method_name = "_render_xlsx"
report = getattr(report_ref, method_name)(

Check warning on line 35 in stock_card_report/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

stock_card_report/controllers/main.py#L34-L35

Added lines #L34 - L35 were not covered by tests
report_ref,
docids=[int(kw["active_id"])],
data={"report_type": "xlsx"},
)[0]
return request.make_response(

Check warning on line 40 in stock_card_report/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

stock_card_report/controllers/main.py#L40

Added line #L40 was not covered by tests
report,
headers=[
(
"Content-Type",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
),
(
"Content-Disposition",
"attachment; filename= Stock_Card_Report.xlsx",
),
],
)
19 changes: 19 additions & 0 deletions stock_card_report/data/paper_format.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<odoo>

<record id="paperformat_stock_card" model="report.paperformat">
<field name="name">Stock Card A4</field>
<field name="default" eval="True" />
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">28</field>
<field name="margin_bottom">28</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False" />
<field name="header_spacing">24</field>
<field name="dpi">90</field>
</record>

</odoo>
31 changes: 31 additions & 0 deletions stock_card_report/data/report_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="action_report_stock_card_report_html" model="ir.actions.client">
<field name="name">Stock Card Report</field>
<field name="tag">stock_card_report_backend</field>
<field
name="context"
eval="{'url': 'stock/stock_card_report/output_format?active_id=:active_id', 'model': 'report.stock.card.report'}"
/>
</record>

<record id="action_stock_card_report_pdf" model="ir.actions.report">
<field name="name">Stock Card PDF</field>
<field name="model">report.stock.card.report</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">stock_card_report.report_stock_card_report_pdf</field>
<field name="report_file">stock_card_report.report_stock_card_report_pdf</field>
<field name="print_report_name">
'Stock Card Report - [%s]' % (object.location_id.complete_name)
</field>
<field name="paperformat_id" ref="stock_card_report.paperformat_stock_card" />
</record>

<record id="action_stock_card_report_xlsx" model="ir.actions.report">
<field name="name">Stock Card XLSX</field>
<field name="model">report.stock.card.report</field>
<field name="report_type">xlsx</field>
<field name="report_name">stock_card_report.report_stock_card_report_xlsx</field>
<field name="report_file">Stock Card Report</field>
</record>
</odoo>
Loading
Loading