[ADD] stock_picking_comment_template

This commit is contained in:
emagdalena
2019-05-23 13:26:24 +02:00
committed by Roger
parent 0854bf56ed
commit 8bac8d1d4b
17 changed files with 748 additions and 0 deletions

View File

@@ -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>

View File

@@ -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>

View 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>

View 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>