Compare commits
2 commits
4d5e0c5502
...
9547193083
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9547193083 | ||
|
|
f25d2b5e2c |
3 changed files with 28 additions and 3 deletions
|
|
@ -17,6 +17,12 @@ class StockMoveLine(models.Model):
|
||||||
readonly=True,
|
readonly=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
product_default_code = fields.Char(
|
||||||
|
string="Product Code",
|
||||||
|
related="product_id.default_code",
|
||||||
|
readonly=True,
|
||||||
|
)
|
||||||
|
|
||||||
is_collected = fields.Boolean(
|
is_collected = fields.Boolean(
|
||||||
string="Collected",
|
string="Collected",
|
||||||
default=False,
|
default=False,
|
||||||
|
|
|
||||||
|
|
@ -253,6 +253,11 @@ class StockPickingBatchSummaryLine(models.Model):
|
||||||
store=True,
|
store=True,
|
||||||
readonly=True,
|
readonly=True,
|
||||||
)
|
)
|
||||||
|
product_default_code = fields.Char(
|
||||||
|
string="Product Code",
|
||||||
|
related="product_id.default_code",
|
||||||
|
readonly=True,
|
||||||
|
)
|
||||||
product_uom_id = fields.Many2one(
|
product_uom_id = fields.Many2one(
|
||||||
comodel_name="uom.uom",
|
comodel_name="uom.uom",
|
||||||
string="Unit of Measure",
|
string="Unit of Measure",
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,9 @@
|
||||||
<field name="model">stock.picking.batch.summary.line</field>
|
<field name="model">stock.picking.batch.summary.line</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<list create="0" delete="0" default_order="product_categ_id,product_id">
|
<list create="0" delete="0" default_order="product_categ_id,product_id">
|
||||||
<!-- Mostrar categoría a la izquierda del producto para mejor legibilidad -->
|
|
||||||
<field name="product_categ_id" readonly="1"/>
|
<field name="product_categ_id" readonly="1"/>
|
||||||
<field name="product_id" readonly="1"/>
|
<field name="product_id" readonly="1" context="{'display_default_code': False}"/>
|
||||||
<!-- Unidad de medida opcional (oculta por defecto si el usuario lo decide) -->
|
<field name="product_default_code" readonly="1" optional="hide"/>
|
||||||
<field name="product_uom_id" readonly="1" optional="hide"/>
|
<field name="product_uom_id" readonly="1" optional="hide"/>
|
||||||
<field name="qty_demanded" readonly="1"/>
|
<field name="qty_demanded" readonly="1"/>
|
||||||
<field name="qty_done" readonly="1"/>
|
<field name="qty_done" readonly="1"/>
|
||||||
|
|
@ -50,12 +49,27 @@
|
||||||
<xpath expr="//field[@name='product_id']" position="before">
|
<xpath expr="//field[@name='product_id']" position="before">
|
||||||
<field name="product_categ_id" readonly="1"/>
|
<field name="product_categ_id" readonly="1"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='product_id']" position="attributes">
|
||||||
|
<attribute name="context">{'display_default_code': False}</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='product_id']" position="after">
|
||||||
|
<field name="product_default_code" readonly="1" optional="hide"/>
|
||||||
|
</xpath>
|
||||||
<xpath expr="//field[@name='product_uom_id']" position="attributes">
|
<xpath expr="//field[@name='product_uom_id']" position="attributes">
|
||||||
<attribute name="optional">hide</attribute>
|
<attribute name="optional">hide</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='company_id'][@groups='base.group_multi_company']" position="attributes">
|
<xpath expr="//field[@name='company_id'][@groups='base.group_multi_company']" position="attributes">
|
||||||
<attribute name="optional">hide</attribute>
|
<attribute name="optional">hide</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='picking_id']" position="attributes">
|
||||||
|
<attribute name="optional">hide</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='location_id']" position="attributes">
|
||||||
|
<attribute name="optional">hide</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='location_dest_id']" position="attributes">
|
||||||
|
<attribute name="optional">hide</attribute>
|
||||||
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue