Skip to content
Open
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
123 changes: 123 additions & 0 deletions sale_stock_restocking_fee_invoicing/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
===================================
Sale Stock Restocking Fee Invoicing
===================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:07e5efd90d8616b084a70da14dd71d6a644f6a10e9df957c458bc6fa7d244fb2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-OCA%2Fstock--logistics--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-workflow/tree/18.0/sale_stock_restocking_fee_invoicing
:alt: OCA/stock-logistics-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-18-0/stock-logistics-workflow-18-0-sale_stock_restocking_fee_invoicing
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-workflow&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the functionality of the stock picking return wizard
to allow you to charge restocking fee in case of return of goods by a
customer.

**Table of contents**

.. contents::
:local:

Configuration
=============

The product used to charge restocking fee on the sale order must be
specified into the stock settings form which can be reached by:

- *Settings* - *Inventory* - *Valuation*
- or *Inventory* - *Configuration* - *Settings* - *Valuation*

Once there you can change the item Restocking Fee Product.

nb: You may need to install sale_management to ease your test (SO view)

Usage
=====

Once installed, A check box is added on the stock return wizard to
specify if restocking fee must be charged. The same field is added on
each line into the wizard. You are therefore able to choose to charge
for all the goods returned or select which line should be charged.

By default no restocking fee are charged in case of customer return. If
you want to charge restocking fee you can:

- Specify on the customer contact form that restocking fee must be
charged by default in case of return of goods. This value is used as
default value into the stock return wizard;
- Use the checkboxes into the stock return wizard.

For each returned product, if restocking fee must be charged, once the
return picking is done, a new line is added into the origin sale order
to charge fees. The quantity charged is always 1 whatever the number of
items of the same product returned.

Known issues / Roadmap
======================

- Add support for different restocking fee policy. In the current
implementation a fixed price by returned products line is charged. It
would be nice to be able to select an other restocking fee policy.
For example the restocking fee could be based on a percentage of the
value of goods returned.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-workflow/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/OCA/stock-logistics-workflow/issues/new?body=module:%20sale_stock_restocking_fee_invoicing%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
-------

* ACSONE SA/NV

Contributors
------------

- Laurent Mignon <[email protected]> (https://acsone.eu)
- Hughes Damry <[email protected]>
- SodexisTeam <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/18.0/sale_stock_restocking_fee_invoicing>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions sale_stock_restocking_fee_invoicing/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import models
from . import wizards
from .hooks import post_init_hook
22 changes: 22 additions & 0 deletions sale_stock_restocking_fee_invoicing/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Sale Stock Restocking Fee Invoicing",
"summary": """
On demand charge restocking fee for accepting returned goods .""",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-workflow",
"depends": ["sale", "stock", "sale_stock", "stock_account", "stock_picking_kind"],
"data": [
"data/product_product.xml",
"views/res_partner_views.xml",
"views/stock_move_views.xml",
"views/res_config_settings_views.xml",
"wizards/stock_return_picking_views.xml",
],
"post_init_hook": "post_init_hook",
"demo": [],
}
12 changes: 12 additions & 0 deletions sale_stock_restocking_fee_invoicing/data/product_product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="product_restocking_fee" model="product.product">
<field name="name">Restocking fee</field>
<field name="list_price">100</field>
<field name="type">service</field>
<field name="sale_ok" eval="True" />
<field name="purchase_ok" eval="False" />
<field name="invoice_policy">order</field>
<field name="company_id" eval="False" />
</record>
</odoo>
20 changes: 20 additions & 0 deletions sale_stock_restocking_fee_invoicing/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

import logging

_logger = logging.getLogger(__name__)


def _initialize_restocking_fee_product(env):
_logger.info("Initialize restocking fee product on companies")
restocking_fee_product = env.ref(
"sale_stock_restocking_fee_invoicing.product_restocking_fee"
)
env["res.company"].search([]).write(
{"restocking_fee_product_id": restocking_fee_product.id}
)


def post_init_hook(env):
_initialize_restocking_fee_product(env)
178 changes: 178 additions & 0 deletions sale_stock_restocking_fee_invoicing/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_stock_restocking_fee_invoicing
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-17 14:43+0000\n"
"PO-Revision-Date: 2023-03-17 14:43+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_res_partner__charge_restocking_fee
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_res_users__charge_restocking_fee
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_stock_move__charge_restocking_fee
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_stock_return_picking__charge_restocking_fee
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_stock_return_picking_line__charge_restocking_fee
msgid "Charge Restocking Fee"
msgstr "Appliquer des frais de retour"

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model,name:sale_stock_restocking_fee_invoicing.model_res_company
msgid "Companies"
msgstr "Sociétés"

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model,name:sale_stock_restocking_fee_invoicing.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model,name:sale_stock_restocking_fee_invoicing.model_res_partner
msgid "Contact"
msgstr ""

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,help:sale_stock_restocking_fee_invoicing.field_stock_move__charge_restocking_fee
msgid "If checked your customer will be charged for accepting returned goods."
msgstr ""

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,help:sale_stock_restocking_fee_invoicing.field_stock_move__picking_kind
msgid "Indicate the kind of picking based on its locations"
msgstr ""

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_stock_return_picking__is_customer_return
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_stock_return_picking_line__is_customer_return
msgid "Is Customer Return"
msgstr ""

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_sale_order_line__is_restocking_fee
msgid "Is Restocking Fee"
msgstr "Sont des frais de retour"

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,help:sale_stock_restocking_fee_invoicing.field_res_config_settings__restocking_fee_product_id
msgid ""
"It is possible to specify on a customer whether fees must be charged for "
"returning goods. In the case where fees are to be applied, the product "
"specified here is added to the sale order to charge these fees."
msgstr ""

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,help:sale_stock_restocking_fee_invoicing.field_res_company__restocking_fee_product_id
msgid ""
"It is possible to specify on a customer whether restocking fee must be "
"charged for returning goods. In the case where fee are to be applied, the "
"product specified here is added to the sale order to charge these restocking "
"fee."
msgstr ""
"Il est possible de spécifier sur un client si des frais de retour doivent "
"être facturés en cas de retour de marchandise. Dans le cas où des frais "
"doivent être facturés, le produit spécifié ici sera ajouté à la commande "
"pour appliquer ces frais de retour."

#. module: sale_stock_restocking_fee_invoicing
#. odoo-python
#: code:addons/sale_stock_restocking_fee_invoicing/models/sale_order.py:0
#, python-format
msgid ""
"No product configured for restocking fee. Please fix the configuration into "
"stock settings or contact you administrator."
msgstr ""
"Aucun produit configuré pour permettre la facturation des frais de retour. "
"Veuillez modifier les paramètres de configuration dans Inventaire/"
"Configuration/configuration ou contacter l'administrateur Odoo."

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_stock_move__picking_kind
msgid "Picking Kind"
msgstr ""

#. module: sale_stock_restocking_fee_invoicing
#: model_terms:ir.ui.view,arch_db:sale_stock_restocking_fee_invoicing.res_config_settings_view_form
msgid "Product which is the fee for restocking returned goods"
msgstr "Produit représentant les frais en cas retour de biens"

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_res_company__restocking_fee_product_id
#: model:ir.model.fields,field_description:sale_stock_restocking_fee_invoicing.field_res_config_settings__restocking_fee_product_id
msgid "Restocking Fee Product"
msgstr "Produit 'Frais de retour'"

#. module: sale_stock_restocking_fee_invoicing
#: model:product.template,name:sale_stock_restocking_fee_invoicing.product_restocking_fee_product_template
msgid "Restocking fee"
msgstr "Frais de retour"

#. module: sale_stock_restocking_fee_invoicing
#. odoo-python
#: code:addons/sale_stock_restocking_fee_invoicing/models/sale_order.py:0
#, python-format
msgid "Restocking fee for %(prod_uom_qty)s %(prod_uom)s %(so_line)s"
msgstr ""

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model,name:sale_stock_restocking_fee_invoicing.model_stock_return_picking
msgid "Return Picking"
msgstr ""

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model,name:sale_stock_restocking_fee_invoicing.model_stock_return_picking_line
msgid "Return Picking Line"
msgstr ""

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model,name:sale_stock_restocking_fee_invoicing.model_sale_order
msgid "Sales Order"
msgstr "Bon de commande"

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model,name:sale_stock_restocking_fee_invoicing.model_sale_order_line
msgid "Sales Order Line"
msgstr "Ligne de bon de commande"

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model,name:sale_stock_restocking_fee_invoicing.model_stock_move
msgid "Stock Move"
msgstr "Mouvement de stock"

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,help:sale_stock_restocking_fee_invoicing.field_res_partner__charge_restocking_fee
#: model:ir.model.fields,help:sale_stock_restocking_fee_invoicing.field_res_users__charge_restocking_fee
#: model:ir.model.fields,help:sale_stock_restocking_fee_invoicing.field_stock_return_picking_line__charge_restocking_fee
msgid ""
"Tick this box if you wish to charge your customer a fee in case of return of "
"goods"
msgstr ""
"Cocher si vous voulez facturer des frais de retour à votre client pour le "
"traitement de ce retour de marchandise."

#. module: sale_stock_restocking_fee_invoicing
#: model:ir.model.fields,help:sale_stock_restocking_fee_invoicing.field_stock_return_picking__charge_restocking_fee
msgid ""
"Tick this box if you wish to charge your customer a fee in case of return of "
"goods. Default value comes from the customer info."
msgstr ""
"Cocher si vous voulez facturer des frais de retour à votre client pour le "
"traitement de ce retour de marchandise. La valeur par défaut est fournie par "
"la fiche client."

#~ msgid "Is Fee Customer Out"
#~ msgstr "Est une livraison client"

#~ msgid "Is Fee Customer Return"
#~ msgstr "Est un retour client"

#~ msgid "Transfer"
#~ msgstr "Transfert"
Loading
Loading