[IMP] inventory related addons: improve report naming and use print_report_name
Purpose of this commit is to clean and uniformize report naming through various addons. It has been chosen to name them using a formatting like <report_name> - <object_name or suffix> . Improve report naming in product, stock, mrp and mrp repair.
This commit is contained in:
@@ -8,10 +8,8 @@
|
||||
name="mrp.report_mrpbomstructure"
|
||||
file="mrp.report.mrp_bom_templates"
|
||||
report_type="qweb-pdf"
|
||||
print_report_name="'BOM - %s' % (object.product_id.name or object.product_tmpl_id.name or '')"
|
||||
/>
|
||||
<record id="action_report_bom_structure" model="ir.actions.report">
|
||||
<field name="print_report_name">'BOM'+'-'+(object.product_id.name or object.product_tmpl_id.name)</field>
|
||||
</record>
|
||||
|
||||
<report
|
||||
string="Production Order"
|
||||
@@ -20,10 +18,8 @@
|
||||
name="mrp.report_mrporder"
|
||||
file="mrp.report.mrp_production_templates"
|
||||
report_type="qweb-pdf"
|
||||
print_report_name="'Production Order - %s' % object.name"
|
||||
/>
|
||||
<record id="action_report_production_order" model="ir.actions.report">
|
||||
<field name="print_report_name">'Production Order'+'-'+(object.name)</field>
|
||||
</record>
|
||||
|
||||
<report
|
||||
string="BOM Cost"
|
||||
@@ -32,9 +28,7 @@
|
||||
name="mrp_bom_cost"
|
||||
file="mrp_bom_cost"
|
||||
report_type="qweb-html"
|
||||
print_report_name="'BOM Cost - %s' % (object.product_id.name or object.product_tmpl_id.name or '')"
|
||||
/>
|
||||
<record id="action_report_bom_price" model="ir.actions.report">
|
||||
<field name="print_report_name">'BOM Cost'+'-'+(object.product_id.name or object.product_tmpl_id.name)</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
name="mrp_repair.report_mrprepairorder2"
|
||||
file="mrp_repair.report_mrprepairorder"
|
||||
report_type="qweb-pdf"
|
||||
print_report_name="(
|
||||
object.state == 'draft' and 'Repair Quotation - %s' % (object.name) or
|
||||
'Repair Order - %s' % (object.name))"
|
||||
/>
|
||||
<record id="action_report_mrp_repair_order" model="ir.actions.report">
|
||||
<field name="print_report_name">(object.state == 'draft' and 'Repair Quotation'+'-'+(object.name) or 'Repair Order'+'-'+(object.name))</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
model="product.product"
|
||||
report_type="qweb-pdf"
|
||||
name="product.report_productlabel"
|
||||
file="product.report_productlabel"/>
|
||||
<record id="report_product_label" model="ir.actions.report">
|
||||
<field name="print_report_name">'Products Labels'+'-'+(object.name)</field>
|
||||
</record>
|
||||
file="product.report_productlabel"
|
||||
print_report_name="'Products Labels - %s' % (object.name)"
|
||||
/>
|
||||
|
||||
<report
|
||||
id="report_product_template_label"
|
||||
@@ -18,10 +17,9 @@
|
||||
model="product.template"
|
||||
report_type="qweb-pdf"
|
||||
name="product.report_producttemplatelabel"
|
||||
file="product.report_producttemplatelabel"/>
|
||||
<record id="report_product_template_label" model="ir.actions.report">
|
||||
<field name="print_report_name">'Products Labels'+'-'+(object.name)</field>
|
||||
</record>
|
||||
file="product.report_producttemplatelabel"
|
||||
print_report_name="'Products Labels - %s' % (object.name)"
|
||||
/>
|
||||
|
||||
<report
|
||||
id="action_report_pricelist"
|
||||
@@ -30,6 +28,6 @@
|
||||
report_type="qweb-pdf"
|
||||
name="product.report_pricelist"
|
||||
file="product.report_pricelist"
|
||||
menu="False"/>
|
||||
menu="False"/>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -8,10 +8,8 @@
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_picking"
|
||||
file="stock.report_picking_operations"
|
||||
print_report_name="'Picking Operations - %s - %s' % (object.partner_id.name or '', object.name)"
|
||||
/>
|
||||
<record id="action_report_picking" model="ir.actions.report">
|
||||
<field name="print_report_name">'Picking Operations'+'-'+(object.partner_id.name or '')+'-'+(object.name)</field>
|
||||
</record>
|
||||
<report
|
||||
string="Delivery Slip"
|
||||
id="action_report_delivery"
|
||||
@@ -19,30 +17,48 @@
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_deliveryslip"
|
||||
file="stock.report_deliveryslip"
|
||||
print_report_name="'Delivery Slip - %s - %s' % (object.partner_id.name or '', object.name)"
|
||||
/>
|
||||
<record id="action_report_delivery" model="ir.actions.report">
|
||||
<field name="print_report_name">'Delivery Slip'+'-'+(object.partner_id.name or '')+'-'+(object.name)</field>
|
||||
</record>
|
||||
<report
|
||||
string="Inventory"
|
||||
id="action_report_inventory"
|
||||
model="stock.inventory"
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_inventory"
|
||||
file="stock.report_inventory"
|
||||
file="stock.report_inventory"
|
||||
print_report_name="'Inventory - %s' % (object.name)"
|
||||
/>
|
||||
<report
|
||||
string="Package BarCode with Contents"
|
||||
id="action_report_quant_package_barcode"
|
||||
model="stock.quant.package"
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_package_barcode"
|
||||
file="stock.report_package_barcode"/>
|
||||
<report
|
||||
string="Package BarCode"
|
||||
id="action_report_quant_package_barcode_small"
|
||||
model="stock.quant.package"
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_package_barcode_small"
|
||||
file="stock.report_package_barcode"/>
|
||||
<report
|
||||
string="Location BarCode"
|
||||
id="action_report_location_barcode"
|
||||
model="stock.location"
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_location_barcode"
|
||||
file="stock.report_location_barcode"
|
||||
print_report_name="'Location - %s' % object.name"
|
||||
/>
|
||||
<report
|
||||
string="Lot BarCode"
|
||||
id="action_report_lot_barcode"
|
||||
model="stock.production.lot"
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_lot_barcode"
|
||||
file="stock.report_lot_barcode"
|
||||
print_report_name="'Lot-Serial - %s' % object.name"
|
||||
/>
|
||||
<record id="action_report_inventory" model="ir.actions.report">
|
||||
<field name="print_report_name">'Inventory'+'-'+(object.name)</field>
|
||||
</record>
|
||||
<report id="action_report_quant_package_barcode" model="stock.quant.package" report_type="qweb-pdf" name="stock.report_package_barcode" string="Package BarCode with Contents" file="stock.report_package_barcode"/>
|
||||
<report id="action_report_quant_package_barcode_small" model="stock.quant.package" report_type="qweb-pdf" name="stock.report_package_barcode_small" string="Package BarCode" file="stock.report_package_barcode"/>
|
||||
<report id="action_report_location_barcode" model="stock.location" report_type="qweb-pdf" name="stock.report_location_barcode" string="Location BarCode" file="stock.report_location_barcode"/>
|
||||
<record id="action_report_location_barcode" model="ir.actions.report">
|
||||
<field name="print_report_name">(object.name)+'-'+'Location'</field>
|
||||
</record>
|
||||
<report id="action_report_lot_barcode" model="stock.production.lot" report_type="qweb-pdf" name="stock.report_lot_barcode" string="Lot BarCode" file="stock.report_lot_barcode"/>
|
||||
<record id="action_report_lot_barcode" model="ir.actions.report">
|
||||
<field name="print_report_name">'Lot/Serial'+'-'+(object.name)</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user