mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[MIG] stock_account_quantity_history_location: Migration to 12.0
This commit is contained in:
committed by
Atchuthan, Sodexis
parent
4a0b6dcfec
commit
95f3e0aed7
@@ -0,0 +1 @@
|
||||
from . import wizards
|
||||
@@ -7,7 +7,7 @@
|
||||
'summary': """
|
||||
Glue module between Stock Account and Stock Quantity History Location
|
||||
modules""",
|
||||
'version': '11.0.1.0.0',
|
||||
'version': '12.0.1.0.0',
|
||||
'license': 'AGPL-3',
|
||||
'author': 'Eficent,'
|
||||
'Odoo Community Association (OCA)',
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
from . import stock_quantity_history
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Copyright 2019 Eficent Business and IT Consulting Services, S.L.
|
||||
# Copyright 2019 Aleph Objects, Inc.
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
import ast
|
||||
from odoo import models
|
||||
|
||||
|
||||
class StockQuantityHistory(models.TransientModel):
|
||||
_inherit = 'stock.quantity.history'
|
||||
|
||||
def open_table(self):
|
||||
action = super(StockQuantityHistory, self).open_table()
|
||||
# Show 0 quantities on Inventory Valuation to display Account Valuation
|
||||
# anomalies, such as, non 0 stock_value on cost_method FIFO
|
||||
if self.env.context.get('valuation') and not self.location_id:
|
||||
domain = ast.literal_eval(action['domain'])
|
||||
domain.pop(domain.index(('qty_available', '!=', 0)))
|
||||
action['domain'] = domain
|
||||
return action
|
||||
@@ -9,7 +9,7 @@
|
||||
<field name="location_id"/>
|
||||
<field name="include_child_locations"
|
||||
attrs="{'invisible': [('location_id', '=', False)]}"/>
|
||||
<div class="alert alert-warning" colspan="2"
|
||||
<div class="alert alert-warning" role="alert" colspan="2"
|
||||
attrs="{'invisible': [('location_id', '=', False)]}"
|
||||
style="margin-bottom:0px;">
|
||||
<p><i class="fa fa-info-circle"/> The accounting valuation is not calculated when you specify a location.
|
||||
|
||||
Reference in New Issue
Block a user