Add support for filter by location on inventory report and inventory valuation

Refund option enabled by default on Return wizard
This commit is contained in:
Alexis de Lattre
2019-08-12 00:25:20 +02:00
parent 3052d7c905
commit cadbd840d9
15 changed files with 201 additions and 28 deletions

View File

@@ -1,2 +1 @@
from . import sale_stock
from . import wizard

View File

@@ -1 +0,0 @@
from . import stock_return_picking

View File

@@ -1,18 +0,0 @@
# Copyright 2017-2019 Akretion France (https://akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, api
class StockReturnPicking(models.TransientModel):
_inherit = 'stock.return.picking'
@api.model
def default_get(self, fields):
res = super(StockReturnPicking, self).default_get(fields)
if res.get('product_return_moves'):
for line in res['product_return_moves']:
if len(line) == 3:
line[2]['to_refund_so'] = True
return res