mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[ADD] stock_picking_comment_template
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<menuitem name="Document Comments"
|
||||
id="menu_base_comment_template_picking"
|
||||
action="base_comment_template.action_base_comment_template"
|
||||
parent="stock.menu_stock_config_settings"/>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_delivery_document_comments"
|
||||
inherit_id="stock.report_delivery_document">
|
||||
<xpath expr="//table[hasclass('table-condensed')]" position="before">
|
||||
<p t-if="o.note1">
|
||||
<span t-field="o.note1"/>
|
||||
</p>
|
||||
</xpath>
|
||||
<xpath expr="//p[@t-if='o.backorder_id']" position="after">
|
||||
<p t-if="o.note2">
|
||||
<span t-field="o.note2"/>
|
||||
</p>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
18
stock_picking_comment_template/views/report_picking.xml
Normal file
18
stock_picking_comment_template/views/report_picking.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_picking_document_comments"
|
||||
inherit_id="stock.report_picking">
|
||||
<xpath expr="//table[hasclass('table-condensed')]" position="before">
|
||||
<p t-if="o.note1">
|
||||
<span t-field="o.note1"/>
|
||||
</p>
|
||||
</xpath>
|
||||
<xpath expr="//p[@t-field='o.note']" position="after">
|
||||
<p t-if="o.note2">
|
||||
<span t-field="o.note2"/>
|
||||
</p>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
30
stock_picking_comment_template/views/stock_picking_view.xml
Normal file
30
stock_picking_comment_template/views/stock_picking_view.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="stock_picking_form_add_comment">
|
||||
<field name="name">stock.picking.form.comment</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page string="Comments" name="comments">
|
||||
<p style="margin-top: 10px;">The comments will be displayed on the printed document. You can load a predefined template, write your own text or load a template and then modify it only for this document.</p>
|
||||
<group string="Top Comments">
|
||||
<field name="comment_template1_id"
|
||||
string="Load a template"
|
||||
domain="[('position','=','before_lines')]"
|
||||
context="{'default_position': 'before_lines'}"/>
|
||||
<field name="note1" nolabel="1" colspan="2"/>
|
||||
</group>
|
||||
<group string="Bottom Comments">
|
||||
<field name="comment_template2_id"
|
||||
string="Load a template"
|
||||
context="{'default_position': 'after_lines'}"
|
||||
domain="[('position','=','after_lines')]"/>
|
||||
<field name="note2" nolabel="1" colspan="2"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user