Skip to content

Commit

Permalink
[16.0][ADD] stock_picking_report_valued_delivery: Fix delivery slip r…
Browse files Browse the repository at this point in the history
…eport if product has a HS Code
  • Loading branch information
tuantrantg committed Aug 22, 2023
1 parent 1f0e567 commit 4d2489e
Show file tree
Hide file tree
Showing 10 changed files with 603 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup/stock_picking_report_valued_delivery/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,
)
89 changes: 89 additions & 0 deletions stock_picking_report_valued_delivery/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
================================
Valued Picking Report - Delivery
================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9c059636617748831b112f9944183a552c48878a9614859192a868b4ed58dd01
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/16.0/stock_picking_report_valued_delivery
: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-16-0/stock-logistics-reporting-16-0-stock_picking_report_valued_delivery
: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=16.0
:alt: Try me on Runboat

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

This module extends `stock_picking_report_valued` to make sure that the columns of Valued Picking Report are not mixed when the Delivery module is installed.

**Table of contents**

.. contents::
:local:

Usage
=====

To get the stock picking valued report:

#. Create a Sales Order with storable products a *Valued picking* able
customer.
#. Confirm the Sale Order.
#. Click on *Delivery* stat button.
#. Go to *Print > Delivery Slip*.

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_picking_report_valued_delivery%0Aversion:%2016.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
=======

Contributors
~~~~~~~~~~~~

* `Trobz <http://www.trobz.com>`_:

* Tuan Tran (anhtuan@trobz.com)

Other credits
~~~~~~~~~~~~~

The creation of this module was financially supported by Camptocamp.

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/16.0/stock_picking_report_valued_delivery>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
14 changes: 14 additions & 0 deletions stock_picking_report_valued_delivery/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Valued Picking Report - Delivery",
"summary": "Valued Picking Report - Compatibility fix with the Delivery module",
"version": "16.0.1.0.0",
"author": "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-reporting",
"category": "Warehouse Management",
"license": "AGPL-3",
"depends": ["delivery", "stock_picking_report_valued"],
"data": ["report/stock_picking_report_valued.xml"],
"installable": True,
"auto_install": True,
}
3 changes: 3 additions & 0 deletions stock_picking_report_valued_delivery/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Trobz <http://www.trobz.com>`_:

* Tuan Tran (anhtuan@trobz.com)
1 change: 1 addition & 0 deletions stock_picking_report_valued_delivery/readme/CREDITS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The creation of this module was financially supported by Camptocamp.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module extends `stock_picking_report_valued` to make sure that the columns of Valued Picking Report are not mixed when the Delivery module is installed.
7 changes: 7 additions & 0 deletions stock_picking_report_valued_delivery/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
To get the stock picking valued report:

#. Create a Sales Order with storable products a *Valued picking* able
customer.
#. Confirm the Sale Order.
#. Click on *Delivery* stat button.
#. Go to *Print > Delivery Slip*.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template
id="valued_report_picking_inherit_delivery"
inherit_id="stock_picking_report_valued.valued_report_picking"
>

<xpath
expr="//th/strong[contains(text(),'Taxes')][1]/parent::th"
position="after"
>
<th t-if="has_hs_code"><strong>HS Code</strong></th>
</xpath>

</template>

<template
id="valued_report_picking_inherit_delivery2"
inherit_id="delivery.report_delivery_document2"
>

<xpath
expr="//table[@name='stock_move_line_table']/thead/tr/th/strong[contains(text(),'HS Code')]/parent::th"
position="replace"
>
</xpath>

</template>

<template
id="stock_report_delivery_has_serial_move_line_inherit_delivery2"
inherit_id="delivery.stock_report_delivery_has_serial_move_line_inherit_delivery"
>

<xpath expr="//td[@t-if='has_hs_code']" position="replace">
</xpath>

<xpath
expr="//span[@t-field='move_line.sale_tax_description']/parent::td"
position="after"
>
<td t-if="has_hs_code"><span t-field="move_line.product_id.hs_code" /></td>
</xpath>

</template>

</odoo>
Loading

0 comments on commit 4d2489e

Please sign in to comment.