-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from coopiteasy/12.0-add-website_sale_delivery…
…_product_restriction [ADD] website_sale_delivery_product_restriction
- Loading branch information
Showing
8 changed files
with
524 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import sale_order |
14 changes: 14 additions & 0 deletions
14
website_sale_delivery_product_restriction/models/sale_order.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) |
3 changes: 3 additions & 0 deletions
3
website_sale_delivery_product_restriction/readme/CONTRIBUTORS.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* `Coop IT Easy SCRLfs <https://coopiteasy.be>`_: | ||
|
||
* Rémy Taymans |
4 changes: 4 additions & 0 deletions
4
website_sale_delivery_product_restriction/readme/DESCRIPTION.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.