Skip to content

Commit f2d9f36

Browse files
mmequignonTDu
authored andcommitted
Add shopfloor_reception_refund_return
1 parent cebf062 commit f2d9f36

File tree

11 files changed

+100
-0
lines changed

11 files changed

+100
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../shopfloor_reception_refund_return
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wait 4 da boat
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import actions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2023 Camptocamp SA
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
3+
4+
{
5+
"name": "Shopfloor Reception Refund Return",
6+
"summary": "Mark created return as to refund",
7+
"version": "14.0.1.0.0",
8+
"category": "Inventory, Accounting",
9+
"website": "https://github.com/OCA/wms",
10+
"author": "Camptocamp, BCIM, Odoo Community Association (OCA)",
11+
"maintainers": ["mmequignon"],
12+
"license": "AGPL-3",
13+
"installable": True,
14+
"auto_install": False,
15+
"depends": ["shopfloor", "stock_account"],
16+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import stock
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2023 Camptocamp SA
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
3+
4+
from odoo.addons.component.core import Component
5+
6+
7+
class StockAction(Component):
8+
_inherit = "shopfloor.stock.action"
9+
10+
def _create_return_move__get_vals(self, return_picking, origin_move):
11+
res = super()._create_return_move__get_vals(return_picking, origin_move)
12+
if return_picking.picking_type_code == "incoming":
13+
res["to_refund"] = True
14+
return res
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* Matthieu Méquignon <[email protected]>
2+
* Jacques-Etienne Baudoux (BCIM) <[email protected]>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Marks returns created by shopfloor as to refund.
2+
3+
Sets `to_refund` to true when when creating a return move.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import test_action_stock

0 commit comments

Comments
 (0)