mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
@@ -11,5 +11,5 @@
|
||||
"license": "LGPL-3",
|
||||
"installable": True,
|
||||
"depends": ["stock_packaging_calculator", "stock"],
|
||||
"data": ["views/stock_picking.xml"],
|
||||
"data": ["views/stock_picking.xml", "views/stock_inventory_line.xml"],
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from . import stock_inventory_line
|
||||
from . import stock_move
|
||||
from . import stock_move_line
|
||||
from . import stock_quant
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Copyright 2021 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class StockInventoryLine(models.Model):
|
||||
|
||||
_name = "stock.inventory.line"
|
||||
_inherit = ["stock.inventory.line", "product.qty_by_packaging.mixin"]
|
||||
|
||||
_qty_by_pkg__qty_field_name = "theoretical_qty"
|
||||
@@ -4,5 +4,9 @@ It adds product qty computed by packaging to:
|
||||
* stock move
|
||||
* stock move line
|
||||
* stock quant
|
||||
* stock inventory line
|
||||
|
||||
and displays it for move line on stock picking view.
|
||||
Displays it:
|
||||
|
||||
* stock picking view for move line
|
||||
* on inventory line tree view for stock_inventory_line
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2021 Camptocamp SA
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="stock_inventory_line_tree2" model="ir.ui.view">
|
||||
<field name="name">stock.inventory.line.tree.inherit</field>
|
||||
<field name="model">stock.inventory.line</field>
|
||||
<field name="inherit_id" ref="stock.stock_inventory_line_tree2" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="theoretical_qty" position="after">
|
||||
<field name="product_qty_by_packaging_display" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user