-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by hparfr
- Loading branch information
Showing
10 changed files
with
578 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,68 @@ | ||
==================== | ||
Shopinvader Bicycode | ||
==================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:6795cd91e4bc4cc57b800db64bd12d55e3763698f924c96304b7f4c3b5855df7 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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-Akretion%2Fvertical--bike-lightgray.png?logo=github | ||
:target: https://github.com/Akretion/vertical-bike/tree/14.0/shopinvader_bicycode | ||
:alt: Akretion/vertical-bike | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
Make bicycodes available in shopinvader delivery api | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/Akretion/vertical-bike/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/Akretion/vertical-bike/issues/new?body=module:%20shopinvader_bicycode%0Aversion:%2014.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 | ||
~~~~~~~ | ||
|
||
* Akretion | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Raphaël Reverdy <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
.. |maintainer-hparfr| image:: https://github.com/hparfr.png?size=40px | ||
:target: https://github.com/hparfr | ||
:alt: hparfr | ||
|
||
Current maintainer: | ||
|
||
|maintainer-hparfr| | ||
|
||
This module is part of the `Akretion/vertical-bike <https://github.com/Akretion/vertical-bike/tree/14.0/shopinvader_bicycode>`_ 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,5 @@ | ||
# Copyright 2023 Akretion (http://www.akretion.com) | ||
# @author Raphaël Reverdy <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import services |
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,18 @@ | ||
# Copyright 2023 Akretion (http://www.akretion.com) | ||
# @author Raphaël Reverdy <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
"name": "Shopinvader Bicycode", | ||
"summary": "Publish bicycode in API", | ||
"version": "14.0.2.0.0", | ||
"category": "Stock", | ||
"website": "https://github.com/akretion/vertical-bike", | ||
"author": "Akretion", | ||
"maintainers": ["hparfr"], | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"bicycode", | ||
"shopinvader_delivery_detail", | ||
], | ||
} |
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 @@ | ||
[build-system] | ||
requires = ["whool"] | ||
build-backend = "whool.buildapi" |
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 @@ | ||
* Raphaël Reverdy <[email protected]> |
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 @@ | ||
Make bicycodes available in shopinvader delivery api |
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,6 @@ | ||
# Copyright 2023 Akretion (http://www.akretion.com) | ||
# @author Raphaël Reverdy <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import abstract_sale | ||
from . import delivery |
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,29 @@ | ||
# Copyright 2023 Akretion (http://www.akretion.com) | ||
# @author Raphaël Reverdy <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
import logging | ||
|
||
from odoo.addons.component.core import AbstractComponent | ||
|
||
_logger = logging.getLogger(__name__) | ||
|
||
|
||
class AbstractSaleService(AbstractComponent): | ||
_inherit = [ | ||
"shopinvader.abstract.sale.service", | ||
] | ||
|
||
def _convert_one_line(self, line): | ||
res = super()._convert_one_line(line) | ||
res.update( | ||
{ | ||
"bicycodes": (line.move_ids.move_line_ids.mapped("bicycode_ids.name")), | ||
# TODO remove the following line when our clients are moved | ||
# to a new version | ||
"bicycode": ( | ||
line.move_ids.move_line_ids.mapped("bicycode_ids.name")[:1] or [""] | ||
), | ||
} | ||
) | ||
return res |
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,30 @@ | ||
# Copyright 2023 Akretion (http://www.akretion.com) | ||
# @author Raphaël Reverdy <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo.addons.component.core import Component | ||
|
||
|
||
class DeliveryService(Component): | ||
_inherit = "shopinvader.delivery.service" | ||
|
||
def _get_picking_schema(self): | ||
""" | ||
:return: dict | ||
""" | ||
schema = super()._get_picking_schema() | ||
schema["lines"]["schema"]["schema"]["bicycodes"] = { | ||
"type": "list", | ||
"nullable": False, | ||
"schema": { | ||
"type": "string", | ||
}, | ||
} | ||
return schema | ||
|
||
def _get_parser_stock_move_line(self): | ||
vals = super()._get_parser_stock_move_line() | ||
vals.append( | ||
("bicycode_ids:bicycodes"), | ||
) | ||
return vals |
Oops, something went wrong.