- The collected checks also apply to transfers outside a batch, opt-in per
operation type ("Require Collected Lines"), with the batch restrictions of
the settings. A per-product toggle in the transfer's Operations tab collects
all its lines.
- Read-only ordered quantity from the sale line on every batch and transfer
view, since the weighed demand overwrites it. Adds a dependency on
sale_stock; a migration fills it in the summary of open batches.
- "Delivery Slips" report on the batch: all its delivery slips in one PDF.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
2.9 KiB
XML
58 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_picking_form_inherit_collect" model="ir.ui.view">
|
|
<field name="name">stock.picking.form.collect</field>
|
|
<field name="model">stock.picking</field>
|
|
<field name="inherit_id" ref="stock.view_picking_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='move_ids_without_package']/list/field[@name='product_uom_qty']" position="before">
|
|
<field name="sale_ordered_qty" readonly="1" optional="show"
|
|
column_invisible="parent.picking_type_code != 'outgoing'"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='move_ids_without_package']/list/field[@name='quantity']" position="after">
|
|
<field name="is_collected" widget="boolean_toggle" optional="show"
|
|
column_invisible="parent.state == 'draft'"
|
|
readonly="not move_line_ids or state in ('done', 'cancel')"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_stock_move_line_detailed_operation_tree_inherit_collect" model="ir.ui.view">
|
|
<field name="name">stock.move.line.operations.list.collect</field>
|
|
<field name="model">stock.move.line</field>
|
|
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='quantity']" position="before">
|
|
<field name="sale_ordered_qty" readonly="1" optional="show"
|
|
column_invisible="context.get('picking_code') == 'incoming'"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='quantity']" position="after">
|
|
<field name="is_collected" widget="boolean_toggle" optional="show"
|
|
readonly="state in ('done', 'cancel')"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_stock_move_line_operation_tree_inherit_collect" model="ir.ui.view">
|
|
<field name="name">stock.move.line.operations.list.popup.collect</field>
|
|
<field name="model">stock.move.line</field>
|
|
<field name="inherit_id" ref="stock.view_stock_move_line_operation_tree"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='quantity']" position="after">
|
|
<field name="is_collected" widget="boolean_toggle"
|
|
readonly="state in ('done', 'cancel')"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_picking_type_form_inherit_collect" model="ir.ui.view">
|
|
<field name="name">stock.picking.type.form.collect</field>
|
|
<field name="model">stock.picking.type</field>
|
|
<field name="inherit_id" ref="stock.view_picking_type_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='create_backorder']" position="after">
|
|
<field name="collected_check_required"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|