160 lines
6.0 KiB
XML
160 lines
6.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="action_direct_print_delivery_slip" model="ir.actions.server">
|
|
<field name="name">Direct Print Delivery Slip</field>
|
|
<field name="model_id" ref="stock.model_stock_picking"/>
|
|
<field name="binding_model_id" ref="stock.model_stock_picking"/>
|
|
<field name="binding_view_types">list,form</field>
|
|
<field name="state">code</field>
|
|
<field name="code">
|
|
if records:
|
|
action = {
|
|
'type': 'ir.actions.client',
|
|
'tag': 'direct_print',
|
|
'report_name': 'stock.action_report_delivery',
|
|
'docids': records.ids,
|
|
'context': env.context,
|
|
}
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_direct_print_picking_operations" model="ir.actions.server">
|
|
<field name="name">Direct Print Picking Operations</field>
|
|
<field name="model_id" ref="stock.model_stock_picking"/>
|
|
<field name="binding_model_id" ref="stock.model_stock_picking"/>
|
|
<field name="binding_view_types">list,form</field>
|
|
<field name="state">code</field>
|
|
<field name="code">
|
|
if records:
|
|
action = {
|
|
'type': 'ir.actions.client',
|
|
'tag': 'direct_print',
|
|
'report_name': 'stock.action_report_picking',
|
|
'docids': records.ids,
|
|
'context': env.context,
|
|
}
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Internal Transfer Direct Print -->
|
|
<record id="action_direct_print_internal_transfer" model="ir.actions.server">
|
|
<field name="name">Direct Print Internal Transfer</field>
|
|
<field name="model_id" ref="stock.model_stock_picking"/>
|
|
<field name="binding_model_id" ref="stock.model_stock_picking"/>
|
|
<field name="binding_view_types">list,form</field>
|
|
<field name="state">code</field>
|
|
<field name="code">
|
|
if records:
|
|
# Filter for internal transfers
|
|
internal_transfers = records.filtered(lambda r: r.picking_type_id.code == 'internal')
|
|
if internal_transfers:
|
|
action = {
|
|
'type': 'ir.actions.client',
|
|
'tag': 'direct_print',
|
|
'report_name': 'stock.action_report_picking',
|
|
'docids': internal_transfers.ids,
|
|
'context': env.context,
|
|
}
|
|
else:
|
|
# All records if none are internal transfers
|
|
action = {
|
|
'type': 'ir.actions.client',
|
|
'tag': 'direct_print',
|
|
'report_name': 'stock.action_report_picking',
|
|
'docids': records.ids,
|
|
'context': env.context,
|
|
}
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Receipt/Incoming Shipment Direct Print -->
|
|
<record id="action_direct_print_receipt" model="ir.actions.server">
|
|
<field name="name">Direct Print Receipt</field>
|
|
<field name="model_id" ref="stock.model_stock_picking"/>
|
|
<field name="binding_model_id" ref="stock.model_stock_picking"/>
|
|
<field name="binding_view_types">list,form</field>
|
|
<field name="state">code</field>
|
|
<field name="code">
|
|
if records:
|
|
# Filter for incoming/receipt operations
|
|
receipts = records.filtered(lambda r: r.picking_type_id.code == 'incoming')
|
|
if receipts:
|
|
action = {
|
|
'type': 'ir.actions.client',
|
|
'tag': 'direct_print',
|
|
'report_name': 'stock.action_report_picking',
|
|
'docids': receipts.ids,
|
|
'context': env.context,
|
|
}
|
|
else:
|
|
# All records if none are receipts
|
|
action = {
|
|
'type': 'ir.actions.client',
|
|
'tag': 'direct_print',
|
|
'report_name': 'stock.action_report_picking',
|
|
'docids': records.ids,
|
|
'context': env.context,
|
|
}
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Stock Move Direct Print -->
|
|
<record id="action_direct_print_stock_move" model="ir.actions.server">
|
|
<field name="name">Direct Print Stock Move</field>
|
|
<field name="model_id" ref="stock.model_stock_move"/>
|
|
<field name="binding_model_id" ref="stock.model_stock_move"/>
|
|
<field name="binding_view_types">list,form</field>
|
|
<field name="state">code</field>
|
|
<field name="code">
|
|
if records:
|
|
action = {
|
|
'type': 'ir.actions.client',
|
|
'tag': 'direct_print',
|
|
'report_name': 'stock.report_stock_move',
|
|
'docids': records.ids,
|
|
'context': env.context,
|
|
}
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Inventory Valuation Direct Print -->
|
|
<record id="action_direct_print_inventory_valuation" model="ir.actions.server">
|
|
<field name="name">Direct Print Inventory Valuation</field>
|
|
<field name="model_id" ref="stock.model_stock_quant"/>
|
|
<field name="binding_model_id" ref="stock.model_stock_quant"/>
|
|
<field name="binding_view_types">list</field>
|
|
<field name="state">code</field>
|
|
<field name="code">
|
|
if records:
|
|
action = {
|
|
'type': 'ir.actions.client',
|
|
'tag': 'direct_print',
|
|
'report_name': 'stock.action_report_inventory',
|
|
'docids': records.ids,
|
|
'context': env.context,
|
|
}
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Package/Lot Tracking Direct Print -->
|
|
<record id="action_direct_print_package_content" model="ir.actions.server">
|
|
<field name="name">Direct Print Package Content</field>
|
|
<field name="model_id" ref="stock.model_stock_quant_package"/>
|
|
<field name="binding_model_id" ref="stock.model_stock_quant_package"/>
|
|
<field name="binding_view_types">list,form</field>
|
|
<field name="state">code</field>
|
|
<field name="code">
|
|
if records:
|
|
action = {
|
|
'type': 'ir.actions.client',
|
|
'tag': 'direct_print',
|
|
'report_name': 'stock.action_report_quant_package_barcode',
|
|
'docids': records.ids,
|
|
'context': env.context,
|
|
}
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo> |