Skip to content

Commit

Permalink
[FIX] Unittests base_delivery_carrier_label: Separate github test run
Browse files Browse the repository at this point in the history
For dependents addons
  • Loading branch information
mt-software-de committed Mar 18, 2024
1 parent 1ec5420 commit e81b8cf
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 13 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,18 @@ jobs:
include:
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
name: test with Odoo
exclude: "base_delivery_carrier_label,delivery_carrier_label_batch,delivery_roulier,delivery_roulier_option,delivery_roulier_laposte_fr,delivery_roulier_chronopost_fr,carrier_account_environment"
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
name: test with OCB
makepot: "true"
exclude: "base_delivery_carrier_label,delivery_carrier_label_batch,delivery_roulier,delivery_roulier_option,delivery_roulier_laposte_fr,delivery_roulier_chronopost_fr,carrier_account_environment"
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
name: test with Odoo
include: "base_delivery_carrier_label,delivery_carrier_label_batch,delivery_roulier,delivery_roulier_option,delivery_roulier_laposte_fr,delivery_roulier_chronopost_fr,carrier_account_environment"
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
name: test with OCB
makepot: "true"
include: "base_delivery_carrier_label,delivery_carrier_label_batch,delivery_roulier,delivery_roulier_option,delivery_roulier_laposte_fr,delivery_roulier_chronopost_fr,carrier_account_environment"
services:
postgres:
image: postgres:9.6
Expand All @@ -49,6 +58,9 @@ jobs:
POSTGRES_DB: odoo
ports:
- 5432:5432
env:
INCLUDE: "${{ matrix.include }}"
EXCLUDE: "${{ matrix.exclude }}"
steps:
- uses: actions/checkout@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion delivery_package_fee/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Delivery Package Fees
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1bd03bdc59edfe4e2046329326afe107e8738bee72bd01862cae29fadd798647
!! source digest: sha256:2a7faf7ca4a955b3296dc72b61d0a72871437d1a453ce7677128fb30aaef8335
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -79,6 +79,7 @@ Contributors
~~~~~~~~~~~~

* Guewen Baconnier <[email protected]>
* Michael Tietz (MT Software) <[email protected]>

Maintainers
~~~~~~~~~~~
Expand Down
1 change: 1 addition & 0 deletions delivery_package_fee/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Guewen Baconnier <[email protected]>
* Michael Tietz (MT Software) <[email protected]>
3 changes: 2 additions & 1 deletion delivery_package_fee/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Delivery Package Fees</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1bd03bdc59edfe4e2046329326afe107e8738bee72bd01862cae29fadd798647
!! source digest: sha256:2a7faf7ca4a955b3296dc72b61d0a72871437d1a453ce7677128fb30aaef8335
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/delivery-carrier/tree/14.0/delivery_package_fee"><img alt="OCA/delivery-carrier" src="https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/delivery-carrier-14-0/delivery-carrier-14-0-delivery_package_fee"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Add delivery fees on Sales Orders based on the delivered packages.</p>
Expand Down Expand Up @@ -424,6 +424,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Guewen Baconnier &lt;<a class="reference external" href="mailto:guewen.baconnier&#64;camptocamp.com">guewen.baconnier&#64;camptocamp.com</a>&gt;</li>
<li>Michael Tietz (MT Software) &lt;<a class="reference external" href="mailto:mtietz&#64;mt-software.de">mtietz&#64;mt-software.de</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
3 changes: 2 additions & 1 deletion delivery_package_fee/tests/test_package_fee.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2020 Camptocamp
# Copyright 2024 Michael Tietz (MT Software) <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.tests.common import Form, SavepointCase
Expand Down Expand Up @@ -322,7 +323,7 @@ def test_package_no_package(self):
self.assertEqual(picking.state, "assigned")
picking.move_line_ids[0].qty_done = 10.0
picking.move_line_ids[1].qty_done = 10.0
picking.with_context(set_default_package=False)._action_done()
picking._action_done()
self.assertEqual(picking.state, "done")

self.assertRecordValues(
Expand Down
4 changes: 3 additions & 1 deletion delivery_package_number/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Stock Picking Package Number
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3ed5adf0029e78322866727bc33ad34c20aeca25abb3ddf4604e85cd60d13d8c
!! source digest: sha256:ff9990b646408ab222fbcb027456d78cccc6319f52302959c9e7cae8965931fc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -89,6 +89,8 @@ Contributors

* Ángel García de la Chica Herrera <[email protected]>

* Michael Tietz (MT Software) <[email protected]>

Maintainers
~~~~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions delivery_package_number/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
* `Sygel <https://www.sygel.es>`_:

* Ángel García de la Chica Herrera <[email protected]>

* Michael Tietz (MT Software) <[email protected]>
5 changes: 4 additions & 1 deletion delivery_package_number/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Stock Picking Package Number</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3ed5adf0029e78322866727bc33ad34c20aeca25abb3ddf4604e85cd60d13d8c
!! source digest: sha256:ff9990b646408ab222fbcb027456d78cccc6319f52302959c9e7cae8965931fc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/delivery-carrier/tree/14.0/delivery_package_number"><img alt="OCA/delivery-carrier" src="https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/delivery-carrier-14-0/delivery-carrier-14-0-delivery_package_number"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module recovers the number of packages field that was present in previous
Expand Down Expand Up @@ -440,6 +440,9 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
</ul>
</blockquote>
</blockquote>
<ul class="simple">
<li>Michael Tietz (MT Software) &lt;<a class="reference external" href="mailto:mtietz&#64;mt-software.de">mtietz&#64;mt-software.de</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2023 Ángel García de la Chica Herrera <[email protected]>
# Copyright 2024 Michael Tietz (MT Software) <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models
Expand All @@ -24,7 +25,4 @@ def _compute_ask_number_of_packages(self):
def process(self):
if self.number_of_packages:
self.pick_ids.write({"number_of_packages": self.number_of_packages})
# put context key for avoiding `base_delivery_carrier_label` auto-packaging feature
return super(
StockBackorderConfirmation, self.with_context(set_default_package=False)
).process()
return super().process()
6 changes: 2 additions & 4 deletions delivery_package_number/wizard/stock_inmediate_transfer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2020 Tecnativa - David Vidal
# Copyright 2024 Michael Tietz (MT Software) <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models

Expand All @@ -23,7 +24,4 @@ def _compute_ask_number_of_packages(self):
def process(self):
if self.number_of_packages:
self.pick_ids.write({"number_of_packages": self.number_of_packages})
# put context key for avoiding `base_delivery_carrier_label` auto-packaging feature
return super(
StockImmediateTransfer, self.with_context(set_default_package=False)
).process()
return super().process()

0 comments on commit e81b8cf

Please sign in to comment.