Skip to content
Merged
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
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ exclude: |
^shopinvader_base_url/|
^shopinvader_product_brand/|
^shopinvader_product_brand_tag/|
^shopinvader_product_sale_packaging/|
^shopinvader_product_url/|
# END NOT INSTALLABLE ADDONS
# Files and folders generated by bots, to avoid loops
Expand Down
35 changes: 18 additions & 17 deletions shopinvader_product_sale_packaging/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ Shopinvader Product Sale Packaging
.. |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-shopinvader%2Fodoo--shopinvader-lightgray.png?logo=github
:target: https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_product_sale_packaging
:alt: shopinvader/odoo-shopinvader
.. |badge3| image:: https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader--catalog-lightgray.png?logo=github
:target: https://github.com/shopinvader/odoo-shopinvader-catalog/tree/18.0/shopinvader_product_sale_packaging
:alt: shopinvader/odoo-shopinvader-catalog

|badge1| |badge2| |badge3|

Provide packaging information for products.

Available packaging are taken using `stock_packaging_calculator <https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_packaging_calculator>`_.
Available packaging are taken using
`stock_packaging_calculator <https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_packaging_calculator>`__.

**Table of contents**

Expand All @@ -34,40 +35,40 @@ Available packaging are taken using `stock_packaging_calculator <https://github.
Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/shopinvader/odoo-shopinvader/issues>`_.
Bugs are tracked on `GitHub Issues <https://github.com/shopinvader/odoo-shopinvader-catalog/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/shopinvader/odoo-shopinvader/issues/new?body=module:%20shopinvader_product_sale_packaging%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/shopinvader/odoo-shopinvader-catalog/issues/new?body=module:%20shopinvader_product_sale_packaging%0Aversion:%2018.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
~~~~~~~
-------

* Camptocamp SA

Contributors
~~~~~~~~~~~~
------------

* Simone Orsi <[email protected]>
* Marie Lejeune <[email protected]>
* Tris Doan <[email protected]>
- Simone Orsi <[email protected]>
- Marie Lejeune <[email protected]>
- Tris Doan <[email protected]>

Other credits
~~~~~~~~~~~~~
-------------

The development of this module has been financially supported by:

* Camptocamp
* Cosanum
* Acsone
- Camptocamp
- Cosanum
- Acsone

Maintainers
~~~~~~~~~~~
-----------

This module is part of the `shopinvader/odoo-shopinvader <https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_product_sale_packaging>`_ project on GitHub.
This module is part of the `shopinvader/odoo-shopinvader-catalog <https://github.com/shopinvader/odoo-shopinvader-catalog/tree/18.0/shopinvader_product_sale_packaging>`_ project on GitHub.

You are welcome to contribute.
10 changes: 4 additions & 6 deletions shopinvader_product_sale_packaging/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

{
"name": "Shopinvader Product Sale Packaging",
"Summary": """
Sell products by packaging.
""",
"version": "16.0.1.0.2",
"Summary": "Sell products by packaging.",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "Camptocamp SA",
"website": "https://github.com/shopinvader/odoo-shopinvader-catalog",
Expand All @@ -16,11 +14,11 @@
"shopinvader_product",
"sale_stock",
"sell_only_by_packaging",
"stock_packaging_calculator_packaging_level",
"product_packaging_calculator_packaging_level",
],
"data": [
"views/product_packaging.xml",
"views/product_packaging_level.xml",
],
"installable": False,
"installable": True,
}
3 changes: 3 additions & 0 deletions shopinvader_product_sale_packaging/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions shopinvader_product_sale_packaging/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Simone Orsi \<[email protected]\>
- Marie Lejeune \<[email protected]\>
- Tris Doan \<[email protected]\>
3 changes: 0 additions & 3 deletions shopinvader_product_sale_packaging/readme/CONTRIBUTORS.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The development of this module has been financially supported by:

* Camptocamp
* Cosanum
* Acsone
- Camptocamp
- Cosanum
- Acsone
4 changes: 4 additions & 0 deletions shopinvader_product_sale_packaging/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Provide packaging information for products.

Available packaging are taken using
[stock_packaging_calculator](https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_packaging_calculator).
3 changes: 0 additions & 3 deletions shopinvader_product_sale_packaging/readme/DESCRIPTION.rst

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.addons.extendable_fastapi import StrictExtendableBaseModel
from odoo.addons.stock_packaging_calculator.models.product import Packaging
from odoo.addons.product_packaging_calculator.models.product import Packaging


class SimpleProductPackaging(StrictExtendableBaseModel):
Expand All @@ -15,8 +15,9 @@ class SimpleProductPackaging(StrictExtendableBaseModel):

@classmethod
def from_packaging(cls, odoo_product, packaging, packaging_contained_mapping=None):
# packaging is a either a namedtuple of type Packaging, or a dict with the same keys
# id key can refer to id of model product.packaging or uom.uom, depending on is_unit
# packaging is a either a namedtuple of type Packaging, or a dict with
# the same keys, id key can refer to id of model product.packaging or
# uom.uom, depending on is_unit
obj = cls.model_construct(
id=packaging.id,
name=packaging.name,
Expand Down
19 changes: 10 additions & 9 deletions shopinvader_product_sale_packaging/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -9,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -369,9 +369,10 @@ <h1 class="title">Shopinvader Product Sale Packaging</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:dafd5b31d1401582884d2c7e57ae13d1c8ee3a666729aab1cc52ad7cf40f6c67
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_product_sale_packaging"><img alt="shopinvader/odoo-shopinvader" src="https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader-lightgray.png?logo=github" /></a></p>
<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/shopinvader/odoo-shopinvader-catalog/tree/18.0/shopinvader_product_sale_packaging"><img alt="shopinvader/odoo-shopinvader-catalog" src="https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader--catalog-lightgray.png?logo=github" /></a></p>
<p>Provide packaging information for products.</p>
<p>Available packaging are taken using <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_packaging_calculator">stock_packaging_calculator</a>.</p>
<p>Available packaging are taken using
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_packaging_calculator">stock_packaging_calculator</a>.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -387,10 +388,10 @@ <h1 class="title">Shopinvader Product Sale Packaging</h1>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader/issues">GitHub Issues</a>.
<p>Bugs are tracked on <a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader-catalog/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader/issues/new?body=module:%20shopinvader_product_sale_packaging%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader-catalog/issues/new?body=module:%20shopinvader_product_sale_packaging%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -420,7 +421,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Other credits</a></h2>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_product_sale_packaging">shopinvader/odoo-shopinvader</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader-catalog/tree/18.0/shopinvader_product_sale_packaging">shopinvader/odoo-shopinvader-catalog</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from odoo.tests import tagged

from odoo.addons.extendable.tests.common import ExtendableMixin
from odoo.addons.stock_packaging_calculator.tests.common import TestCommon
from odoo.addons.product_packaging_calculator.tests.common import TestCommon

from ..schemas import ProductPackaging, ProductProduct, SimpleProductPackaging
from .common import CommonPackagingCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).

from odoo.addons.extendable.tests.common import ExtendableMixin
from odoo.addons.stock_packaging_calculator.tests.common import TestCommon
from odoo.addons.product_packaging_calculator.tests.common import TestCommon

from ..schemas import ProductProduct
from .common import CommonPackagingCase
Expand Down
Loading