[ADD] stock_picking_batch_custom: columnas opcionales partner y categoría
This commit is contained in:
parent
97dc41d212
commit
ced21cc489
7 changed files with 61 additions and 0 deletions
8
stock_picking_batch_custom/README.rst
Normal file
8
stock_picking_batch_custom/README.rst
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
===============================
|
||||
Stock Picking Batch Custom
|
||||
===============================
|
||||
|
||||
Extra columnas opcionales en las operaciones detalladas de lotes de picking.
|
||||
|
||||
- Columna de partner del albarán (picking_partner_id) opcional/oculta por defecto.
|
||||
- Columna de categoría de producto (product_categ_id) opcional/oculta por defecto para ordenar/agrupación.
|
||||
1
stock_picking_batch_custom/__init__.py
Normal file
1
stock_picking_batch_custom/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from . import models # noqa: F401
|
||||
18
stock_picking_batch_custom/__manifest__.py
Normal file
18
stock_picking_batch_custom/__manifest__.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright 2026 Criptomart
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
{ # noqa: B018
|
||||
"name": "Stock Picking Batch Custom",
|
||||
"version": "18.0.1.0.0",
|
||||
"category": "Warehouse",
|
||||
"summary": "Extra columns for batch detailed operations",
|
||||
"author": "Odoo Community Association (OCA), Criptomart",
|
||||
"maintainers": ["Criptomart"],
|
||||
"website": "https://github.com/Criptomart",
|
||||
"license": "AGPL-3",
|
||||
"depends": [
|
||||
"stock_picking_batch",
|
||||
],
|
||||
"data": [
|
||||
"views/stock_move_line_views.xml",
|
||||
],
|
||||
}
|
||||
1
stock_picking_batch_custom/models/__init__.py
Normal file
1
stock_picking_batch_custom/models/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from . import stock_move_line # noqa: F401
|
||||
17
stock_picking_batch_custom/models/stock_move_line.py
Normal file
17
stock_picking_batch_custom/models/stock_move_line.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Copyright 2026 Criptomart
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields
|
||||
from odoo import models
|
||||
|
||||
|
||||
class StockMoveLine(models.Model):
|
||||
_inherit = "stock.move.line"
|
||||
|
||||
product_categ_id = fields.Many2one(
|
||||
comodel_name="product.category",
|
||||
string="Product Category",
|
||||
related="product_id.categ_id",
|
||||
store=True,
|
||||
readonly=True,
|
||||
)
|
||||
BIN
stock_picking_batch_custom/static/description/icon.png
Normal file
BIN
stock_picking_batch_custom/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 111 KiB |
16
stock_picking_batch_custom/views/stock_move_line_views.xml
Normal file
16
stock_picking_batch_custom/views/stock_move_line_views.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_move_line_tree_inherit_batch_custom" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.list.batch.custom</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock_picking_batch.view_move_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='product_id']" position="after">
|
||||
<field name="product_categ_id" optional="hide"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='picking_id']" position="after">
|
||||
<field name="picking_partner_id" optional="hide"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue