-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[17.0][MIG] deltatech_sale_pallet_website
- Loading branch information
1 parent
ffd2861
commit 7cc8d6b
Showing
16 changed files
with
624 additions
and
15 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
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
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
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,65 @@ | ||
=================== | ||
Sale Pallet Website | ||
=================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:06399ff53e0880eb46d8c675ddc444a2b288082022b2407c3cb43a1f059d1f10 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Production/Stable | ||
.. |badge2| image:: https://img.shields.io/badge/licence-OPL--1-blue.png | ||
:target: https://www.odoo.com/documentation/master/legal/licenses.html | ||
:alt: License: OPL-1 | ||
.. |badge3| image:: https://img.shields.io/badge/github-dhongu%2Fdeltatech-lightgray.png?logo=github | ||
:target: https://github.com/dhongu/deltatech/tree/17.0/deltatech_sale_pallet_website | ||
:alt: dhongu/deltatech | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
Features: | ||
|
||
- addon for deltatech_sale_pallet that makes it possible for customers | ||
to see the price of the order with the pallets price included | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `Terrabit Issues <https://www.terrabit.ro/helpdesk>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
------- | ||
|
||
* Terrabit | ||
* Dorin Hongu | ||
|
||
Maintainers | ||
----------- | ||
|
||
.. |maintainer-dhongu| image:: https://github.com/dhongu.png?size=40px | ||
:target: https://github.com/dhongu | ||
:alt: dhongu | ||
|
||
Current maintainer: | ||
|
||
|maintainer-dhongu| | ||
|
||
This module is part of the `dhongu/deltatech <https://github.com/dhongu/deltatech/tree/17.0/deltatech_sale_pallet_website>`_ 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,6 @@ | ||
# © 2008-2021 Deltatech | ||
# Dorin Hongu <dhongu(@)gmail(.)com | ||
# See README.rst file on addons root folder for license details | ||
|
||
from . import controllers | ||
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,17 @@ | ||
# © 2008-2019 Deltatech | ||
# Dorin Hongu <dhongu(@)gmail(.)com | ||
# See README.rst file on addons root folder for license details | ||
{ | ||
"name": "Sale Pallet Website", | ||
"summary": "Sale pallet", | ||
"version": "17.0.1.0.2", | ||
"author": "Terrabit, Dorin Hongu", | ||
"website": "https://www.terrabit.ro", | ||
"category": "Sales", | ||
"depends": ["deltatech_sale_pallet", "website_sale"], | ||
"license": "OPL-1", | ||
"data": ["views/templates.xml"], | ||
"images": ["static/description/main_screenshot.png"], | ||
"development_status": "Production/Stable", | ||
"maintainers": ["dhongu"], | ||
} |
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 @@ | ||
# © 2008-2021 Deltatech | ||
# Dorin Hongu <dhongu(@)gmail(.)com | ||
# See README.rst file on addons root folder for license details |
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,26 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * deltatech_sale_pallet_website | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0+e\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2021-04-23 08:07+0000\n" | ||
"PO-Revision-Date: 2021-04-23 08:07+0000\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: deltatech_sale_pallet_website | ||
#: model_terms:ir.ui.view,arch_db:deltatech_sale_pallet_website.show_pallet_price | ||
msgid "When buying" | ||
msgstr "La achiziția de" | ||
|
||
#. module: deltatech_sale_pallet_website | ||
#: model_terms:ir.ui.view,arch_db:deltatech_sale_pallet_website.show_pallet_price | ||
msgid "price is" | ||
msgstr "prețul este de" |
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 @@ | ||
# © 2017-2021 Deltatech | ||
# See README.rst file on addons root folder for license details | ||
|
||
from . import sale |
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 @@ | ||
# © 2008-2021 Deltatech | ||
# See README.rst file on addons root folder for license details | ||
|
||
|
||
from odoo import models | ||
|
||
|
||
class SaleOrder(models.Model): | ||
_inherit = "sale.order" | ||
|
||
def _cart_update(self, product_id=None, line_id=None, add_qty=0, set_qty=0, **kwargs): | ||
res = super()._cart_update(product_id=product_id, line_id=line_id, add_qty=add_qty, set_qty=set_qty, **kwargs) | ||
pallets = self.recompute_pallet_lines(delete_if_under=True) | ||
|
||
if pallets: | ||
for line in self.order_line: | ||
pallet = pallets.pop(line.product_id.id, False) | ||
if pallet: | ||
product_uom_qty = pallet["product_uom_qty"] | ||
if product_uom_qty: | ||
line.write({"product_uom_qty": product_uom_qty}) | ||
else: | ||
line.unlink() | ||
|
||
for product_id in pallets: | ||
if pallets[product_id]["product_uom_qty"]: | ||
self.env["sale.order.line"].create(pallets[product_id]) | ||
|
||
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,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,4 @@ | ||
Features: | ||
|
||
- addon for deltatech_sale_pallet that makes it possible for customers to see the price of the order with the pallets | ||
price included |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.