From 86ec56b610a833c74ff1cca4bf9f0871a0ba585f Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 3 Dec 2020 23:26:16 +0100 Subject: [PATCH] Remove un-needed code in stock_account_usability As the module is now empty, don't make it installable for the moment --- stock_account_usability/__init__.py | 1 - stock_account_usability/__manifest__.py | 12 ++----- ...y_valuation_by_location-stock_account.diff | 22 ------------ stock_account_usability/product_view.xml | 23 ------------ .../wizard/stock_quantity_history.py | 35 ------------------- .../wizard/stock_quantity_history_view.xml | 23 ------------ .../wizard/stock_return_picking.py | 19 ---------- 7 files changed, 2 insertions(+), 133 deletions(-) delete mode 100644 stock_account_usability/inventory_valuation_by_location-stock_account.diff delete mode 100644 stock_account_usability/product_view.xml delete mode 100644 stock_account_usability/wizard/stock_quantity_history.py delete mode 100644 stock_account_usability/wizard/stock_quantity_history_view.xml delete mode 100644 stock_account_usability/wizard/stock_return_picking.py diff --git a/stock_account_usability/__init__.py b/stock_account_usability/__init__.py index 4027237..e69de29 100644 --- a/stock_account_usability/__init__.py +++ b/stock_account_usability/__init__.py @@ -1 +0,0 @@ -from . import wizard diff --git a/stock_account_usability/__manifest__.py b/stock_account_usability/__manifest__.py index 49027d0..502dfc4 100644 --- a/stock_account_usability/__manifest__.py +++ b/stock_account_usability/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2019-2020 Akretion France (http://www.akretion.com) # @author Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -6,7 +5,7 @@ { 'name': 'Stock Account Usability', - 'version': '12.0.1.0.0', + 'version': '14.0.1.0.0', 'category': 'Hidden', 'license': 'AGPL-3', 'summary': 'Several usability enhancements on stock_account', @@ -16,12 +15,7 @@ Stock Account Usability The usability enhancements include: -* activate the refund option by default in return wizard on pickings - -* show field *property_cost_method* on product form view - -* add ability to select a stock location on the inventory valuation report - +NONE This module has been written by Alexis de Lattre from Akretion . """, @@ -29,8 +23,6 @@ This module has been written by Alexis de Lattre from Akretion - - - - - - - stock_account.product.template.form - product.template - - - - 0 - - - - - - diff --git a/stock_account_usability/wizard/stock_quantity_history.py b/stock_account_usability/wizard/stock_quantity_history.py deleted file mode 100644 index 0eab5b2..0000000 --- a/stock_account_usability/wizard/stock_quantity_history.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2019 Akretion France (http://www.akretion.com/) -# @author: Alexis de Lattre -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import models - - -class StockQuantityHistory(models.TransientModel): - _inherit = 'stock.quantity.history' - - def open_table(self): - action = super(StockQuantityHistory, self).open_table() - if self.location_id and self.env.context.get('valuation'): - # When we have 'valuation' in context - # in both cases ('current inventory' and 'at specific date') - # it returns an action on product.product, - # the only difference is the context. - # We have to make the same modifications, but - # when self.compute_at_date, action['context'] is a dict - # otherwize, action['context'] is a string - if self.compute_at_date: - # insert "location" in context for qty computation - action['context']['location'] = self.location_id.id - # When company_owned=True, the 'location' given in the - # context is not taken into account - # IMPORTANT: also requires a patch on the stock_account - # module. Patch provided in this module. - action['context']['company_owned'] = False - else: - action['context'] = { - 'location': self.location_id.id, - 'create': False, - 'edit': False, - } - return action diff --git a/stock_account_usability/wizard/stock_quantity_history_view.xml b/stock_account_usability/wizard/stock_quantity_history_view.xml deleted file mode 100644 index 514e6bb..0000000 --- a/stock_account_usability/wizard/stock_quantity_history_view.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - stock_account_usability.stock.quantity.history.form - stock.quantity.history - - - - - - - - - - diff --git a/stock_account_usability/wizard/stock_return_picking.py b/stock_account_usability/wizard/stock_return_picking.py deleted file mode 100644 index 12221c6..0000000 --- a/stock_account_usability/wizard/stock_return_picking.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2019 Akretion France (https://akretion.com/) -# @author: Alexis de Lattre -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import api, models - - -class StockReturnPicking(models.TransientModel): - _inherit = 'stock.return.picking' - - # Set to_refund to True by default - @api.model - def default_get(self, fields_list): - res = super(StockReturnPicking, self).default_get(fields_list) - if isinstance(res.get('product_return_moves'), list): - for l in res['product_return_moves']: - if len(l) == 3 and isinstance(l[2], dict): - l[2]['to_refund'] = True - return res