Skip to content

Commit

Permalink
[FIX] stock_ux: filter cancelled stock_move
Browse files Browse the repository at this point in the history
closes #314

Signed-off-by: Nicolas Mac Rouillon <nmr@adhoc.com.ar>
  • Loading branch information
augusto-weiss committed Jan 4, 2022
1 parent 175766c commit 5479480
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stock_ux/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Stock UX',
'version': '13.0.1.12.0',
'version': '13.0.1.13.0',
'category': 'Warehouse Management',
'sequence': 14,
'summary': '',
Expand Down
7 changes: 6 additions & 1 deletion stock_ux/views/report_deliveryslip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</p>
</td>
</xpath>
<xpath expr="//table[@name='stock_move_line_table']/tbody/tr/td[1]" position="attributes">
<xpath expr="//table[@name='stock_move_line_table']/tbody/tr/td[1]" position="attributes">
<attribute name="t-if">o.env['ir.config_parameter'].sudo().get_param('stock_ux.delivery_slip_use_origin', 'False') == 'False'</attribute>
</xpath>
<xpath expr="//table[@name='stock_move_line_table']/tbody/tr/td[1]" position="after">
Expand All @@ -29,6 +29,11 @@
</p>
</td>
</xpath>
<!-- Filtramos los stock_move en estado cancelado porque nosotros habilitamos la cancelacion de los mismos,
esto desde el lado de Odoo no se puede lograr -->
<xpath expr="//t[@t-set='lines']" position="after">
<t t-set="lines" t-value="o.move_lines.filtered(lambda x: x.product_uom_qty and x.state != 'cancel')"/>
</xpath>
</template>

</odoo>

0 comments on commit 5479480

Please sign in to comment.