[IMP] stock_picking_batch_custom: keep the weighed quantity on the operator view
Basket Assembly is where the reverting quantity was noticed, so it depends on stock_move_manual_quantity now and its two lists load `picked`: the web client only saves the fields present in the arch, and without it the onchange that freezes a hand-typed quantity never reaches the server. Collecting a line does the same, minus the demand. It is the operator saying the goods are in the basket, so the quantity has to survive the reservation engine even when it was never retyped -- but only a quantity typed by hand says what the demand should become, and a line collected at zero would otherwise lose its demand and be cancelled on validation. Drops views/stock_move_line_views.xml on the way. It declared a second record under the id stock_picking_batch_views.xml already uses, so it was loaded first and immediately overwritten: dead weight that would have turned into a duplicate-field view had anyone renamed it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
d433e50f2f
commit
2e7549f857
7 changed files with 103 additions and 37 deletions
|
|
@ -33,6 +33,8 @@
|
|||
<field name="home_delivery" readonly="1" widget="boolean_toggle" optional="show"/>
|
||||
<field name="consumer_group_id" readonly="1" optional="show"/>
|
||||
<field name="quantity" string="Cant."/>
|
||||
<!-- Loaded so `_onchange_quantity_manual` reaches the server. -->
|
||||
<field name="picked" column_invisible="True"/>
|
||||
<field name="is_collected" widget="boolean_toggle"/>
|
||||
</list>
|
||||
</field>
|
||||
|
|
@ -91,6 +93,10 @@
|
|||
<field name="consumer_group_id" readonly="1" optional="show"/>
|
||||
<field name="is_collected" widget="boolean_toggle" optional="show"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='quantity']" position="after">
|
||||
<!-- Loaded so `_onchange_quantity_manual` reaches the server. -->
|
||||
<field name="picked" column_invisible="True"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='product_uom_id']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</xpath>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue