Skip to content

Commit

Permalink
Merge pull request #5 from kmee/add/sale_order_pos_report
Browse files Browse the repository at this point in the history
[ADD] Addon: sale_order_pos_report
  • Loading branch information
mileo authored May 23, 2024
2 parents 7eb1a49 + d70d2df commit 9d4e9ba
Show file tree
Hide file tree
Showing 9 changed files with 386 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


[MASTER]
load-plugins=pylint_odoo
score=n
Expand All @@ -10,7 +8,7 @@ manifest_required_authors=KMEE
manifest_required_keys=license
manifest_deprecated_keys=description,active
license_allowed=LGPL-3
valid_odoo_versions=14.0
valid_odoo_versions=15.0

[MESSAGES CONTROL]
disable=all
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc-mandatory
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ manifest_required_authors=KMEE
manifest_required_keys=license
manifest_deprecated_keys=description,active
license_allowed=LGPL-3
valid_odoo_versions=14.0
valid_odoo_versions=15.0

[MESSAGES CONTROL]
disable=all
Expand Down
35 changes: 35 additions & 0 deletions sale_order_pos_report/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
**This file is going to be generated by oca-gen-addon-readme.**

*Manual changes will be overwritten.*

Please provide content in the ``readme`` directory:

* **DESCRIPTION.rst** (required)
* INSTALL.rst (optional)
* CONFIGURE.rst (optional)
* **USAGE.rst** (optional, highly recommended)
* DEVELOP.rst (optional)
* ROADMAP.rst (optional)
* HISTORY.rst (optional, recommended)
* **CONTRIBUTORS.rst** (optional, highly recommended)
* CREDITS.rst (optional)

Content of this README will also be drawn from the addon manifest,
from keys such as name, authors, maintainers, development_status,
and license.

A good, one sentence summary in the manifest is also highly recommended.


Automatic changelog generation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

`HISTORY.rst` can be auto generated using `towncrier <https://pypi.org/project/towncrier>`_.

Just put towncrier compatible changelog fragments into `readme/newsfragments`
and the changelog file will be automatically generated and updated when a new fragment is added.

Please refer to `towncrier` documentation to know more.

NOTE: the changelog will be automatically generated when using `/ocabot merge $option`.
If you need to run it manually, refer to `OCA/maintainer-tools README <https://github.com/OCA/maintainer-tools>`_.
Empty file.
18 changes: 18 additions & 0 deletions sale_order_pos_report/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2024 KMEE
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).

{
"name": "Sale Order Pos Report",
"version": "15.0.1.0.0",
"license": "LGPL-3",
"author": "KMEE",
"website": "https://github.com/KMEE/kmee-odoo-addons",
"depends": [
"sale",
],
"data": [
"report/report_saleorder_compact.xml",
"report/sale_report.xml",
],
"demo": [],
}
291 changes: 291 additions & 0 deletions sale_order_pos_report/report/report_saleorder_compact.xml

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions sale_order_pos_report/report/sale_report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="paperformat_compact" model="report.paperformat">
<field name="name">Thermal 80mm</field>
<field name="default" eval="True" />
<field name="format">custom</field>
<field name="page_height">300</field>
<field name="page_width">80</field>
<field name="orientation">Portrait</field>
<field name="margin_top">3</field>
<field name="margin_bottom">3</field>
<field name="margin_left">3</field>
<field name="margin_right">3</field>
<field name="header_line" eval="False" />
<field name="header_spacing">3</field>
<field name="dpi">80</field>
</record>

<record id="action_report_saleorder_compact" model="ir.actions.report">
<field name="name">Quotation / Order (80mm)</field>
<field name="model">sale.order</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">sale_order_pos_report.report_saleorder_compact</field>
<field name="report_file">sale_order_pos_report.report_saleorder_compact</field>
<field
name="print_report_name"
>(object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name)</field>
<field name="binding_model_id" ref="sale.model_sale_order" />
<field name="binding_type">report</field>
<field name="paperformat_id" ref="paperformat_compact" />
</record>

</odoo>
6 changes: 6 additions & 0 deletions setup/sale_order_pos_report/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 9d4e9ba

Please sign in to comment.