This commit sets up the logic and adds the button for "Put in Pack" action that already exists in stock.picking. Reuse/extension of logic from stock.picking reused where possible, including extension of pack wizard to handle products with different destination. Note that logic to handle "Delivery Packaging" wizard when "Delivery Methods" is active was purposely not extended to work correctly in batch pickings due to complexity of adding in a new module just to handle conflicting carrier_ids across pickings in the same batch. It is expected that this use case will not occur except in case of user error. Additionally, stock.picking implementation of 'put_in_pack' method has been renamed to 'action_put_in_pack' to have consistent naming (and support enterprise level code). Part of "1. Improve Batch Pickings" specification of overall barcode improvements task. Task: 1884520 Enterprise PR: odoo/enterprise#12086 Closes: odoo/odoo#55096
27 lines
1.3 KiB
XML
27 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="choose_delivery_package_view_form" model="ir.ui.view">
|
|
<field name="name">choose.delivery.package.form</field>
|
|
<field name="model">choose.delivery.package</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Package">
|
|
<field name="picking_id" invisible="1"/>
|
|
<group>
|
|
<field name="delivery_packaging_id" domain="[('package_carrier_type', '=', context.get('current_package_carrier_type', 'none'))]"
|
|
context="{'form_view_ref':'delivery.product_packaging_delivery_form'}"/>
|
|
<label for="shipping_weight" attrs="{'invisible': [('delivery_packaging_id', '=', False)]}"/>
|
|
<div class="o_row" attrs="{'invisible': [('delivery_packaging_id', '=', False)]}" name="package_weight">
|
|
<field name="shipping_weight"/>
|
|
<field name="weight_uom_name"/>
|
|
</div>
|
|
</group>
|
|
<footer>
|
|
<button name="action_put_in_pack" type="object" string="Save" class="btn-primary"/>
|
|
<button string="Discard" special="cancel" class="btn-secondary"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|