Skip to content

Commit

Permalink
[IMP] stock_ux: origin_description changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vib-adhoc committed Jul 10, 2023
1 parent b4ea24f commit fe0ac52
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion stock_ux/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Stock UX',
'version': "16.0.2.2.0",
'version': "16.0.2.3.0",
'category': 'Warehouse Management',
'sequence': 14,
'summary': '',
Expand Down
3 changes: 3 additions & 0 deletions stock_ux/models/stock_move_line.py
Expand Up @@ -32,6 +32,9 @@ class StockMoveLine(models.Model):
related="move_id.name",
related_sudo=False,
)
origin_description = fields.Char(
related="move_id.origin_description",
)

def set_all_done(self):
precision = self.env['decimal.precision'].precision_get(
Expand Down
6 changes: 3 additions & 3 deletions stock_ux/views/report_deliveryslip.xml
Expand Up @@ -29,11 +29,11 @@

<template id="stock_report_delivery_has_serial_move_line" inherit_id="stock.stock_report_delivery_has_serial_move_line">
<xpath expr="//td[1]" position="attributes">
<attribute name="t-if">o.env['ir.config_parameter'].sudo().get_param('stock_ux.delivery_slip_use_origin', 'False') == 'False' or not move_line.move_id.origin_description</attribute>
<attribute name="t-if">o.env['ir.config_parameter'].sudo().get_param('stock_ux.delivery_slip_use_origin', 'False') == 'False' or not move_line.origin_description</attribute>
</xpath>
<xpath expr="//td[1]" position="after">
<td t-if="o.env['ir.config_parameter'].sudo().get_param('stock_ux.delivery_slip_use_origin') == 'True' and move_line.move_id.origin_description">
<span t-field="move_line.move_id.origin_description"/>
<td t-if="o.env['ir.config_parameter'].sudo().get_param('stock_ux.delivery_slip_use_origin') == 'True' and move_line.origin_description">
<span t-field="move_line.origin_description"/>
</td>
</xpath>
</template>
Expand Down
2 changes: 1 addition & 1 deletion stock_ux/views/stock_move_line_views.xml
Expand Up @@ -114,7 +114,7 @@
<field name="arch" type="xml">
<field name="product_id" position="after">
<field name="description_picking" optional="hide"/>
<field name="name" string="Descripción de origen" optional="hide"/>
<field name="origin_description" string="Descripción de origen" optional="hide"/>
</field>
<field name="qty_done" position="after">
<button name="set_all_done" title="Set all Done" type="object" icon="fa-check" states="confirmed,assigned,waiting,partially_available"/>
Expand Down
2 changes: 1 addition & 1 deletion stock_ux/views/stock_picking_views.xml
Expand Up @@ -12,7 +12,7 @@
<attribute name="attrs"></attribute>
</field>
<field name="description_picking" position="after">
<field name="name" string="Descripción de origen" optional="hide"/>
<field name="origin_description" string="Descripción de origen" optional="hide"/>
</field>
<div name="button_box">
<button name="add_picking_operation" class="oe_inline oe_right" icon="fa-list" type="object" string="Process Products" attrs="{'invisible': [('state', 'not in', ['confirmed', 'assigned'])]}"/>
Expand Down

0 comments on commit fe0ac52

Please sign in to comment.