Compare commits

..

No commits in common. "95471930837a12eaed7c8fd9949a2b254dcecb66" and "4d5e0c55023a1f9f1a7be8333090453cb2809e21" have entirely different histories.

3 changed files with 3 additions and 28 deletions

View file

@ -17,12 +17,6 @@ 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,

View file

@ -253,11 +253,6 @@ 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",

View file

@ -5,9 +5,10 @@
<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" context="{'display_default_code': False}"/> <field name="product_id" readonly="1"/>
<field name="product_default_code" readonly="1" optional="hide"/> <!-- Unidad de medida opcional (oculta por defecto si el usuario lo decide) -->
<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"/>
@ -49,27 +50,12 @@
<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>