Skip to content

Commit

Permalink
Merge pull request #17 from coopiteasy/12.0-add-website_sale_delivery…
Browse files Browse the repository at this point in the history
…_product_restriction

[ADD] website_sale_delivery_product_restriction
  • Loading branch information
remytms authored Apr 19, 2022
2 parents 3e3f7ab + a127371 commit 8383ffe
Show file tree
Hide file tree
Showing 8 changed files with 524 additions and 0 deletions.
62 changes: 62 additions & 0 deletions website_sale_delivery_product_restriction/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
=========================================
Website Sale Delivery Product Restriction
=========================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-coopiteasy%2Fcie--e--commerce-lightgray.png?logo=github
:target: https://github.com/coopiteasy/cie-e-commerce/tree/12.0/website_sale_delivery_product_restriction
:alt: coopiteasy/cie-e-commerce

|badge1| |badge2| |badge3|

This is a complement of the module `delivery_product_restriction` to
bring it's features into the eCommerce. It allows some product to be
shipped only by some delivery carrier. If such a product is found in a
SO then the SO can only be shipped via these delivery carrier.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/cie-e-commerce/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/coopiteasy/cie-e-commerce/issues/new?body=module:%20website_sale_delivery_product_restriction%0Aversion:%2012.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
~~~~~~~

* Coop IT Easy SCRLfs

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

* `Coop IT Easy SCRLfs <https://coopiteasy.be>`_:

* Rémy Taymans

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

This module is part of the `coopiteasy/cie-e-commerce <https://github.com/coopiteasy/cie-e-commerce/tree/12.0/website_sale_delivery_product_restriction>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions website_sale_delivery_product_restriction/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions website_sale_delivery_product_restriction/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2022 Coop IT Easy SCRLfs
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Website Sale Delivery Product Restriction",
"summary": """
Allow some product to be shipped only by some delivery carrier and also on eCommerce.""",
"version": "12.0.1.0.0",
"category": "Website",
"website": "https://coopiteasy.be",
"author": "Coop IT Easy SCRLfs",
"license": "AGPL-3",
"application": False,
"depends": ["delivery_product_restriction"],
"excludes": [],
"data": [],
"demo": [],
"qweb": [],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
14 changes: 14 additions & 0 deletions website_sale_delivery_product_restriction/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2022 Coop IT Easy SCRLfs
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models


class SaleOrder(models.Model):

_inherit = "sale.order"

def _get_delivery_methods(self):
return self.available_carrier_ids.filtered(
lambda c: c.website_published
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Coop IT Easy SCRLfs <https://coopiteasy.be>`_:

* Rémy Taymans
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This is a complement of the module `delivery_product_restriction` to
bring it's features into the eCommerce. It allows some product to be
shipped only by some delivery carrier. If such a product is found in a
SO then the SO can only be shipped via these delivery carrier.
Loading

0 comments on commit 8383ffe

Please sign in to comment.