Skip to content

Commit

Permalink
Merge PR #415 into 11.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Sep 4, 2019
2 parents 25f2484 + f713561 commit 40c151d
Show file tree
Hide file tree
Showing 19 changed files with 1,103 additions and 0 deletions.
140 changes: 140 additions & 0 deletions stock_picking_return_refund_option/README.rst
@@ -0,0 +1,140 @@
==================================
Stock Picking Return Refund Option
==================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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-OCA%2Faccount--invoicing-lightgray.png?logo=github
:target: https://github.com/OCA/account-invoicing/tree/11.0/stock_picking_return_refund_option
:alt: OCA/account-invoicing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-invoicing-11-0/account-invoicing-11-0-stock_picking_return_refund_option
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/95/11.0
:alt: Try me on Runbot

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

This module extends the functionality of sales and purchase orders to support
modify stock move field to_refund after it has been confirmed.

**Table of contents**

.. contents::
:local:

Installation
============

#. This module requires the additional installation of sale_stock or purchase
modules for enabling the features it contains.

Usage
=====

To use this module, when some customer returns some refundable products to you
after you created an invoice, you need to:

For a sale order:

#. Go to *Sales > Sales Orders > Create*.
#. Choose a customer and add a product whose *Invoicing Policy* is *Delivered
quantities*, and input some quantity to sell.
#. Confirm the sale.
#. Go to *Delivery > Validate > Apply*.
#. Return to the sale order.
#. Press *Create Invoice > Invoiceable lines > Create and View Invoices*.
#. The created invoice's amount is the same you sold.
#. Return to the sale order.
#. Go to *Delivery > Reverse*.
#. Set *Quantity* to a lower quantity than the sold one, and enable
*To Refund*.
#. Press *Return > Validate > Apply*.
#. Return to the sale order.
#. Press *Create Invoice > Invoiceable lines (deduct down payments) >
Create and View Invoices*.
#. A refund is created for the quantity you returned before.

For allowing to refund quantities after the picking has been confirmed if you
did not check 'to refund' in wizard, you can change the value
of 'Refund Options' field.

To use this module, when you return some refundable products to your supplier
after you created an invoice, you need to:

#. Go to *Purchase > Purchase Orders > Create*.
#. Choose a supplier and add a product whose *Invoicing Policy* is *Delivered
quantities*, and input some quantity to buy.
#. Confirm the order.
#. Go to *Delivery > Validate > Apply*.
#. Return to the purchase order.
#. Press on smart button "Invoices" and create one.
#. The created invoice's amount is the same you sold.
#. Return to the purchase order.
#. Go to *Delivery > Reverse*.
#. Set *Quantity* to a lower quantity than you bought, and enable
*To Refund*.
#. Press *Return > Validate > Apply*.
#. Return to the purchase order.

For allowing to refund quantities after the picking has been confirmed if you
did not check 'to refund' in wizard, you can change the value
of 'Refund Options' field.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/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/OCA/account-invoicing/issues/new?body=module:%20stock_picking_return_refund_option%0Aversion:%2011.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
~~~~~~~

* Tecnativa

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

* Sergio Teruel <sergio.teruel@tecnativa.com>

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.

.. |maintainer-sergio-teruel| image:: https://github.com/sergio-teruel.png?size=40px
:target: https://github.com/sergio-teruel
:alt: sergio-teruel

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-sergio-teruel|

This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/11.0/stock_picking_return_refund_option>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions stock_picking_return_refund_option/__init__.py
@@ -0,0 +1,5 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from .hooks import pre_init_hook
from . import models
from . import wizards
23 changes: 23 additions & 0 deletions stock_picking_return_refund_option/__manifest__.py
@@ -0,0 +1,23 @@
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
'name': 'Stock Picking Return Refund Option',
'summary': 'Update the refund options in pickings',
'version': '11.0.1.0.0',
'development_status': 'Beta',
'category': 'Sales',
'website': 'https://github.com/OCA/account-invoicing',
'author': 'Tecnativa, '
'Odoo Community Association (OCA)',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': [
'stock_account',
],
'data': [
'views/stock_picking_view.xml',
],
'pre_init_hook': 'pre_init_hook',
'maintainers': ['sergio-teruel'],
}
12 changes: 12 additions & 0 deletions stock_picking_return_refund_option/hooks.py
@@ -0,0 +1,12 @@
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, SUPERUSER_ID, tools


def pre_init_hook(cr):
if not tools.config.options.get('without_demo', False):
env = api.Environment(cr, SUPERUSER_ID, {})
env['ir.module.module'].search([
('name', 'in', ['purchase', 'sale_stock']),
('state', '!=', 'installed'),
]).write({'state': 'to install'})
72 changes: 72 additions & 0 deletions stock_picking_return_refund_option/i18n/es.po
@@ -0,0 +1,72 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_return_refund_option
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-10 08:29+0000\n"
"PO-Revision-Date: 2019-06-10 10:31+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.6\n"

#. module: stock_picking_return_refund_option
#: model:ir.model.fields,field_description:stock_picking_return_refund_option.field_stock_picking_is_return
msgid "Is Return"
msgstr "Es devolución"

#. module: stock_picking_return_refund_option
#: selection:stock.picking,to_refund_lines:0
msgid "No Refund"
msgstr "No abonar"

#. module: stock_picking_return_refund_option
#: model:ir.model.fields,field_description:stock_picking_return_refund_option.field_stock_picking_to_refund_lines
#: model:ir.ui.view,arch_db:stock_picking_return_refund_option.view_picking_form
msgid "Refund Options"
msgstr "Opciones de devolución"

#. module: stock_picking_return_refund_option
#: model:ir.model,name:stock_picking_return_refund_option.model_stock_return_picking
msgid "Return Picking"
msgstr "Albarán de devolución"

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

#. module: stock_picking_return_refund_option
#: model:ir.model.fields,help:stock_picking_return_refund_option.field_stock_picking_to_refund_lines
msgid ""
"This field allow modify 'to_refund' field value in all stock moves from this "
"picking after it has been confirmed.to_refund: set all stock moves to True "
"value and recompute delivered quantities in sale order.\n"
"no_refund: set all stock moves to False value and recompute delivered "
"quantities in sale/purchase order."
msgstr ""
"Este campo permite modificar el valor del campo 'para abonar en el pedido' "
"de todos los movimientos de stock del albarán después de que haya sido "
"confirmado.\n"
"Para abonar en el pedido: Actualiza todos los movimientos de stock con el "
"valor a 'verdadero' y recalcula las unidades entregadas del pedido de "
"venta.\n"
"No abonar en el pedido: Actualiza todos los movimientos de stock con el "
"valor a 'falso' y recalcula las unidades entregadas del pedido de venta."

#. module: stock_picking_return_refund_option
#: selection:stock.picking,to_refund_lines:0
msgid "To Refund"
msgstr "Para abonar"

#. module: stock_picking_return_refund_option
#: model:ir.model,name:stock_picking_return_refund_option.model_stock_picking
msgid "Transfer"
msgstr "Transferir"
@@ -0,0 +1,59 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_return_refund_option
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-10 08:29+0000\n"
"PO-Revision-Date: 2019-06-10 08:29+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: stock_picking_return_refund_option
#: model:ir.model.fields,field_description:stock_picking_return_refund_option.field_stock_picking_is_return
msgid "Is Return"
msgstr ""

#. module: stock_picking_return_refund_option
#: selection:stock.picking,to_refund_lines:0
msgid "No Refund"
msgstr ""

#. module: stock_picking_return_refund_option
#: model:ir.model.fields,field_description:stock_picking_return_refund_option.field_stock_picking_to_refund_lines
#: model:ir.ui.view,arch_db:stock_picking_return_refund_option.view_picking_form
msgid "Refund Options"
msgstr ""

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

#. module: stock_picking_return_refund_option
#: model:ir.model,name:stock_picking_return_refund_option.model_stock_move
msgid "Stock Move"
msgstr ""

#. module: stock_picking_return_refund_option
#: model:ir.model.fields,help:stock_picking_return_refund_option.field_stock_picking_to_refund_lines
msgid "This field allow modify 'to_refund' field value in all stock moves from this picking after it has been confirmed.to_refund: set all stock moves to True value and recompute delivered quantities in sale order.\n"
"no_refund: set all stock moves to False value and recompute delivered quantities in sale/purchase order."
msgstr ""

#. module: stock_picking_return_refund_option
#: selection:stock.picking,to_refund_lines:0
msgid "To Refund"
msgstr ""

#. module: stock_picking_return_refund_option
#: model:ir.model,name:stock_picking_return_refund_option.model_stock_picking
msgid "Transfer"
msgstr ""

2 changes: 2 additions & 0 deletions stock_picking_return_refund_option/models/__init__.py
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import stock_picking

0 comments on commit 40c151d

Please sign in to comment.